Skip to content

chore: migrate alert_configuration to new SDK #1630

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

Merged
merged 9 commits into from
Nov 21, 2023
Merged

chore: migrate alert_configuration to new SDK #1630

merged 9 commits into from
Nov 21, 2023

Conversation

oarbusi
Copy link
Collaborator

@oarbusi oarbusi commented Nov 15, 2023

Description

Migrate alert_configuration to new SDK.
The existing tests already cover all behaviours of the resource, so no tests have been added.

Link to any related issue(s):
https://jira.mongodb.org/browse/INTMDB-1121

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.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • 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 defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.

Further comments

@oarbusi oarbusi marked this pull request as ready for review November 16, 2023 13:03
@oarbusi oarbusi requested a review from a team as a code owner November 16, 2023 13:03
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. just to check if you tried (manually) that plan doesn't change after this change

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.

some details to follow up

apiReq := &matlas.AlertConfiguration{
EventTypeName: alertConfigPlan.EventType.ValueString(),
apiReq := &admin.GroupAlertsConfig{
EventTypeName: alertConfigPlan.EventType.ValueStringPointer(),
Copy link
Member

Choose a reason for hiding this comment

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

curious why SDK is generating this field as optional (string pointer) when it is required for all cases. (does not block PR, just something that could be worth investigating to gain more understanding in sdk side)

Copy link
Member

Choose a reason for hiding this comment

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

is the "required" info in OpenAPI or it's just how the server behaves?

Copy link
Member

Choose a reason for hiding this comment

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

@marcosuma
Copy link
Collaborator

Let's wait to merge this until we release 1.13.0! see my comment in Jira

Copy link
Contributor

Code Coverage

Package Line Rate Health
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas 2%
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas/framework/validator 68%
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas/testutils 46%
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas/util 17%
Summary 3% (284 / 10303)

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, thanks for looking into comments

@oarbusi oarbusi merged commit bc33bf4 into master Nov 21, 2023
@oarbusi oarbusi deleted the INTMDB-1121 branch November 21, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants