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

chore: Improve hot-fix & release process to generate a PR for merging back to main #13044

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

jimblanc
Copy link
Contributor

@jimblanc jimblanc commented Feb 22, 2024

Description of changes

This PR improves our hot-fix and release processes by reducing friction when unreleased changes are present on main.

It makes the following changes to the process:

  • Generates a temporary merge branch to eliminate risk of potentially merging unreleased changes on main into release
  • Creates a PR for merging the temporary merge branch back into main upon conclusion of a release

Benefits of this process:

  • Don't need to worry about wiping out unreleased changes on main when executing a hot-fix
  • No longer would need to freeze main when executing releases (beyond perhaps allowing e2e tests to stabilize)

This change will be accompanied with corresponding runbook changes & team training sessions.

Issue #, if available

Description of how you validated changes

Tested workflow on my fork.

Example of generated PR: jimblanc#5
Example workflow execution: https://github.com/jimblanc/amplify-js/actions/runs/8008326884/job/21874530318

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jimblanc jimblanc marked this pull request as ready for review February 22, 2024 17:26
@jimblanc jimblanc requested a review from a team as a code owner February 22, 2024 17:26
TEMP_BRANCH_NAME: ${{ needs.deploy-prep.outputs.branch_name }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
run: |
git checkout -b $TEMP_BRANCH_NAME
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we couldn't create a merge PR directly from the release branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to reduce risk from the "Update branch" button, which in theory would pull in unreleased changes from main directly into the release branch. Even if we turn that branch protection rule off ("Require branch to be up to date before merging") on main, I still think it's a little safer.

@jimblanc jimblanc merged commit 2e460c0 into aws-amplify:main Feb 22, 2024
30 checks passed
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.

None yet

3 participants