Hello. I have a flow thats permanently in a PENDIN...
# ask-community
d
Hello. I have a flow thats permanently in a PENDING state? How do I begin to debug this issue? Other flows in the same work queue is RUNNING and completing successfully.
1
j
Hey, do you have any logs related to the flow run submission?
d
@Jake Kaplan where can I get it from?
j
It'd be from your agent/worker. If you're using a worker some of the logs from the submission should be attached to your flow run logs in the UI, otherwise anything from running your agent/worker
d
@Jake Kaplan Thanks for the guidance. The issue seems to be on my side. I seem to have messed up the path to my config file. So python native FileNotFoundError is being raised. But why is the flow run in Pending state. Should it not be in Failed state?
j
are you able to see where that error is being raised from?
d
Yes it is from within my code.
so a basic
with open
python statement within a flow
j
do you have a stacktrace or even better flowrun logs?
d
Posting it
Copy code
$kubectl logs deft-saluki-xj58k-v4zdm -n <namespacehere> 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/app/generic_folder/__init__.py", line 5, in <module>
    from generic_folder.prefect_structs.extended_tasks import (
  File "/app/generic_folder/prefect_structs/extended_tasks.py", line 5, in <module>
    from generic_folder.utils.prefect_utils import (
  File "/app/generic_folder/utils/prefect_utils.py", line 18, in <module>
    from generic_folder.config import IS_LOCAL_DEV, config
  File "/app/generic_folder/config.py", line 9, in <module>
    config = KeyvaultConfigManager(path=f"{os.getenv('ENVIRONMENT')}.toml")
  File "/app/.venv/lib/python3.10/site-packages/archimedes_config/keyvault_config_manager.py", line 28, in __init__
    super().__init__(
  File "/app/.venv/lib/python3.10/site-packages/archimedes_config/config_manager.py", line 35, in __init__
    self.load(path=path)
  File "/app/.venv/lib/python3.10/site-packages/archimedes_config/config_manager.py", line 216, in load
    with open(path, "r", encoding="utf8") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'dev.toml'
Heres what UI looks like
j
and the logs tab?
d
This run didn't generate Logs
I am using an agent
j
What you're seeing might be a different error or from a different run, since it looks like it never made it to a running state
do you have any logs from that flow from the agent?
d
I am pretty sure that the pod is associated with the flow because the pod creation time is after the scheduled time
j
do you have the rest of the logs from that pod?
d
Thats the entire log
j
oh hm it looks like it's erroring on import?
d
Nope. Its an error on Class initialization.
Copy code
KeyvaultConfigManager
Either way, i think prefect should be classify this as an Error state and not Pending. DO you know if adding an ENTRYPOINT on the dockerfile for image has conflicts with prefect flow deployment?
j
I think you might be overriding our default entrypoint 😅
d
Yes i think so too.
j
we can't mark the flow as failed cause prefect is effectively not running
d
Yes this kind of makes sense to me now
Ill test after removing the entrypoint I added to see if i get a failure
👍 1
So seems like the ENTRYPOINT does matter I commented the entrypoint code and it passed successfully.
What is the default entrypoint for prefect?
I think the important part is that it's called with the right command
Copy code
python -m prefect.engine
d
I am still using the endpoint and just changed the work directory and the issue fixed itself.
Thanks!