#1719 Add rebuild_srpm option of BuildTask
Closed: Fixed by tkopecek. Opened by mizdebsk.

When submitting build from pre-existing SRPM please make it possible for build submitter to skip rebuilding SRPM.

When doing builds from pre-existing SRPM, Koji >= 1.18 spawns rebuildSRPM task to rebuild SRPM before the actual buildArch tasks. This is not necessary in most cases and only leads to waste of resources (user time, builder capacity, network bandwidth etc.). It is possible to skip rebuilding SRPM through an option in tag configuration, but users don't have any way of skipping this behaviour by themselves.

I would like to have rebuild_srpm boolean option of BuildTask with default value of None. When set to a non-default value it would override rebuild_srpm value of tag configuration. It would work in a similar way to arch_override - when set, it overrides tag arches.


Isn't it already possible to disable it in the tag configuration?

Isn't it already possible to disable it in the tag configuration?

It is indeed possible to disable this in tag configuration, but that must be done by Koji admin. Ordinary users can't edit tag configuration.

Metadata Update from @mizdebsk:
- Custom field Size adjusted to None

Maybe we can rethink policy proposal from original #1396. Being it completely optional on behalf of user seems to me to be too much benevolent, but users/tags with such policy could be usable.

Metadata Update from @tkopecek:
- Issue tagged with: discussion

Metadata Update from @tkopecek:
- Issue tagged with: feature

Then maybe allow setting rebuild_srpm for scratch builds only?

Since introduction of rebuildSRPM feature scratch builds of simple packages (where dominant step of the build is chroot initialization) take about twice as much resources as they used to. I submit a lot of scratch builds from pre-existing SRPMs that were build in Koji and are stored in /mnt/koji/packages/ - I don't upload them to /mnt/koji/work/. These SRPMs have correct dist tag et al. and rebuilding them again only wastes lots of resources.

rebuildSRPM feature was introduced in Fedora Koji deployment in October 2019. Since then, over 2 months more than 310,000 rebuildSRPM tasks were ran. This leads to signifficant use of resources for no significant gain. Most of these tasks were ran by a single user koschei, which does not benefit from rebuildSRPM tasks at all. Therefore please reconsider adding an option which would allow koschei user to submit build tasks with rebuildSRPM disabled.

$ koji call listTasks --python '{"method": "rebuildSRPM"}' '{"countOnly": True}'
310207
$ koji call listTasks --python '{"method": "rebuildSRPM", "owner": 3199}' '{"countOnly": True}'
300900

@mizdebsk Are these scratch builds (koschei)? I'm ok with your proposal about scratch builds allowing to not do this.

@mizdebsk Are these scratch builds (koschei)? I'm ok with your proposal about scratch builds allowing to not do this.

Yes, these are scratch builds submitted by Koschei from pre-existing SRPM (not uploaded to hub, but already existing somewhere under /mnt/koji/packages/)

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.21

PR #2083

Metadata Update from @tkopecek:
- Issue untagged with: discussion
- Issue tagged with: testing-ready

Metadata Update from @jcupova:
- Issue tagged with: testing-done

Commit 2bde581c fixes this issue

Commit 71832129 fixes this issue

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

Please continue any further discussion there.

Metadata
Related Pull Requests