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

Running release.py two times invalidates the tarball SHA256 in homebrew pull request #1020

Closed
scpeters opened this issue Sep 27, 2023 · 1 comment · Fixed by #1062
Closed

Comments

@scpeters
Copy link
Contributor

The following things occur as part of making a release with release.py:

  1. A tarball is created
  2. The tarball is uploaded to s3
  3. The tarball SHA256 is computed
  4. A branch with homebrew formula updates is created and pushed to osrfbuild/homebrew-simulation
  5. A homebrew-simulation pull request is opened using the URL and SHA256 of the uploaded tarball.

If a user runs the release.py script successfully one time and then runs it again without touching the osrfbuild/homebrew-simulation repository, steps 1-3 will succeed with a new tarball uploaded, but step 4 will fail as a branch with the desired name will already exist on the osrfbuild/homebrew-simulation repository (see Build Status https://build.osrfoundation.org/job/generic-release-homebrew_pull_request_updater/1413/).

Additionally, the tarball SHA256 in the first pull request will now be invalid. At one time we had CI for osrf/homebrew-simulation to check for these kinds of errors, but that CI hasn't worked for a while (see osrf/homebrew-simulation#1139).

@scpeters
Copy link
Contributor Author

Some approaches to solving this are to use a timestamp in the branch name so that the second invocation would open a duplicate pull request, or to identify the existing pull request and update the tarball SHA256 value

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 a pull request may close this issue.

1 participant