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

[migration-tools] release and platform branch history is not preserved when source and dest are the same. #32128

Open
nuclearsandwich opened this issue Feb 10, 2022 · 1 comment · May be fixed by #36597

Comments

@nuclearsandwich
Copy link
Member

This issue was discovered when building packages after #32036.

Since this is the first production usage of the migration tool where the source and dest distributions match, a new error has surfaced which wasn't caught during testing.

Release repositories are cloned during migration and the git-bloom-release subcommand is manually run in each one.
Before this command is run several operations are performed to set up the proper preconditions for migration.

When the source and destination rosdistro are different this block fetches bloom branches relevant to the source distribution and updates them to refer to the destination distribution.

ls_remote = subprocess.check_output(['git', 'ls-remote', '--heads', 'oldorigin', f'*{args.source}*'], universal_newlines=True)
for line in ls_remote.split('\n'):
if line == '':
continue
obj, ref = line.split('\t')
ref = ref[11:] # strip 'refs/heads/'
newref = ref.replace(args.source, args.dest)
subprocess.check_call(['git', 'branch', newref, obj])

However, when the source and destination are the same, that block does not run and as a result, the release is begun with no extant release/*, debian/*, or rpm/* branches and thus it creates new orphan branches to complete the release.

This is not wholly destructive since the release tags can be used to review the version history of the released packages but in addition to being confusing behavior this also has the result of wiping out any patches which were applied to to the release and platform branches for the current and forthcoming releases.

@ros-discourse
Copy link

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/new-packages-for-ros-2-rolling-ridley-2023-03-29/30609/4

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.

2 participants