Skip to content
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: Runs Acceptance and Migration tests for different Terraform CLI versions #1688

Merged
merged 7 commits into from
Nov 30, 2023

Conversation

lantoli
Copy link
Member

@lantoli lantoli commented Nov 30, 2023

Description

Runs Acceptance and Migration tests for different Terraform CLI versions.

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

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 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 defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.

Further comments

pull_request: # you can run a specic job in your PR using GitHub labels
types: [ labeled ]
schedule:
- cron: "0 4 * * *" # workflow runs every day at 04:00 AM
Copy link
Member Author

Choose a reason for hiding this comment

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

schedule is now only for Test Suite workflow

jobs:
example:
schedule:
- cron: "0 2 * * *" # workflow runs every day at 02:00 AM
Copy link
Member Author

@lantoli lantoli Nov 30, 2023

Choose a reason for hiding this comment

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

this is the workflow to be scheduled. Run at an earlier time than before to have more time to run all combinations of versions

Copy link
Collaborator

Choose a reason for hiding this comment

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

does it really take that long to run all combinations that we need to run it earlier?

Copy link
Member Author

Choose a reason for hiding this comment

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

last execution was 1h, here we also have migration tests but they're much faster. I prefer to err on the side of starting earlier at night and finish before we start working in the morning. sometimes it can take hours if cluster creation is stuck.

@lantoli lantoli changed the title feat: Runs Acceptance and Migration tests for different Terrafor CLI versions feat: Runs Acceptance and Migration tests for different Terraform CLI versions Nov 30, 2023
@lantoli lantoli marked this pull request as ready for review November 30, 2023 16:25
@lantoli lantoli requested a review from a team as a code owner November 30, 2023 16:25
max-parallel: 1
fail-fast: false
matrix:
terraform_version: ['${{ vars.TF_VERSION_LATEST }}', '1.0.8']
Copy link
Member Author

Choose a reason for hiding this comment

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

Terraform CLI versions to test

Copy link
Contributor

Code Coverage

Package Line Rate Health
github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion 31%
github.com/mongodb/terraform-provider-mongodbatlas/internal/common/validate 68%
github.com/mongodb/terraform-provider-mongodbatlas/internal/provider 5%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster 3%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/alertconfiguration 33%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/atlasuser 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cluster 1%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/databaseuser 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/encryptionatrest 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/project 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/projectapikey 1%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/projectipaccesslist 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/searchdeployment 23%
github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc 5%
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas 2%
Summary 4% (434 / 10700)

Copy link
Collaborator

@oarbusi oarbusi left a comment

Choose a reason for hiding this comment

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

LGTM

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.

🚀

@lantoli lantoli merged commit 866d5b0 into master Nov 30, 2023
@lantoli lantoli deleted the INTMDB-1321_test_suite branch November 30, 2023 16:45
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.

3 participants