#250 Submit builds from stream branch
Merged by cqi. Opened by cqi.
cqi/fedpkg submit-builds-from-stream-branch  into  master

Download 250.patch

This patch introduces the ability to submit multiple builds to Koji from
stream branch based on configured build targets in local package config
file. This applies to fedpkg build and chain build and scratch build
still work as normal.

The config file is optional. Without the config, packages could build
from stream branch with global option --release and fedpkg build works
as normal if there is no config file. If config file is created and
build targets is set properly, fedpkg is able to read those targets and
submit corresponding builds to Koji at once.

Signed-off-by: Chenxiong Qi cqi@redhat.com

Depend on https://pagure.io/rpkg/pull-request/349

There are self.cmd.load_target calls in test/test_commands.py. Shouldn't they be removed also?

Is this something that needs to be clarified before merge?

Currently this is only limited to builds done from stream branches. Is there some reason why not allow for example builds for all releases from master branch?

Also currently it only expands for real builds. Why not for scratch builds too? I think this could be surprising/confusing for users: they submit a scratch build, which runs one task, and then a real build, which suddenly runs many tasks.

I think the type has to be used here, because otherwise it could be mixing branches for different things, since the same name could be used in multiple namespaces. For example there's mongodb as rpm, module and container.

rebased onto a9395f3d2afc48cfbc802826843ea14d58a2bf8b

There are self.cmd.load_target calls in test/test_commands.py. Shouldn't they be removed also?

I think TestLoadTarget could be reserved, because it covers build_target.

According to the feedback from a packager who tried this new feature, I learned that type parameter should not be included, at least for current stage. There is a package libuv, which has stream branches 1 and 1.20[1], but both of them have type rpm. And some other packages could have stream branches which have type module in PDC. Not sure why it is.

Without passing type, all branches will be returned, then Fedora and EPEL release branches will be filtered out because they have known format. Following return statement does that filter.

[1] https://pdc.fedoraproject.org/rest_api/v1/component-branches/?global_component=libuv&fields=name&fields=type&fields=active

rebased onto 5cf4f7ed215e2623845976b7aa97cf977f9bb4ce

Typos are fixed.

Currently this is only limited to builds done from stream branches. Is there some reason why not allow for example builds for all releases from master branch?

No. This implementation is for FACTORY-1886, whose scope is only for build command currently. pingo also mentioned similar idea. I agree with this idea as well. The summary is, to submit builds from master branch for all (or configured) Fedora and EPEL releases, and if only need to build for a specific release, just checkout to release branch, merge from master and then build. Or global option --release is also usable.

I believe this behavior will save much effort for packagers, especially for me.

BTW, what does it mean by "example builds"?

Also currently it only expands for real builds. Why not for scratch builds too? I think this could be surprising/confusing for users: they submit a scratch build, which runs one task, and then a real build, which suddenly runs many tasks.

I thought about this issue as well. However, as mentioned above, the scope is for build command for current stage, so I don't make this change to scratch build. If packagers would like to have it for scratch build, I'm happy to add it.

Ok, that explanation makes sense to me. As I understand it, this is currently a minimal work to get things working, and it can be extended in the future. I'm fine with that. :thumbsup:


BTW, what does it mean by "example builds"?

I meant … allow (for example) builds …, not … allow for (example builds) ….

As I understand it, this is currently a minimal work to get things working,

Exactly.

rebased onto ad12636c746b875f01fd5bc3b5d9b84f72d48084

rebased onto 6ce472066b08c11e0456c0a40c7b89ad0d18619d

rebased onto bcbb337e5076f8edad332067a64b7d4e6da279b6

Conflicts are fixed. Going to merge.

Pull-Request has been merged by cqi

Metadata