#215 Supply namespace to lookaside
Merged by lsedlar. Opened by lsedlar.
lsedlar/rpkg dg-namespace-lookaside  into  master

Download 215.patch

If the dist-git server is configured to be namespaced, we should send the full name including namespace so that non-default namespaces can use lookaside as well.

This should work with Fedora dist-git immediately (the server can handle the namespaced names, maybe the directory for the lookaside would need to be created).

For rhpkg we will need to make changes on the server to work with the namespace.

rebased

I have updated the pull request to use a separate option. This should avoid breaking rfpkg which implements the namespaces on their own (but it should be fairly easy to adapt to this usage scheme).

Soliciting feedback from @pingou, @pbabinca and @kwizart.

Luboš, I'm wondering if I understand current state. It isn't possible to use lookaside for non-rpms? I was under impression that files in lookaside are indexed by repo name, filename and its hash. So currently it would just mean that two repos with same name but different namespace will end up in the same bucket.

@pbabinca Not really, at least in Fedora and internally there is a check that the repo with the given name must exist, and the check is done against rpms namespace.

rebased

Additional comment from @pbabinca was a suggestion to pass the name and namespace around separately (two variables, two fields in the web request). While I agree that would be cleaner design, it would mean more invasive change both on the client and the server. Particularly Fedora upload.cgi would no longer be able to take advantage of this without changes, and would potentially break downstream users of rpkg.

FTR, the change looks fine as is, I understand the desire to have two fields instead of one but minimizing the changes is also quite interesting.

rebased

rebased

Pull-Request has been merged by lsedlar

Metadata