Skip to content

MR Reachability Scripts

David Diederich requested to merge add-mr-reachability into main

What is Reachability

This establishes release scripts for determining MR reachability and computing the appropriate next version based on the information.

The main question is to determine whether an MR has been merged into the current branch or not. To determine that, I'm using the merge commit SHA and checking to see if it is an ancestor of the current branch or not. This is similar to the approach used by git branch --merged.

Why do we care

There's two intended purposes for this analysis.

The first use case is library versioning. In order to implement osdu/platform/home#52, we need to know whether the MRs merged into the default branch have already been part of a release, and if not, how impactful they are. To that end, the analysis finds all MRs that are reachable by the default branch but not reachable by the latest tag. Of those, we determine whether they are major, minor, or patch level MRs; then compute an appropriate next version for the library.

The second use case is service releases. These are done in milestones, with many MRs being part of the release. Analyzing reachability to the release branch allows the release coordinators to know what things have been successfully moved to the release branch, so they know when all the milestone's work is done and tags can be created.

Related Implementation

The library release CI logic is done in osdu/platform/ci-cd-pipelines!1047.

The service release logic is still mostly done by the hands of release coordinators. Some of the logic is moved here, evolving towards a more automated release process, but it isn't fully ready yet. In particular, we need a way to detect cherry-pick MRs reliably without involving human eyes.

Edited by David Diederich

Merge request reports