juhp / fbrnch

Tool to update fedora packages branches
https://hackage.haskell.org/package/fbrnch
GNU General Public License v2.0
23 stars 3 forks source link

RFE: adding chainbuild support #25

Open michel-slm opened 2 years ago

michel-slm commented 2 years ago

Right now fbrnch parallel seems to orchestrate the parallel Koji builds on the client side, rather than getting the Koji server to do a chain-build.

This seems to not be ideal, in case e.g. the build is triggered from a laptop with intermittent network connectivity (e.g. you trigger the build when in a meeting, ETA is 5 hours, and you need to go somewhere else).

Given that fbrnch -n already shows the right build order, and fedpkg chain-build supports parallel builds (by grouping the sequence of parallel buildable packages with the ':' separator), can this support be added?

Ideally fbrnch parallel then keep note of the Koji build ID, and in case it was resumed later, just check on that Koji task so it can create the Bodhi update later even if the computer it's running on was disconnected in-between.

michel-slm commented 2 years ago

alternatively, if fbrnch parallel -n spits out the output in a format that can be easily converted to what fedpkg chain-build takes, I can happily just use fbrnch as the dependency calculator engine

juhp commented 2 years ago

Yeah - okay I need to think more on this: I am afraid it probably won't make it into the coming release but I could try for the following one.

Note that parallel builds can be resumed though: fbrnch will pretty much pick up from where it left off. Anyway I don't mind supporting chain-build in principle - I do think it makes sense, however the long term goal has been to be able to build in parallel faster driven from the client side directly following the dependency DAG, though maybe that should be cli option - currently there is not so much difference there it's true.

In the meantime you could use fbrnch parallel -n or rpmbuild-order chain to get the chain-build grouping/output.

(It is also worth noting that fbrnch parallel does additional checks not performed by fedpkg which might avert some possible build failures. Another difference is that fbrnch parallel doesn't require pushing all your packages' commits upfront. Nor do all current builds get cancelled if one of them fails.)

juhp commented 2 years ago

Arguably this could be closed with the current fbrnch sort --chain ... output support, but we can keep it open a bit longer.

juhp commented 23 hours ago

In the just released 1.5, fbrnch sort now defaults to chain-build format output.

Further fbrnch parallel can also consume chain-build package args now.

(Apart from being server-side, I don't feel fedpkg chain-build is that great though, eg a single build failure will cause all other successful ongoing builds to fail, missing sources files are not detected (at least last I tried, it's been a while. Once fbrnch parallel can do DAG-based building it could be a considerable speed-up in some cases)