-
Notifications
You must be signed in to change notification settings - Fork 208
feat: Adds support for alertConfiguration.severityOverride attribute #3795
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
feat: Adds support for alertConfiguration.severityOverride attribute #3795
Conversation
|
APIx bot: a message has been sent to Docs Slack channel |
|
if branch name is correct, CLOUDP-31301 in PR description is missing the last number, should be CLOUDP-313016 (which is an epic instead of story) |
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.
Thanks! Leo brings up a couple of good points, good to address those first
| }, | ||
| }, | ||
| "severity_override": schema.StringAttribute{ | ||
| Optional: true, |
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.
just to double check: This is never returned by the API unless defined by the user? How do the user reset the attribute?
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.
This is never returned by the API unless defined by the user?
correct
How do the user reset the attribute?
as of now, this flag cannot be cleared (if not set in the PUT request body it won't be reset). Same happens from UI too, I will open a ticket with the owning team.
I added a note in the docs about explicitly setting it to ERROR (the default).
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.
|
Related issue is unrelated? |
| Steps: []resource.TestStep{ | ||
| { | ||
| Config: configWithSeverityOverride(projectID, "WARNING"), | ||
| Check: resource.ComposeAggregateTestCheckFunc( |
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.
We can add an additional step modifying the value, and also capture behaviour of what happens when attribute is removed (related to Espen thread).
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.
I added the step, byt it's currently commented (due to https://jira.mongodb.org/browse/CLOUDP-353933)
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.
LGTM, thanks for the follow-ups
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.
LGTM, leaving improvement that can be done in the test
| resource.TestCheckResourceAttr(dataSourceName, "severity_override", "ERROR"), | ||
| ), | ||
| }, | ||
| // TODO: Should check for no attr once CLOUDP-353933 is fixed. |
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.
Now that the implementation leverages RequiresReplace I am fairly certain the test can cover both updating the value and removing it (3 steps in total).
This TODO could be moved to the definition of the PlanModifier, once API fix is in place we can safely remove the plan modifier and support regular update flow.
Co-authored-by: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com>
Co-authored-by: Agustin Bettati <bettatiagustin@gmail.com>
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.
LGTM.
Description
CLOUDP-313016: add support for alertConfiguration.severityOverride attribute
Type of change:
Required Checklist:
Further comments