Hello! I am setting up my Prefect flows CI/CD pip...
# ask-community
j
Hello! I am setting up my Prefect flows CI/CD pipeline, and as part of that I need to register flows against my Prefect server instance. One thing I noticed is that there's a
set_schedule_active
parameter that can be specified to the
.register()
call in order to automatically enable or disable the scheduling of the new flow version. These values can be either
True
(enable the scheduling) or
False
(disable the scheduling), but there's no option to "leave it as it is right now", meaning that if the flow is active/inactive, the new registration should leave the new workflow as active/inactive as well. What's the best approach in this scenario? I want to avoid 2 potentially dangerous situations: - Accidentally enabling a flow that should remain disabled - Accidentally disabling a flow that should remain enabled Avoiding any specification in the code would be ideal, since we don't want to enable or disable flows using the code, but rather the UI/API. Thanks!
c
Hi Jay! This makes sense to me; I believe we could use
None
to signify “just keep things as they are”. Would you mind opening an enhancement request describing your setup?
Also, I’ll need to check to confirm this but I think that if you configure your schedule via the UI only (not in code) then you can use False for the value and things will work as you expect
j
Thanks for the response! Regarding your last point,
None
and
False
will both disable the flow, even if it was previously enabled via the UI.
I submitted a new request for this: https://github.com/PrefectHQ/server/issues/208
c
Awesome Thanks! I’ll respond with any follow up there 👍👍
🙌 1