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
11/30/2022, 8:35 PMget_run_context
should never hang. If you share a MRE that’d be helpful.Kevin McCraney
11/30/2022, 8:47 PMZanie
11/30/2022, 8:52 PMKevin McCraney
11/30/2022, 8:55 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
11/30/2022, 10:30 PMKevin McCraney
11/30/2022, 10:30 PMZanie
12/01/2022, 1:09 AM