#146 Koji doc: discourage use of direct chained builds
Merged 2 months ago by gotmax23. Opened 2 months ago by adamwill.
fedora-docs/ adamwill/package-maintainer-docs koji-discourage-chain-build  into  main

@@ -57,21 +57,32 @@ 

  

  [#chained_builds]

  ==== Chained builds

- WARNING: chain-builds only work when building on rawhide.

- To chain-build packages to update a released OS version,

- https://fedoraproject.org/wiki/Bodhi/BuildRootOverrides[set up an override using bodhi]

- requesting packages to be included in the proper buildroot.

- 

  Sometimes you want to make sure

  that one build has succeeded before launching the next one,

  for example when you want to rebuild a package

  against a dependency that has just been rebuilt.

- In that case, use a chain build with:

+ `fedpkg` provides a `chain-build` command to help with this.
`+fedpkg+` provides a `+chain-build+` command to help with this.

+ As explained in xref:Package_Update_Guide.adoc#multiple_packages[the Package Update Guide],

+ multi-build chains like this should be created on a side tag,

+ and you can use `fedpkg chain-build` to do the builds on the side tag.

+ 

+ To do a chained build to a side tag, first create the side tag,

+ as explained in the Package Update Guide. In the simplest case,

+ just do:

+ 

+ ....

+ fedpkg request-side-tag

+ ....

+ 

+ This will print a command you can use to wait for the side tag to be created.

+ Run that command, and when it exits, do:

  

  ....

- fedpkg chain-build libwidget libgizmo

+ fedpkg chain-build --target=side-tag-name libwidget libgizmo

  ....

  

+ replacing `side-tag-name` with the actual name of your side tag.
`+side-tag-name+`

+ 

  The current package is added to the end of the CHAIN list.

  Colons (`:`) can be used in the CHAIN parameter to define groups of packages.

  Packages in any single group will be built in parallel
@@ -81,7 +92,7 @@ 

  For example:

  

  ....

- fedpkg chain-build libwidget libaselib : libgizmo :

+ fedpkg chain-build --target=side-tag-name libwidget libaselib : libgizmo :

  ....

  

  causes `libwidget` and `libaselib` to be built in parallel,
@@ -94,6 +105,22 @@ 

  following builds are canceled,

  but the builds that already succeeded are pushed to the repository.

  

+ *Note:* It is possible to do a chained build

+ directly to the default build target for Rawhide,

+ but this is no longer recommended or reliable.

+ Building for the default Rawhide target immediately auto-creates an update,

+ and some Rawhide updates are now subject to gating tests.

+ If any package in the chain is subject to gating tests, and one fails,

+ that package will never reach _stable_
that package will never reach _stable_,

+ and the rest of the chain will not be able to build.

+ This is quite likely to happen to chains containing critical path packages.

+ When using a side tag, no updates will be automatically created,

+ and each build is immediately available in the side tag's buildroot

+ without having to pass tests first.

+ You can manually create the update once all the builds are done,

+ and the tests will not encounter dependency issues

+ if you rebuilt all the dependent packages correctly.

+ 

  [#scratch_builds]

  === Scratch Builds

  

Direct chained builds really aren't a good idea any more, now we
create updates for all Rawhide builds and apply gating tests to
some. If a build in the chain fails gating tests it will not be
pushed stable and the chain will fail.

This explains that, but also explains that you can use
chain-build --target to do a chain build to a side tag, and
this might be a nice workflow.

rebased onto 8453bc3cebf9b99f508ab109ac203f3489eadf51

2 months ago

rebased onto 0004fdc8db8116ae12df45c0617d0c67facc907e

2 months ago

Generally, this is good idea. But wouldn't it be better to put it the opposite way using the side tags by default and have there some remark that this could also be used without them, but leave it without too much details? IOW we should try to remove such warnings.

This could be the start of the chapter:


Sometimes you want to make sure that one build has succeeded before launching the next one, for example when you want to rebuild a package against a dependency that has just been rebuilt. This is called chain build and it works best with a side-tag.

...


Note: You can also use chain build without side-tags, but the usage is limited to Rawhide and has other downsides ....

yeah, that's a good point. I initially wrote this just to say DON'T USE CHAIN BUILDS! (more or less) then belatedly realized you can actually do them on side tags, so I did a late rewrite to cover that. Thinking it over from the start it'd probably be better to do it the way you suggest, indeed. I'll redo it. Thanks.

rebased onto e6deb22

2 months ago
`+fedpkg+` provides a `+chain-build+` command to help with this.

Hmm, does asciidoc also support plain backticks for inline monspace/code blocks like markdown? I thought it was only the backtick with plus-sign syntax.

Hmm, does asciidoc also support plain backticks for inline monspace/code blocks like markdown? I thought it was only the backtick with plus-sign syntax.

Ah, I guess the plain backticks syntax allows formatting within the monospace text and may require extra escaping; the one with the plus is for literal monospace text. The rest of the document uses the plain backticks, so I guess keep them as is. Sorry for the noise.

that package will never reach _stable_,

I think whether you have a comma there is a subjective call in this construction. I prefer not having one. :)

that package will never reach _stable_,

I think whether you have a comma there is a subjective call in this construction. I prefer not having one. :)

Isn't it two independent clauses separated by a conjunction?

Anyways, this looks good to me, so I'll go ahead and merge it. Thanks for the improvement!

Pull-Request has been merged by gotmax23

2 months ago
Metadata