Kevin McCraney
11/30/2022, 8:15 PMis_successful()
method in an assert in our testing, and to move that to Prefect 2, we were thinking we might call get_run_context()
to get the flow run state and return some value (likely 'Completed' from the state_name
parameter). We've observed that calling get_run_context()
within a flow's context causes the flow to hang. Has anyone observed this, or does anyone have any suggestions for remedy?Zanie
get_run_context
should never hang. If you share a MRE that’d be helpful.Zanie
Kevin McCraney
11/30/2022, 8:47 PMZanie
Kevin McCraney
11/30/2022, 8:55 PMKevin McCraney
11/30/2022, 10:29 PMUserWarning: A flow named 'double-quote-cleanup-flow' and defined at XXX_location conflicts with another flow. Consider specifying a unique `name` parameter in the flow definition:
`@flow(name='my_unique_name', ...)`
warnings.warn(
-- Docs: <https://docs.pytest.org/en/stable/how-to/capture-warnings.html>
I've added a uuid to the flow name so it's different every runtime, and that suppresses the error. Is there a suggested way of deregistering flows if they're called in a test suite?Zanie
Kevin McCraney
11/30/2022, 10:30 PMZanie