Conversation
Add a sanity check to verify that the GitHub CLI (gh) tool is available in PATH before proceeding with the release. This prevents the release process from failing late in the process when gh is needed for creating PRs in vendor repositories. Fixes #1433 Generated-by: Claude Opus 4.5
The built-in jenkins executor that runs the _releasepy job doesn't have gh installed, causing it to fail the sanity check. This runs the gh sanity check only in cases when a ROS vendor package PR may be opened. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
I think that uses the https://build.osrfoundation.org/job/_releasepy/307/parameters/ |
|
You're right. I only checked out your branch locally. Not sure what is a good way to test this |
there are multiple contexts in which
|
to test the nightly scheduler, I first created another "broken" branch from 8fb24af (without the fix in e1c2ef3) and ran a dry-run nightly scheduler job, which correctly failed: then I ran a dry-run nightly scheduler from this branch and it passed: |
to test this, someone should try a dry-run release.py invocation without
to test this, I think we would need to run a |
if we added |
| # If only the process of ROS vendor package is set, just do it | ||
| if args.bump_ros_vendor_only: | ||
| # gh is needed for ROS vendor package PR | ||
| sanity_check_gh_tool() |
There was a problem hiding this comment.
Although the implementation works, I would prefer to avoid calling the sanity checks in the main logic and do that unconditionally at the begging. The sanity check should know if it needs to be applied or skipped. Something like master...jrivero/restore_gh_check .
I think that is going to be easier to maintain and save some lines to read in the logic.
A sanity check for presence of the
ghtool was recently added in #1436 and reverted in #1443. This is an attempt to restore the sanity check by only checking forghin cases when a ROS vendor package PR may be opened byprocess_ros_vendor_package().This should be tested before merging.