Hi folks, we are getting failures for all of our flow runs after updating to prefect
v0.14.15
basically the failure happens after the flow has completed running at the state handler level - please see the traceback in the thread
Marwan Sarieddine
04/06/2021, 2:10 PM
Copy code
Unexpected error: AttributeError("'Flow' object has no attribute 'terminal_state_handler'")
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/engine/flow_runner.py", line 669, in get_flow_run_state
state = self.determine_final_state(
File "/usr/local/lib/python3.8/site-packages/prefect/engine/flow_runner.py", line 720, in determine_final_state
if self.flow.terminal_state_handler:
AttributeError: 'Flow' object has no attribute 'terminal_state_handler'
k
Kevin Kho
04/06/2021, 2:16 PM
Hi @Marwan Sarieddine! My first guess here would be a version mismatch. Could you give me more details about your setup?
m
Marwan Sarieddine
04/06/2021, 2:17 PM
hey yes I think that might be the case - but sounds like a bit of a breaking change between 0.14.14 and 0.14.15
👍 1
k
Kevin Kho
04/06/2021, 2:24 PM
I get what you mean, but these changes are also needed to provide other features (custom notification failures for this one)
j
Josh
04/09/2021, 4:13 PM
was also a breaking change for our cloud runs. Everything started failing recently since we did not update our flows to match 0.14.15 and it seems prefect cloud now expects
terminal_state_handlers
on all flows
d
Dylan
04/09/2021, 4:52 PM
Hey @Josh! I don’t think that’s exactly right since none of my Flows stopped running?
Dylan
04/09/2021, 4:52 PM
Are you by chance auto-updating the version of Prefect Core in your Flow’s infrastructure?
Dylan
04/09/2021, 4:52 PM
Generally we recommend keeping that fixed unless you’re actively working on a Flow
Dylan
04/09/2021, 4:55 PM
Versions in Prefect work like this:
* We recommend fixing your Prefect Flow version unless you’re actively working on it (don’t pull Prefect’s Latest for you Flow)
* We recommend keeping agents on the latest Prefect version (DO pull the latest image) and it is required that your agent version is above the Prefect core version in the Flow
* If you’re using Prefect Server, your version must be ahead of both your agent and your flows
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.