zeromq / zproject

CLASS Project Generator
Mozilla Public License 2.0
149 stars 104 forks source link

Making releases based on specific dependency branches is complicated #1217

Closed jimklimov closed 4 years ago

jimklimov commented 4 years ago

Zproject and its library of known_projects.xml really helps get a multi-component project including its git/rpm/deb/... dependencies off the ground... as long as you are following "master" (or equivalent default) git branches of the projects you are using, and in case of known projects - take them from the common upstream repository.

Due to peculiarities of our own project's release and maintenance strategy, this approach did not work our of the box - but luckily, we can override project.xml as it is being parsed by adding <use tag contents to inject the needed repository (for forked upstreams) and "release" branch name. We can even nest the use-in-use to ensure(*) that prerequisites get built on e.g. travis in correct order, when building from scratch and without packages.

With 50+ (and growing) components comprising our "distributed monolith" product codebase, it becomes quite tedious to branch and update all the "release" attributes and regenerate zproject's to take into account that they need to checkout that bolted-down source version whenever needed. The overall set of components and their interdependencies also evolve, so preparing a release was also our last chance to make sure every component's project.xml trees made sense on the given month. Painfully, it took a couple of man-weeks to branch in order (and sanity-check) the tree of components involved in a release.

We theorized about some solutions, and it boiled down to a few possibilities, most with some downsides:

Our team members progressed in the last listed direction, that we'd PR shortly.

Since it is a complex problem with no apparent perfect solution, I separated the problem description from the PR so this can be discussed and maybe progressed independently of that solution.

jimklimov commented 4 years ago

CC @perrettecl @boricj @stark-dev

boricj commented 4 years ago

It's been a while since I've worked on that, but one initial design choice to note is that the recursive ci_dependencies.sh mechanism is backwards-compatible with non-upgraded repositories, as long as all of their recursive dependencies are specified in the topmost project.xml file. This allowed a gradual and seamless roll-out within the 42ity project without regressions nor breakages.