https://prefect.io logo
#prefect-community
Title
# prefect-community
d

Dylan

05/19/2022, 10:22 PM
What’d cause a KubernetesRun to get stuck in this state?
Copy code
[2022-05-19 22:18:54+0000] DEBUG - prefect.CloudTaskRunner | Task 'my-foobar-task': Calling task.run() method...
[2022-05-19 22:19:38+0000] DEBUG - prefect.CloudFlowRunner | Checking flow run state...
[2022-05-19 22:19:53+0000] DEBUG - prefect.CloudFlowRunner | Checking flow run state...
The task itself has logging I’d expect to emit to stdout
and if / when I cancel this run I don’t see any state persisted to the task result’s configured S3Result
Copy code
with Flow(
    name=FLOW_NAME,
    storage=Local(
        add_default_labels=False,
        stored_as_script=True,
        path="flows/asn_ingest.py",
    ),
    run_config=KubernetesRun(
        image=f"{ECR_REGISTRY}/{IMAGE}:{IMAGE_TAG}",
        labels=[IMAGE, ENV, FLOW_NAME],
        job_template_path="templates/base-flow-template.yaml",
    ),
    executor=LocalExecutor(),
) as flow:
    client = AsnApiClient()
    raw_data = api_get_asn(client)
    save(raw_data)
I assume this code is running in prefect cloud, or similar
a

Anna Geller

05/19/2022, 10:36 PM
if this runs on Prefect Cloud, perhaps sharing flow run ID could help here to check the logs
d

Dylan

05/19/2022, 10:46 PM
Looking for it
It’s not in the UI (or I at least can’t find it) do I need to run some code to get the flow run ID?
I’ve got a flow ID, not sure if that helps
Copy code
59223286-ed94-453a-abf2-c0a94532b637
Oh
It’s doing stuff still 😄
a

Anna Geller

05/20/2022, 12:06 PM
the flow run ID you shared doesn't seem to exist - is your issue solved by now?
d

Dylan

05/20/2022, 3:15 PM
It was a
flow_id
not a
flow_run_id
I couldn’t find the
flow_run_id
anywhere in the UI
a

Anna Geller

05/20/2022, 3:17 PM
it's the URL of the flow run page
is the issue solved now?
d

Dylan

05/23/2022, 4:40 PM
Yeah it’s resolved, thanks. I also noticed that the flow run ID is available as metadata for the flow run pod on EKS.
🙏 1
🔝 1
2 Views