damp-lion-88352
01/09/2025, 1:49 PMdamp-lion-88352
01/09/2025, 1:50 PMdamp-lion-88352
01/09/2025, 1:50 PMdamp-lion-88352
01/09/2025, 1:59 PMdamp-lion-88352
01/09/2025, 2:00 PMdamp-lion-88352
01/09/2025, 2:00 PMdamp-lion-88352
01/09/2025, 2:00 PMdamp-lion-88352
01/09/2025, 2:01 PMif __name__ == "__main__":
from flytekit.clis.sdk_in_container import pyflyte
from click.testing import CliRunner
import os
runner = CliRunner()
path = os.path.realpath(__file__)
os.environ["FLYTE_PLATFORM_URL"] = "localhost:30080"
result = runner.invoke(pyflyte.main, ["info",])
print(result.output)
damp-lion-88352
01/09/2025, 2:02 PM/Users/future-outlier/miniconda3/envs/dev/bin/python /Users/future-outlier/code/dev/flytekit/build/oss/issue_0109_honnix_pyflyte_info_bug/example.py
22:01:24.010028 INFO file.py:252 - Using flytectl/YAML config
/Users/future-outlier/.flyte/config-sandbox.yaml
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1736431285.186100 27684812 <http://config.cc:230]|config.cc:230]> gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
22:01:25.210203 INFO raw.py:64 - Flyte Client configured -> localhost:30080
in insecure mode.
╭───────────────────────────── Flytekit CLI Info ──────────────────────────────╮
│ │
│ │
│ This CLI is meant to be used within a virtual environment that has Flytekit │
│ installed. Ideally it is used to iterate on your Flyte workflows and tasks. │
│ │
│ Flytekit Version: 1.14.0b7.dev29+g82c0b61e8 │
│ Flyte Backend Version: unknown │
│ Flyte Backend Endpoint: localhost:30080 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Process finished with exit code 0
damp-lion-88352
01/09/2025, 2:02 PMsteep-jackal-21573
01/09/2025, 2:03 PMdamp-lion-88352
01/09/2025, 2:04 PMdamp-lion-88352
01/09/2025, 2:04 PMsteep-jackal-21573
01/09/2025, 2:06 PMdamp-lion-88352
01/09/2025, 3:35 PM(dev) future@outlier ~ % FLYTECTL_CONFIG="" pyflyte info
23:34:48.331862 INFO file.py:272 - Using flytectl/YAML config /Users/future-outlier/.flyte/config.yaml
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1736436889.497775 27774768 <http://config.cc:230]|config.cc:230]> gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
23:34:49.523693 INFO raw.py:64 - Flyte Client configured -> localhost:30081 in secure mode.
I0000 00:00:1736436889.526014 27774856 <http://subchannel.cc:806]|subchannel.cc:806]> subchannel 0x16d787740 {address=ipv6:%5B::1%5D:30081, args={grpc.client_channel_factory=0x600000645080, grpc.default_authority=localhost:30081, grpc.http2_scheme=https, grpc.internal.channel_credentials=0x60000201c660, grpc.internal.client_channel_call_destination=0x10631ba18, grpc.internal.event_engine=0x60000064bc90, grpc.internal.security_connector=0x600002abdd80, grpc.internal.subchannel_pool=0x600002f74070, grpc.max_metadata_size=32768, grpc.max_receive_message_length=20971520, grpc.primary_user_agent=grpc-python/1.65.1, grpc.resource_quota=0x600000ab1020, grpc.server_uri=dns:///localhost:30081}}: connect failed (UNKNOWN:Failed to connect to remote host: connect: Connection refused (61) {created_time:"2025-01-09T23:34:49.525642+08:00"}), backing off for 1000 ms
I0000 00:00:1736436889.526183 27774856 <http://subchannel.cc:806]|subchannel.cc:806]> subchannel 0x16d77de00 {address=ipv4:127.0.0.1:30081, args={grpc.client_channel_factory=0x600000645080, grpc.default_authority=localhost:30081, grpc.http2_scheme=https, grpc.internal.channel_credentials=0x60000201c660, grpc.internal.client_channel_call_destination=0x10631ba18, grpc.internal.event_engine=0x60000064bcc0, grpc.internal.security_connector=0x600002abde00, grpc.internal.subchannel_pool=0x600002f74070, grpc.max_metadata_size=32768, grpc.max_receive_message_length=20971520, grpc.primary_user_agent=grpc-python/1.65.1, grpc.resource_quota=0x600000ab1020, grpc.server_uri=dns:///localhost:30081}}: connect failed (UNKNOWN:Failed to connect to remote host: connect: Connection refused (61) {created_time:"2025-01-09T23:34:49.52615+08:00"}), backing off for 1000 ms
RPC Failed, with Status: StatusCode.UNAVAILABLE
Details: failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:30081: Failed to connect to remote host: connect: Connection refused (61)
damp-lion-88352
01/09/2025, 3:35 PMdamp-lion-88352
01/09/2025, 3:35 PMdamp-lion-88352
01/09/2025, 3:47 PMRPC Failed, with Status: StatusCode.UNAVAILABLE
Details: failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:30081: Failed to connect to remote host: connect: Connection refused (61)
damp-lion-88352
01/09/2025, 3:48 PMdamp-lion-88352
01/09/2025, 3:48 PMsteep-jackal-21573
01/09/2025, 3:52 PMFLYTE_PLATFORM_URL
(etc.) env var, unless I give it a config file (doesn't have to exist).damp-lion-88352
01/09/2025, 3:53 PMdamp-lion-88352
01/09/2025, 3:53 PMdamp-lion-88352
01/09/2025, 3:53 PMdamp-lion-88352
01/09/2025, 3:53 PMdamp-lion-88352
01/09/2025, 3:54 PMdamp-lion-88352
01/09/2025, 3:54 PMdamp-lion-88352
01/09/2025, 3:54 PM(flytkit-3.11) future@outlier ~ % FLYTECTL_CONFIG="" FLYTE_PLATFORM_URL="dns:///localhost:30080" pyflyte info
23:53:17.127627 INFO Using flytectl/YAML config /Users/future-outlier/.flyte/config.yaml file.py:273
23:53:17.184251 INFO Registering Sensor for task type: sensor_v0 base_agent.py:213
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1736437997.259115 27796857 <http://config.cc:230]|config.cc:230]> gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
23:53:17.275948 INFO Flyte Client configured -> localhost:30080 in secure mode. raw.py:63
╭─────────────────────────────────────────────────────────────────────────────────────── Flytekit CLI Info ────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ This CLI is meant to be used within a virtual environment that has Flytekit installed. Ideally it is used to iterate on your Flyte workflows and tasks. │
│ │
│ Flytekit Version: 1.12.3 │
│ Flyte Backend Endpoint: localhost:30080 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
steep-jackal-21573
01/09/2025, 3:55 PMdamp-lion-88352
01/10/2025, 1:45 PMinsecure=True
to make the request work.
admin:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
endpoint: dns:///localhost:30080
insecure: true
I'm still investigating.damp-lion-88352
01/10/2025, 1:45 PM$ FLYTE_PLATFORM_URL=<somewhere> pyflyte --config foo info
damp-lion-88352
01/10/2025, 1:45 PMdamp-lion-88352
01/10/2025, 1:46 PMsteep-jackal-21573
01/10/2025, 1:50 PMsteep-jackal-21573
01/10/2025, 1:51 PMdamp-lion-88352
01/10/2025, 1:51 PMdamp-lion-88352
01/10/2025, 1:51 PMdamp-lion-88352
01/10/2025, 1:54 PMsteep-jackal-21573
01/10/2025, 1:58 PM$ FLYTE_PLATFORM_URL=foo pyflyte info
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: connect: Connection refused (61)
$ FLYTE_PLATFORM_URL=foo pyflyte --config foo info
RPC Failed, with Status: StatusCode.UNAVAILABLE
Details: DNS resolution failed for foo: C-ares status is not ARES_SUCCESS qtype=A name=foo is_balancer=0: DNS server returned answer with no data
If you compare these two commands, the first one doesn't even bother reading FLYTE_PLATFORM_URL
.steep-jackal-21573
01/10/2025, 1:59 PM--config <something>
is provided, those env vars won't be read.damp-lion-88352
01/10/2025, 1:59 PMdamp-lion-88352
01/10/2025, 1:59 PMdamp-lion-88352
01/10/2025, 1:59 PMsteep-jackal-21573
01/10/2025, 2:01 PMdamp-lion-88352
01/14/2025, 1:35 AMsteep-jackal-21573
01/14/2025, 8:28 AM