Fix package name normalization for package pypi json view#717
Conversation
|
I will try to test this patch today. |
| remote = python_remote_factory(includes=["oslo.utils"], url="https://pypi.org") | ||
| repo = python_repo_with_sync(remote) | ||
| distro = python_distribution_factory(repository=repo) | ||
| # Test pulp 2 pulp full sync w/ live pypi apis |
| pub = python_publication_factory(repository=repo) | ||
| distro2 = python_distribution_factory(publication=pub) | ||
| remote3 = python_remote_factory(includes=[], url=distro2.base_url) | ||
| repo3 = python_repo_with_sync(remote3) | ||
| summary2 = python_content_summary(repository_version=repo3.latest_version_href) |
There was a problem hiding this comment.
pulp_python can distribute with and without publications?
What is the difference? Can we deprecate and remove publications?
There was a problem hiding this comment.
Yep, ever since I added the live api to support twine uploads publications were no longer necessary. Publications are still around to remain backwards compatible. The main difference is that publications are slightly more performant since we don't have to dynamically generate the simple files during pip installs. During pulp2pulp syncs it really is no different then the live api.
We probably could deprecate them, I would want to ask the community first if they would be okay with this. (Probably would also want to do some testing to see how much of a performance hit it would be).
| remote2 = python_remote_factory(includes=[], url=distro.base_url) | ||
| repo2 = python_repo_with_sync(remote2) | ||
| summary = python_content_summary(repository_version=repo2.latest_version_href) | ||
| assert summary.present["python.python"]["count"] > 0 |
There was a problem hiding this comment.
I'd love to see a bit more explanation here, why this assertion actually tells me that everything is ok. Maybe we need a short explanation of the bug that was fixed to describe that accurately.
Should we not also see the exact same number of content as in the repo here?
There was a problem hiding this comment.
You're right we should see the same amount, forgot to add the check.
|
I can confirm this code change fixes the issue in our Katello setup. I added the fix to both the Katello server and the proxy server for the Pulp to Pulp sync (not certain if it was needed on both ends), and now python packages with dot in the name also appear in the Pulp distribution on the proxy. |
|
@gerrod3 Any chance you can back-port this fix as far back as 3.11 or even 3.10 once it is reviewed and merged? |
|
I see only 3.11 in the supported branches. Do we need to adjust that? |
I am going to say "no". If it would have been trivial to backport to 3.10 I would have asked for it, but we mainly need 3.11 (used by Katello >= 4.13 with pulpcore 3.49). => I am happy with a back-port down to 3.11! |
8a670b8 to
4880949
Compare
| python_distribution_factory, | ||
| python_content_summary, | ||
| ): | ||
| """Test that Pulp can handle syncing packages with wierd names.""" |
There was a problem hiding this comment.
| """Test that Pulp can handle syncing packages with wierd names.""" | |
| """Test that Pulp can handle syncing packages with weird names.""" |
Or even more percise: "handle packages that contain dots"
Backport to 3.11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply fc43b4b on top of patchback/backports/3.11/fc43b4b253dbec5931d6a230296942e4ba52ec3e/pr-717 Backporting merged PR #717 into main
🤖 @patchback |
Backport to 3.12: 💚 backport PR created✅ Backport PR branch: Backported as #725 🤖 @patchback |
Fix package name normalization for package pypi json view (cherry picked from commit fc43b4b)
…dbec5931d6a230296942e4ba52ec3e/pr-717 [PR #717/fc43b4b2 backport][3.12] Fix package name normalization for package pypi json view
Fix package name normalization for package pypi json view (cherry picked from commit fc43b4b)
…253dbec5931d6a230296942e4ba52ec3e/pr-717 Backport #717 to 3.11
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply fc43b4b on top of patchback/backports/3.10/fc43b4b253dbec5931d6a230296942e4ba52ec3e/pr-717 Backporting merged PR #717 into main
🤖 @patchback |
Fix package name normalization for package pypi json view (cherry picked from commit fc43b4b)
Fix package name normalization for package pypi json view (cherry picked from commit fc43b4b)
Fix package name normalization for package pypi json view (cherry picked from commit fc43b4b)
…b253dbec5931d6a230296942e4ba52ec3e/pr-717 [PR #717/fc43b4b2 backport][3.10] Fix package name normalization for package pypi json view
fixes: #716