#146 Run Koji scratch builds with --background
Merged by zuul. Opened by adamwill.
adamwill/zuul-distro-jobs scratch-build-background  into  master

Download 146.patch

This gives them a lower priority. Per @kevin, scratch build tasks
from dist-git PRs (both from this zuul pipeline and the Fedora CI
pipeline) are currently more or less DoSing Koji. Running them
with --background gives them a lower priority, which should help
alleviate the pressure somewhat.

Signed-off-by: Adam Williamson awilliam@redhat.com

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/73b0cb7c4ce34bd192ab13d14214ca81

I think that we'll need a new task that wait for the koji scratch build to finish.

Currently the next task get the task id from this command output (is it still possible with that option enabled ?), then we fetch the artifacts using the task id as reference, however we need to wait for the background build to complete before fetching the artifacts. Do you see a wait to do this ? perhaps there is a command to get task status ?

The name of the arg is misleading, I guess. It doesn't literally run it as a 'background task' locally - it doesn't exit immediately after executing the command, without waiting for the build to happen. That's what --nowait does. --background simply assigns the Koji task a lower priority. Other than that it doesn't change anything, it still waits for the task to complete before exiting. See https://pagure.io/koji/blob/5d25e10a493cdcd93b9c8973f9769d0cb1d24d26/f/cli/koji_cli/commands.py#_629 - literally all it does is change that one variable.

Ok, thanks for the infos so let's merge and see how it behaves, I'll revert if that have unexpected behavior.

Metadata Update from @fbo:
- Pull-request tagged with: gateit

Build succeeded (gate pipeline).
https://fedora.softwarefactory-project.io/zuul/buildset/303c1ea3370a4108a5cea3b6b3de8fed

Pull-Request has been merged by zuul

I see the priority is now 25 https://koji.fedoraproject.org/koji/taskinfo?taskID=117946369 compared to 20 before https://koji.fedoraproject.org/koji/taskinfo?taskID=117945442 the landing of the patch. I guess that's expected ?

yes, AIUI, higher number == lower priority.

Metadata