PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.87k stars 1.56k forks source link

Custom Triggers in automations aren't populating when editing an automation #9187

Open jbnitorum opened 1 year ago

jbnitorum commented 1 year ago

First check

Bug summary

If you create an automation with a custom trigger and then go back to edit that automation, when the trigger screen loads the Trigger Type field defaults to 'Flow Run State' rather than your custom trigger you created. If you change the dropdown to 'Custom' then the custom trigger is shown correctly on the form.

The issue is that if you don't change the trigger dropdown you can lose your custom trigger settings if you submit the form. For example I just went in to add a tag to my automation with a custom trigger and I submitted the form without remembering to change the trigger type. The trigger was reverted to 'Flow Run State' and I lost the custom trigger I had previously created.

The form should populate with the current settings when editing an automation.

Reproduction

Self explanatory

Error

None

Browers

Prefect version

No response

Additional context

No response

WillRaphaelson commented 1 year ago

Thanks @jbnitorum, I think we can tighten up the conditions under which we show the custom vs flow run state display (and thus what we save).