Prefect 2.7.2 Flow Name Deployment Bug

I have a flow defined as follows:

@flow(name='specific flow name')
def main():
    subflow()
    other_subflow()

The main() naming convention is something I am using throughout my deployments and it was working well in Prefect 2.7.1, however it broke deployments in 2.7.2. Running the flow manually works as expected, but scheduled deployment runs result in the following exception:

prefect.exceptions.MissingFlowError: Flow 'main' not found in script 'flows/.../main_flow.py'. 
Found the following flows: 'subflow' 'other_subflow' 'specific flow name'. 
Check to make sure that your flow function is decorated with `@flow`.

The expected behavior is for all flows to continue working normally regardless of what the decorated function name is defined as. I have Prefect Orion and Prefect Agent dockerized and deployment storage is on S3 blocks.

We fixed that in 2.7.3 - upgrade to the latest release and the error should be gone

1 Like

Awesome, thank you! I have tested on 2.7.3 and it has been resolved.

1 Like