https://prefect.io logo
v

Vicky Kwan

09/15/2023, 10:35 PM
Hi friends. I'm using Prefect2 cloud and trying to follow Laura's video on getting a hello world deployment via GH block to a k8s worker pool. I can create a new deployment in my local env and run a flow, but whenever I move to a GHA workflow (I even checked pip freeze and all look the same), I see this error:
Copy code
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/bin/prefect", line 5, in <module>
    from prefect.cli import app
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/prefect/__init__.py", line 37, in <module>
    from prefect.runner import Runner, serve
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/prefect/runner.py", line 46, in <module>
    from prefect.client.orchestration import get_client
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/prefect/client/orchestration.py", line 17, in <module>
    import prefect.settings
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/prefect/settings.py", line 639, in <module>
    PREFECT_CLOUD_URL = Setting(
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/prefect/settings.py", line 120, in __init__
    generate_deprecation_message(
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/prefect/_internal/compatibility/deprecated.py", line 63, in generate_deprecation_message
    parsed_start_date = pendulum.from_format(start_date, DEPRECATED_DATEFMT)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pendulum/__init__.py", line 259, in from_format
    parts = _formatter.parse(string, fmt, now(), locale=locale)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pendulum/__init__.py", line 211, in now
    dt = _datetime.datetime.now(local_timezone())
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pendulum/tz/__init__.py", line 60, in local_timezone
    return get_local_timezone()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pendulum/tz/local_timezone.py", line 35, in get_local_timezone
    tz = _get_system_timezone()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pendulum/tz/local_timezone.py", line 63, in _get_system_timezone
    return _get_unix_timezone()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pendulum/tz/local_timezone.py", line 242, in _get_unix_timezone
    raise RuntimeError("Unable to find any timezone configuration")
RuntimeError: Unable to find any timezone configuration
Error: Process completed with exit code 1.
since it's giving me a deprecated message, I looked up and found generate_deprecation_message. It also looks suspicious because a couple of lines above it stops at
PREFECT_CLOUD_URL = Setting(
. So I found this code: https://github.com/PrefectHQ/prefect/blob/9f92b6475586997206aba2282a3eb5060eb29ab4/src/prefect/settings.py#L631
and saw that
PREFECT_CLOUD_URL
is deprecated.
but I also tried using
PREFECT_CLOUD_API_URL
in my GHA env. I guess my biggest question right now is how to authenticate my GHA runner using the service account API key (like I was able to do in local env, by running
prefect cloud login
) (now nothing works in the GHA, not even
prefect config view
)
I'm using prefect 2.13.1, and python3.10. I also purposefully updated the chart recently after this issue, and this PR
helm chart version is 2023.08.24