#214 Allow container builds from any namespace
Closed by lsedlar. Opened by maxamillion.
maxamillion/rpkg container_namespace  into  master

Download 214.patch

Previously rpkg enforced a "%s-docker-candidate" koji tag for any
container-build such that "%s" was the DistGit branch unless there
was a target override passed. This patch allows for the DistGit
namespace to be inherited into the koji tag making it
"%s-%s-candidate" such that "%s-%s" % (DistGitBranch,
DistGitNamespace).

Signed-off-by: Adam Miller maxamillion@fedoraproject.org

rebased

I fixed something and pushed on a rebase, but it's not rerunning the jenkins job. I'm not sure how to kick that off for testing.

It would be nice to refactor load_ns_module_name to make it and load_ns share the same code and logic.

Looks return is not necessary.

How about to put these lines of code into a separate property and reuse it.

@property
def container_build_target(self):
    ...

@maxamillion Can you add tests as well?

Hi @maxamillion Can you introduce some background of this change of why to allow building docker container from any namespace not only from container/?

I think that the namespace is too implementation specific to be in rpkg, it should be up to fedpkg, centpkg, etc to limit what namespaces are allowed for that instance

Apologies for the delay here, I was traveling. The background is that Fedora Atomic WG has targeted the move to the container namespace in DistGit and in pkgdb in order to make the container namespace be generic for all OCI Compliant container implementations instead of a specific one. Also the change I introduce remains backwards compatible to the best of my knowledge.

The code handling --module-name option in pyrpkg/cli.py should also be updated to set the ns property.

Merged in #219 with a few changes to address the comments here.

Pull-Request has been closed by lsedlar

@lsedlar I just realized today because someone ping'd me on irc that #219 does not actually solve the problem I was trying to solve here. Can this be revisited?

It should have changed the build target to '%s-%s-candidate' % (self.branch_merge, self.ns) which seems like what you wanted. However the patch was not released yet. It's included in rpkg-1.49-5, which is still in updates-testing.

@lsedlar My mistake. Thanks.

Metadata