`FLYTE_PLATFORM_URL=<internal.flyte.url> pyf...
# ask-the-community
s
FLYTE_PLATFORM_URL=<internal.flyte.url> pyflyte get launchplan ...
does not seem to accept
FLYTE_PLATFORM_URL
. See error below. I have used the same url from python using
Config.for_endpoint(...)
, which works. Questions: 1. Is the env var
FLYTE_PLATFORM_URL
correct? 2. How can i debug where the problem lies?
Copy code
% FLYTE_PLATFORM_URL=<internal.flyte.url> pyflyte get launchplan
Failed with Exception Code: SYSTEM:Unknown
RPC Failed, with Status: StatusCode.UNAVAILABLE
	details: failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:30080: Failed to connect to remote host: Connection refused
	Debug string UNKNOWN:Error received from peer  {created_time:"2024-04-17T14:10:42.99254-07:00", grpc_status:14, grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:30080: Failed to connect to remote host: Connection refused"}
d
Hey Shabbir I just tried using the same with a port-forwarded instance and it works:
Copy code
(base) ➜ FLYTE_PLATFORM_URL=localhost:8089 pyflyte get launchplan
           LaunchPlans for
       flytesnacks/development
┏━━━━━━┳━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┓
┃ Name ┃ Version ┃ State ┃ Schedule ┃
┡━━━━━━╇━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━┩
└──────┴─────────┴───────┴──────────┘
so your
internal.flyte.url
resolves to your local sandbox instance?
s
The
internal.flyte.url
resolves to flyte installed on a k8s cluster. In your case, could it be that its actually returning results from localhost:30080 and ignoring
FLYTE_PLATFORM_URL=localhost:8089
altogether?
y
the env var isn’t working for me either. the option is still there, i think it’s just not getting called in the get command
could you specify a config file @Shabbir Suterwala?
Copy code
admin:
  endpoint: localhost:8089
  insecure: true
is all you need
s
That will work. I believe there a way provide the path to config via env var - right?
y
there is for other endpoints
other sub commands
the get one doesn’t look like it respects it
d
In your case, could it be that its actually returning results from localhost:30080
I don't have sandbox running so I don't think it's the case here