Skip to content

Conversation

@ciprian-tibulca
Copy link
Contributor

@ciprian-tibulca ciprian-tibulca commented Oct 20, 2025

Description

CLOUDP-313016: add support for alertConfiguration.severityOverride attribute

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • [ x I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@ciprian-tibulca ciprian-tibulca changed the title [DRAFT] CLOUDP-31301: add support for alertConfiguration.severityOverride attribute feat: add support for alertConfiguration.severityOverride attribute Oct 23, 2025
@ciprian-tibulca ciprian-tibulca changed the title feat: add support for alertConfiguration.severityOverride attribute feat: Adds support for alertConfiguration.severityOverride attribute Oct 23, 2025
@ciprian-tibulca ciprian-tibulca marked this pull request as ready for review October 23, 2025 16:49
@ciprian-tibulca ciprian-tibulca requested review from a team as code owners October 23, 2025 16:49
@github-actions
Copy link
Contributor

APIx bot: a message has been sent to Docs Slack channel

@lantoli
Copy link
Member

lantoli commented Oct 23, 2025

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)

Copy link
Collaborator

@marcosuma marcosuma left a 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,
Copy link
Collaborator

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?

Copy link
Contributor Author

@ciprian-tibulca ciprian-tibulca Oct 24, 2025

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EspenAlbert
Copy link
Collaborator

Related issue is unrelated?

Comment on lines 582 to 585
Steps: []resource.TestStep{
{
Config: configWithSeverityOverride(projectID, "WARNING"),
Check: resource.ComposeAggregateTestCheckFunc(
Copy link
Member

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).

Copy link
Contributor Author

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)

Copy link
Member

@lantoli lantoli left a 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

Copy link
Member

@AgustinBettati AgustinBettati left a 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.
Copy link
Member

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.

Copy link
Contributor

@lmkerbey-mdb lmkerbey-mdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ciprian-tibulca ciprian-tibulca merged commit 14783e1 into master Oct 29, 2025
48 checks passed
@ciprian-tibulca ciprian-tibulca deleted the CLOUDP-313016_alert_conf_severityOverride branch October 29, 2025 15:59
svc-apix-Bot added a commit that referenced this pull request Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants