gazebo-tooling / release-tools

8 stars 9 forks source link

bump_dependency.bash should create pull requests in topological order #585

Open scpeters opened 2 years ago

scpeters commented 2 years ago

The bump_dependency.bash iterates over a list of packages and their dependents to bump versions. It currently iterates over the dependent packages in alphabetical order, but it would be better to iterate in topological order. For #554 I ran the script multiple times to select packages at the appropriate topological level.

# order in which script presented packages for pull requests
ign-msgs
ign-fuel-tools
ign-gazebo
ign-gui
ign-launch
ign-sensors
ign-transport
ign-garden

The first time through, I selected the ign-msgs pull requests and waited. Once those were merged, I selected ign-fuel-tools and ign-transport and ended the script. I ran it again and selected ign-gui and ign-sensors and ended the script. It would be convenient to run the script once and pause at each topological level to wait for pull requests to be reviewed and merged.

methylDragon commented 2 years ago

As an interim solution to this issue, to aid in topological ordering of larger dependency trees, I wrote a python script to generate topological level-groups of packages on gazebodistro (with each group constituting a set of PRs to merge.)

Following the script's outputs, it should guarantee (I hope..) PR merging safety (thought it might momentarily break downstream packages, as expected.)

But it might be less efficient, requiring a larger number of PR batches, since there's no logic to intelligently merge PR batches across different topological levels if safe.

The script:

https://gist.github.com/methylDragon/357080fda22ad73824f42a5288841131

methylDragon commented 2 years ago

Example output for bump_targets: ["ign-cmake", "ign-tools", "ign-plugin", "ign-utils"]

8 ['ign-cmake']
7 ['ign-utils']
6 ['ign-tools', 'ign-math']
5 ['ign-plugin', 'ign-msgs', 'ign-common']
4 ['sdformat', 'ign-transport', 'ign-rendering']
3 ['ign-sensors', 'ign-physics', 'ign-gui', 'ign-fuel-tools']
2 ['ign-gazebo']
1 ['ign-launch', 'gazebo']