Skip to content

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 <[email protected]>
@henrymercer henrymercer enabled auto-merge August 19, 2022 17:40
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.

@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.

4 participants