https://prefect.io logo
Title
s

Simon Macklin

11/30/2022, 8:20 PM
Hey prefect when creating a flow which would run in kubernetes. v1 adds automatically flow_id to the pod labels. But V2 doesn’t appear to so. How would I add flow meta data to the flow pod ?
:kubernetes: 1
1
z

Zanie

11/30/2022, 8:34 PM
We do include a bunch of metadata there, is there a reason the flow id is particularly useful?
s

Simon Macklin

11/30/2022, 8:47 PM
hey @Zanie I would like reconcile the flow id with any infra layer failures such as out of memory. Then post the status back to prefect through the set state endpoint
I don’t think v2 currently reports on any infra level errors or failures
z

Zanie

11/30/2022, 8:54 PM
We do our best to report infra level failures! We capture any base exceptions during runtime and report as the Python interpreter exits. We’ve also added handling at the agent level that can report cases like OOM which generally result in a kill too hard for the flow to report its own failure: https://github.com/PrefectHQ/prefect/pull/7670
🙌 1
s

Simon Macklin

11/30/2022, 9:17 PM
super
is there a way to get the flow_id labels added to each pod with v2?
z

Zanie

11/30/2022, 9:51 PM
We can definitely add them, but we’ll want a use-case before adding more labels.
We’ve already got the flow run id there so you could report states as you mentioned.
s

Simon Macklin

11/30/2022, 9:53 PM
thanks @Zanie