Hi folks, we are getting failures for all of our f...
# ask-community
m
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
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
Hi @Marwan Sarieddine! My first guess here would be a version mismatch. Could you give me more details about your setup?
m
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
I get what you mean, but these changes are also needed to provide other features (custom notification failures for this one)
j
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
Hey @Josh! I don’t think that’s exactly right since none of my Flows stopped running?
Are you by chance auto-updating the version of Prefect Core in your Flow’s infrastructure?
Generally we recommend keeping that fixed unless you’re actively working on a Flow
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