-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug with changing monitor frequency from scheduled to "not scheduled" #5114
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Passing run #9126 ↗︎
Details:
Review all test suite changes for PR #5114 ↗︎ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5114 +/- ##
==========================================
+ Coverage 86.54% 86.56% +0.02%
==========================================
Files 357 357
Lines 22345 22349 +4
Branches 2954 2955 +1
==========================================
+ Hits 19339 19347 +8
+ Misses 2482 2480 -2
+ Partials 524 522 -2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, specially adding tests 😎
if execution_frequency == MonitorFrequency.NOT_SCHEDULED: | ||
data["monitor_execution_trigger"] = None | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add a case to the parameters of the test test_create_monitor_config_execution_trigger_logic
so that we cover this line , what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I see you did this already, unsure why codecov's reporting that these lines aren't covered
Passing run #9130 ↗︎
Details:
Review all test suite changes for PR #5114 ↗︎ |
Closes PROD-2305
Description Of Changes
Fixes a bug where discovery monitors that were scheduled for execution couldn't have their execution frequency changed to "not scheduled".
The issue was that the backend was treating a value of "undefined" for
execution_frequency
as "not scheduled", but the frontend isn't able to explicitly send "undefined" in its API request's payload. To fix, added aNOT_SCHEDULED
option to the MonitorFrequency enum and updated form on frontend and validation on backend to handle it as an explicit value.Code Changes
NOT_SCHEDULED
to MonitorFrequency enumundefined
when "Not scheduled" is selected in the formSteps to Confirm
Must run Plus backend on branch
jpople/prod-2305/not-scheduled-edit-fix
(see here)Pre-Merge Checklist
CHANGELOG.md
main
downgrade()
migration is correct and works