gazebo-tooling / release-tools

8 stars 9 forks source link

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

Closed scpeters closed 8 months ago

scpeters commented 9 months ago

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 https://github.com/osrf/homebrew-simulation/issues/1139).

scpeters commented 9 months ago

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