Skip to content

Conversation

@EspenAlbert
Copy link
Contributor

@EspenAlbert EspenAlbert commented Feb 5, 2025

Proposed changes

  • Updates cleanup-test-env workflow for MongoDB Atlas provider and cleanup script
  • Tried to add Orgs configured with credentials in gh
  • Will become more effective once CLOUDP-299242 is resolved

Link to any related issue(s): CLOUDP-288937

Successful run

Projects changed from 124 to 26

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update
  • 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.

Manual QA performed:

  • cfn invoke for each of CRUDL/cfn test
  • Updated resource in example
  • Published to AWS private registry
  • Used the template in example to create and update a stack in AWS
  • Deleted stack to ensure resources are deleted
  • Created multiple resources in same stack
  • Validated in Atlas UI
  • Included screenshots

Required Checklist:

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • For CFN Resources: I have released by changes in the private registry and proved by change
    works in Atlas

Further comments

@EspenAlbert EspenAlbert marked this pull request as ready for review February 6, 2025 22:01
@EspenAlbert EspenAlbert requested a review from a team as a code owner February 6, 2025 22:01
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: terraform-provider-mongodbatlas-checkout
Copy link
Member

Choose a reason for hiding this comment

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

i had to see the new file entirely instead of diff to understand this checkout name :-)

scripts
- uses: mongodb/atlas-github-action@15663d068c40a8582d881560961fce9d45e0df9a
repository: mongodb/terraform-provider-mongodbatlas
ref: 133ee57735e0c8f2b22e74bbd9f8c3fdd8da2f9c
Copy link
Member

@lantoli lantoli Feb 7, 2025

Choose a reason for hiding this comment

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

as we control both repos, how about using master directly?
In current approach I can see the benefit that for instance if we change workflow path this won't break. As a con we need to remember to update CFN if we do some improvements in clean GHA in TF

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A pro for using the SHA is caching. Not a strong opinion, but prefer keeping as is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I'd prefer to use master as well. If we change the workflow path or something things will simply fail right? and at least we'll get notified that ways to take an action. With the current approach it's easy to miss out on updating the CFN repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed in 455c7d5

shell: bash
uses: ./.github/templates/clean-atlas-org
env:
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.CLOUD_DEV_PUBLIC_KEY }}
Copy link
Member

Choose a reason for hiding this comment

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

what projects are we effectively cleaning with this PR before unifying names?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not many, although the CFNTest org had 98 projects removed.

Copy link
Collaborator

@maastha maastha left a comment

Choose a reason for hiding this comment

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

LGTM

@EspenAlbert EspenAlbert added this pull request to the merge queue Feb 10, 2025
Merged via the queue into master with commit 4527055 Feb 10, 2025
33 checks passed
@EspenAlbert EspenAlbert deleted the CLOUDP-288937_cleanup_script branch February 10, 2025 09:05
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