Skip to content

chore: Updates org_clean_test.go to delete stream instances & private endpoint services #3252

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 3 commits into from
Apr 7, 2025

Conversation

maastha
Copy link
Collaborator

@maastha maastha commented Apr 4, 2025

Description

Updates org_clean_test.go to delete stream instances & private endpoint services

Test runs:
https://github.com/mongodb/terraform-provider-mongodbatlas/actions/runs/14273965328/job/40013230931
https://github.com/mongodb/terraform-provider-mongodbatlas/actions/runs/14274317052/job/40014298440

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
  • 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

@maastha maastha marked this pull request as ready for review April 4, 2025 21:51
@maastha maastha requested a review from a team as a code owner April 4, 2025 21:51
@@ -127,15 +131,16 @@ func TestCleanProjectAndClusters(t *testing.T) {
})
}
t.Cleanup(func() {
projectsAfter := readAllProjects(t.Context(), t, client)
//nolint:usetesting // reason: using context.Background() here intentionally because t.Context() is canceled at cleanup
Copy link
Member

Choose a reason for hiding this comment

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

isn't there a way to avoid this linter exception?

@@ -40,6 +42,8 @@ var (
"CANNOT_CLOSE_GROUP_ACTIVE_PEERING_CONNECTIONS",
"CANNOT_CLOSE_GROUP_ACTIVE_ATLAS_DATA_LAKES",
"CANNOT_CLOSE_GROUP_ACTIVE_ATLAS_DATA_FEDERATION_PRIVATE_ENDPOINTS",
"CANNOT_CLOSE_GROUP_ACTIVE_STREAMS_RESOURCE",
"CANNOT_CLOSE_GROUP_ACTIVE_ATLAS_PRIVATE_ENDPOINT_SERVICES",
Copy link
Member

Choose a reason for hiding this comment

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

can we maybe change the logic to detect if error has prefix CANNOT_CLOSE_GROUP_ACTIVE_ ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prefer to keep as is for now & see how this works for next few days & if we encounter other issues/errors

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!

@maastha maastha merged commit e8d2ce4 into master Apr 7, 2025
44 checks passed
@maastha maastha deleted the tf-test-org-clean-script-update branch April 7, 2025 17:50
lantoli added a commit that referenced this pull request Apr 8, 2025
* master:
  chore: Updates org_clean_test.go to delete stream instances & private endpoint services (#3252)
  chore: Updates organization.md `skip_default_alerts_settings` note format (#3246)
  doc: Update guidelines for external contributors to squash commits (#3243)
  chore: Updates CHANGELOG.md for #3199
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.

3 participants