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: simplify production release reverts #678

Merged
merged 7 commits into from
Jun 12, 2024

Conversation

patheard
Copy link
Member

@patheard patheard commented Jun 6, 2024

Summary

Update the Production Terraform workflows so that a release can more easily be reverted. Now all that will be required to rollback a failed release is to revert the Release Please PR.

The way this works is as follows:

  1. When a PR that updates version.txt is opened, the TF plan workflow will check if it's a Release Please branch. If yes, the branch is used to perform the TF plan. Otherwise it is assumed to be a revert PR and the tag specified in version.txt is used for the TF plan operation.

  2. On merge of a PR with a version.txt change, the TF apply workflow will wait for the git tag it specifies to exist. For a normal release flow, this will be once the release_generator workflow finished. For a revert PR, the tag will already exist.

Additionally, the code checkout step has been removed from the update-lambda-function-image job as it is not needed.

Related

Update the Production Terraform workflows so that a release
can more easily be reverted.  Now all that will be required to
revert a failed release is to revert the Release Please PR.

The way this works is as follows:
1. When a PR that updates `version.txt` is opened, the TF plan
workflow will check if it's a Release Please branch.  If yes, the
branch is used to perform the TF plan.  Otherwise the tag
specified in `version.txt` is used for the TF plan operation.

2. On merge of a PR with a `version.txt` change, the TF apply
workflow will wait for the git tag it specifies to exist.  For a
normal release flow, this will be once the `release_generator`
workflow finished.  For a revert PR, the tag will already exist.

Additionally, the code checkout step has been removed from
the `update-lambda-function-image` job as it is not needed.
@patheard patheard self-assigned this Jun 6, 2024
@patheard patheard marked this pull request as ready for review June 7, 2024 19:26
Copy link
Contributor

@craigzour craigzour left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work :)

@patheard patheard merged commit f8af121 into develop Jun 12, 2024
4 checks passed
@patheard patheard deleted the feat/support-prod-rollback branch June 12, 2024 14:55
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.

2 participants