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

Add support to report issue to ROS gz_*_vendor repositories in release.py #1150

Closed
wants to merge 8 commits into from

Conversation

j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Jun 3, 2024

Wait to process #1148 first

This PR adds support in release.py to automatically create issues in the gz_*_vendor repositories when a new release for any gazebo libraries is being created:

  • To detect if a vendor repository is affected by a the release in process, the release.py uses the script jenkins-scripts/dsl/tools/get_collections_from_package_and_version.py in Include a script to obtain gazebo releases for a given library #1148 that is able to return Gazebo releases given a library a version. To known the vendor repository from a Gazebo releases the script uses a simple approach by now defining a map of gazebo-release <-> ros-distro ROS_VENDOR = {'harmonic': 'rolling'} that assumes also that vendor repository branches are named in the same way than the ROS release names.
  • To create the issues the release.py code relies on calling the gh tool https://cli.github.com/ . If the command is not present in the system, the release.py script will ask the user to create the issue manually.

The PR also implements an output parsing for detecting if the ROS vendor commands are being processed correctly for a variety of options.

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
release.py Outdated
Comment on lines 561 to 575
def create_issue_in_gz_vendor_repo(args, ros_distro):
gz_vendor_repo = get_vendor_github_repo(args.package)
title = f'Update version for {ros_distro} to the latest tag of {args.package}: {args.version}'
body = f'The {get_canonical_package_name(args.package)} repository tagged a new: {args.version} '\
'This repository needs to be updated accordingly for the branch {ros_distro}:\n'\
' * Sync to the new version in CMakelists.txt \n'\
' * Bump the patch version in package.xml \n'\
' * Run the release process for this ROS package'
_out, _err = create_issue_in_repo(gz_vendor_repo, title, body)
if _err:
print(' !! An error happened running the "gh issue" cmd. Do not run this script again.\n'
' Please create the issue manually. The error reported was:\n'
f' {_err}')
sys.exit(1)
return _out
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to create a pull request instead? All we have to do is run https://github.com/gazebo-tooling/gz_vendor/blob/main/create_gz_vendor_pkg/create_vendor_package.py and give it the up-to-date package.xml from the upstream Gazebo library.

@j-rivero
Copy link
Contributor Author

Is it possible to create a pull request instead? All we have to do is run https://github.com/gazebo-tooling/gz_vendor/blob/main/create_gz_vendor_pkg/create_vendor_package.py and give it the up-to-date package.xml from the upstream Gazebo library.

Moving to a new PR for the creation of automatically PRs for updating versions.

@j-rivero j-rivero closed this Jun 11, 2024
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.

2 participants