pulp / pulp_deb

Debian repository plugin for Pulp (pulpproject.org)
GNU General Public License v2.0
61 stars 76 forks source link

Allow source files to publish at by-hash paths #1061

Open acheng-01 opened 3 months ago

acheng-01 commented 3 months ago

Refactored the previous AptByHash code to extend publishing at by-hash paths for source files.

Closes #1059

acheng-01 commented 2 months ago

I've confirmed that source files have their metadata published to /source/by-hash. In my testing I have also confirmed that the by-hash file is used upon downloading the package with apt-get.

daviddavis commented 1 month ago

Yea, I thought we had tests for apt-by-hash but it looks like we just added one for caching content to be served for apt-by-hash.

I think adding a test for apt-by-hash makes sense. I don't have a preference if we add it in this PR or a followup PR. Also, I might suggest we add a general apt-by-hash test and not one for the source files since source files are a pain to test with.

Also, how do we enable APT_BY_HASH in the test environment. Just set it here?

hstct commented 1 month ago

Also, how do we enable APT_BY_HASH in the test environment. Just set it here?

@daviddavis Yea I think that should do it.

It might be sufficient to add a test here and see if we can just download the correct files from the by-hash folders? That way it should be pretty simple to test both standard and source packages. The default repository in the test fixtures provides both types of packages.

acheng-01 commented 1 month ago

Thanks for chiming in everyone. I'll look into adding tests in within the next week or so as part of this PR!