https://prefect.io logo
Title
t

Tony Piazza

09/30/2022, 3:11 PM
Am seeing this exception while trying to run a simple flow:
File "/opt/conda/envs/coiled/lib/python3.9/site-packages/prefect/client/base.py", line 125, in raise_for_status
Exception: PrefectHTTPStatusError("Client error '404 Not Found' for url '<http://ephemeral-orion/api/task_runs/add94276-cb3e-417d-a3f9-033f935ae5ec/set_state>'\nResponse: {'exception_message': 'Task run with id add94276-cb3e-417d-a3f9-033f935ae5ec not found'}\nFor more information check: <https://httpstatuses.com/404>")
Any ideas as to what might cause this?
1
values for PREFECT_API_KEY and PREFECT_API_URL were wrong. all good now.
🔥 1
b

Bianca Hoch

09/30/2022, 3:14 PM
Glad you arrived at a solution!
t

Tony Piazza

09/30/2022, 3:17 PM
are the API keys one-time use only?
m

Mason Menges

09/30/2022, 3:20 PM
Nope you can use them in whatever capacity you deem necessary as frequently as you wish, there is no way to retrieve it if you lose track of the key but they aren't limited to 1 time use.
:blob-attention-gif: 1
t

Tony Piazza

09/30/2022, 3:21 PM
i have attempted to reuse them but they never seem to work the 2nd time.
m

Mason Menges

09/30/2022, 3:24 PM
Are you seeing these same or similar errors in those cases, I can definitively say there's no limit on the number of time you can use an API Key, you can set an expiration for them when they're created, they can also be deleted but assuming the API key is still active through cloud and you still have access to it there's no limit on the number of times it's used.
t

Tony Piazza

09/30/2022, 3:26 PM
pretty consistent behavior but not in the mood to test it now that my flows are working 😉
m

Mason Menges

09/30/2022, 3:28 PM
Fair Enough 😄 Some preliminary thoughts if/when you do run into these issues, is this part of a CI/CD process, are you setting the API_URL and API_KEY during that process, seeing this URL
<http://ephemeral-orion/api/task_runs/add94276-cb3e-417d-a3f9-033f935ae5ec/set_state>
indicates that the API is not pointing to a Cloud or Local Orion instance so it's generating an Ephemeral api instead so there may be something misconfigured during that setup.
t

Tony Piazza

09/30/2022, 3:29 PM
mostly i have just logged in using prefect cloud login
but will pay more attention from now on. will follow up as we begin to define our build pipelines starting next week.
m

Mason Menges

09/30/2022, 3:31 PM
For sure, we're always happy to help 😄
t

Tony Piazza

09/30/2022, 3:31 PM
really appreciate the support of the prefect folks. you folks are awesome!
:hattip: 1