Skip to content

fix: modify pull-through metadata requests to point at Pulp - #413

Open
am9zZWY wants to merge 2 commits into
pulp:mainfrom
am9zZWY:main
Open

fix: modify pull-through metadata requests to point at Pulp#413
am9zZWY wants to merge 2 commits into
pulp:mainfrom
am9zZWY:main

Conversation

@am9zZWY

@am9zZWY am9zZWY commented Jul 30, 2026

Copy link
Copy Markdown

Assisted By: Claude Sonnet 5

closes #412

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@am9zZWY
am9zZWY marked this pull request as draft July 30, 2026 18:38
@am9zZWY
am9zZWY marked this pull request as ready for review August 3, 2026 08:06
@dkliban

dkliban commented Aug 11, 2026

Copy link
Copy Markdown
Member

Nice fix — the approach is solid and the refactoring is clean. A few suggestions for additional test coverage:

  1. Scoped package pull-through — Run the same test_pull_through_install flow with a scoped package (@scope/package). This would exercise URL encoding in _packument_from_remote and the name/-/filename construction for names containing slashes.

  2. Local packages path (regression guard) — A test where content is already synced into the repository, then a packument request is made. The refactoring moved this code into _packument_from_local_packages; a test should verify it still returns correct tarball URLs and content_type: application/json.

  3. Pull-through with repository + remote (mixed) — A distribution with both a repository containing some cached packages and a remote. First request (no local content) should hit the remote rewrite path; after the tarball is pulled through, a second packument request should come from local packages. Verifies the handoff between the two codepaths.

  4. Remote fetch failure — Verify that an unreachable remote returns None gracefully rather than raising.

Items 1 and 2 are the highest value — scoped packages are the most likely real-world breakage, and the local path refactoring needs regression coverage.

@dkliban dkliban left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add more tests as described in the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pull-through cache not working properly

2 participants