-
Notifications
You must be signed in to change notification settings - Fork 178
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: Allows user to specify to use an existing tag for release #2053
Conversation
.github/workflows/release.yml
Outdated
@@ -28,6 +30,7 @@ jobs: | |||
uses: ./.github/workflows/acceptance-tests.yml | |||
with: | |||
atlas_cloud_env: "qa" | |||
ref: ${{ inputs.use_existing_tag == 'true' && inputs.version_number }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref: ${{ inputs.use_existing_tag == 'true' && inputs.version_number }} | |
ref: ${{ inputs.use_existing_tag == 'true' && inputs.version_number || github.ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I agree w/ Leo on simplifying the boolean expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we can also revise this ticket https://jira.mongodb.org/browse/CLOUDP-221414 as I believe it would no longer be relevant.
@@ -10,6 +10,8 @@ on: | |||
required: true | |||
skip_tests: | |||
description: 'Skip QA acceptance tests, define value to `true` to explicitly skip' | |||
use_existing_tag: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a small note in our release documentation on when this scenario could be useful or comes into picture?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
@@ -15,6 +15,7 @@ We pre-release the provider to make for testing purpose. **A Pre-release is not | |||
- Using our [Release GitHub Action](https://github.com/mongodb/terraform-provider-mongodbatlas/actions/workflows/release.yml) run a new workflow using `master` and the following inputs: | |||
- Version number: vX.Y.Z-pre | |||
- Skip QA acceptance tests: Should be left empty. Only used in case failing tests have been encountered in QA and the team agrees the release can still de done, or successful run of QA acceptance tests has already been done with the most recent changes. | |||
- Using an existing tag: Should be left empty (default `false` creates a new tag from `master`). This should be set to `true` only if you want to re-use an existing tag for the release and the tag name should adhere to our version number format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add in the comment that this will typically be useful when the release process failed (e.g. because tests failed) and want to try to release again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's necessary tbh as long as the tag exists for any use-case this can be used anyway
…ted (#2052) * schedule compatibility matrix first day of month * WIP: test if status can be retrieved * test * test echo job status * change * Revert "change" This reverts commit 4b0e49e. * Revert "test echo job status" This reverts commit 4a83862. * test getting outputs of matrix * result * send slack * checkout step * fix name * correct json * formating * Revert "formating" This reverts commit f584822. * format * try * Revert "try" This reverts commit 7029f54. * use cat * Revert "use cat" This reverts commit 9503cd2. * remove unnecesary double quote * try cat * Revert "try cat" This reverts commit a2df8ff. * return json * unify json * fix * enrich message * TEMP: tag oncall on success * chore: Updates Atlas Go SDK (#2044) * build(deps): bump go.mongodb.org/atlas-sdk * fix tags * undo changes to admin20231001002 * API breaking change fixes --------- Co-authored-by: lantoli <[email protected]> * chore: Follow-up to Atlas SDK upgrade (#2051) * remove unused NewGroup * unify List call thanks to new API * refactor: Uses mocks on admin.APIClient for Project+Teams+ClustersAPIs instead of custom service (#2045) * refactor: Uses mocks on admin.APIClient instead of custom ClusterService (#2056) * fix: Fixes `network_container` resource update (#2055) * failing test * recreate resource if provider_name changes * fix update * allow update in place when provider_name changes * fix regions error handling * refactor tests checks * refactor checks in mig tests as well * fix change check * use MONGODB_ATLAS_PROJECT_ID (#2060) * chore: Removes old service from mockery (#2063) * feat: Allows user to specify to use an existing tag for release (#2053) * remove TEMP oncall tag on success * initialize oncall_tag * send notification when test suite fails * revert back testing change * remove temporary trigger of action * use oncall tag from secrets * Revert "use oncall tag from secrets" This reverts commit 5a7944f. * use SHA * new line * make oncall tag a secret --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: lantoli <[email protected]> Co-authored-by: Espen Albert <[email protected]> Co-authored-by: maastha <[email protected]>
Description
Currently in case of any failure during release, we need to manually delete the created tag and re-run release workflow at which point a new tag is created from master. It is possible that other PRs are merged to master during this time which causes below issues:
This PR allows us to specify if we want to use an existing tag during TF release so any new PR merges to master wouldn't impact an ongoing release.
Link to any related issue(s):
Type of change:
Required Checklist:
Further comments
Testing:
use_existing_tag
not set (default) -> New tag was created (test run)use_existing_tag=true
-> Existing tag was used (test run), see below partial logs: