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

Make "Update release branch" workflow fail if npm version fails #1197

Merged
merged 3 commits into from
Aug 22, 2022

Conversation

henrymercer
Copy link
Contributor

This fixes a bug in the "Update release branch" workflow that could occur when there are merge conflicts in package.json. These merge conflicts cause the npm version command to fail, but this failure was not causing the workflow itself to fail. As a result, we merged a v2 -> v1 backport that did not update the version number in package.json. The "Tag release and merge back" workflow subsequently did not update the v1 release tag, so the v1 release did not occur.

As a fix, we use subprocess.check_output instead of subprocess.run to check the exit code and fail the workflow if there are merge conflicts bad enough to prevent us from updating the package version.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner August 19, 2022 17:26
@henrymercer henrymercer mentioned this pull request Aug 19, 2022
3 tasks
Co-authored-by: Edoardo Pirovano <6748066+edoardopirovano@users.noreply.github.com>
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

LGTM, but would be good to add the whitespace change in first.

.github/update-release-branch.py Outdated Show resolved Hide resolved
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
@henrymercer henrymercer merged commit f0a1a35 into main Aug 22, 2022
@henrymercer henrymercer deleted the henrymercer/fix-release-when-package-conflicts branch August 22, 2022 09:39
@github-actions github-actions bot mentioned this pull request Aug 22, 2022
6 tasks
This was referenced Jun 23, 2023
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