Use updated cronSchedule in CreateLaunchPlanModel #4564
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
Create schedule launchplan is using deprecated field to determine if schedule type is CRON and saving it in the DB
This causes the list launchplan with filter for CRON type schedule returns null
This fixes the logic of saving all new scheduled launchplans.
We are not planning to support this for older scheduled launchplans and hence no migration script for it.
How was this patch tested?
Tested this on an internal tenant by registering the latest version of the examples
Verified the result of https://dogfood.cloud-staging.union.ai/api/v1/launch_plans/flytesnacks/development?filters=ne(schedule_type,NONE)%2Beq(state,1)&limit=10000&sort_by.direction=ASCENDING&sort_by.key=name
returns exactly the two activated launchplans.
Also verified after the above two steps of archive the following link returns no result https://dogfood.cloud-staging.union.ai/api/v1/launch_plans/flytesnacks/development?filters=ne(schedule_type,NONE)%2Beq(state,1)&limit=10000&sort_by.direction=ASCENDING&sort_by.key=name
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link