You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When registering a Flow, the set_schedule_active argument of the prefect.core.flow.Flow.register method determines whether the flow's new version is automatically enabled or disabled depending on its value (True or False, respectively).
This effectively overrides any current schedule setup.
For instance, if a flow's scheduled status is "active" and the set_schedule_active argument is set to False when a new version of the flow is registered, the flow's scheduled status will be forced to "inactive".
Proposed behavior
There should be an option to leave the scheduled status unchanged, meaning that if the flow is active/inactive, the new registration should leave the new flow as active/inactive as well.
This will help avoid 2 potentially dangerous situations:
Accidentally enabling a flow that should remain disabled
Accidentally disabling a flow that should remain enabled
A suggestion is to have this behaviour whenever the set_schedule_active argument is given a value of None. This would need to be explicit though, given that the current default value of the set_schedule_active argument is True, and changing that default value to None will break backwards compatibility.
Thanks! TBH I forgot about this issue but now I remember that I had a quick conversation with someone on Slack about this, and I ended up creating this issue for posterity. I guess this is posterity 😂
I'll take a stab at it!
Current behavior
When registering a
Flow
, theset_schedule_active
argument of theprefect.core.flow.Flow.register
method determines whether the flow's new version is automatically enabled or disabled depending on its value (True
orFalse
, respectively).This effectively overrides any current schedule setup.
For instance, if a flow's scheduled status is "active" and the
set_schedule_active
argument is set toFalse
when a new version of the flow is registered, the flow's scheduled status will be forced to "inactive".Proposed behavior
There should be an option to leave the scheduled status unchanged, meaning that if the flow is active/inactive, the new registration should leave the new flow as active/inactive as well.
This will help avoid 2 potentially dangerous situations:
A suggestion is to have this behaviour whenever the
set_schedule_active
argument is given a value ofNone
. This would need to be explicit though, given that the current default value of theset_schedule_active
argument isTrue
, and changing that default value toNone
will break backwards compatibility.More context can be found in this Slack thread.
Example
Flow Currently Active
These will leave the status as "active":
These will set the status to "inactive"
Flow Currently Inactive
These will leave the status as "inactive":
These will set the status to "active"
The text was updated successfully, but these errors were encountered: