#793 RFE: Shortcircuit module build on failure
Closed: Fixed Opened by puiterwijk.

It would be great if MBS would abandon (cancel in koji) an entire batch of module builds as soon as a number (2? 5?) of the builds in that batch have failed, and cancel the tasks in the current batch.
The reason this would be appreciated is because currently, if there is an issue in the dependencies of the previous batch, MBS just lets all of the other packages in the current batch build, but they will all (or a significant amount) be doomed for failure, leading to a lot of failed koji builds.

And example set is:
- https://koji.fedoraproject.org/koji/taskinfo?taskID=23139041
- https://koji.fedoraproject.org/koji/taskinfo?taskID=23139081
- https://koji.fedoraproject.org/koji/taskinfo?taskID=23139106

These all failed in the same way (and there were 40 more), so as soon as 2 or something failed, the rest could have been abandoned as the entire module build should fail anyway.

Lots of failed koji builds in a period of time are reported to the infrastructure team as a likely problem with koji: zodbot | PROBLEM - koji01.phx2.fedoraproject.org/Check Koji is CRITICAL: Koji: CRITICAL failed builds: 43 (noc01), so we would much appreciate it if you can cut down on the number of times this happens because of an error in one module definition,


As I noted on IRC, you can actually detect dependency problems (which will most likely require rebuilding the previous batch anyway, so no retaining of builds), because the koji task status says BuildError: error building package (arch noarch), mock exited with status 30; see root.log for more information.
So maybe if you see that status in two builds, you can just abandon the current batch?

I'd actually dare say that if any of the builds in a batch error out in root.log (building the buildroot), you can abandon the entire batch, since if there's dep problems in any package in the batch, nothing from the entire batch should be reused anyway.

When a component fails, the module build transitions to the failed state, which triggers all components to be cancelled. This was not going through because of a bug that this PR addresses:
https://pagure.io/fm-orchestrator/pull-request/799

Metadata Update from @mprahl:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/mbs/issues/793

Please continue any further discussion there.

Metadata