Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add include/exclude filter support for pull-through caching #747

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

gerrod3
Copy link
Contributor

@gerrod3 gerrod3 commented Oct 11, 2024

wip

Copy link

stale bot commented Jan 15, 2025

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

@stale stale bot added the stale label Jan 15, 2025
Copy link

stale bot commented Feb 14, 2025

This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.

@stale stale bot closed this Feb 14, 2025
@gerrod3 gerrod3 reopened this Feb 20, 2025
Copy link

stale bot commented Feb 20, 2025

This pull request is no longer marked for closure.

@stale stale bot removed the stale label Feb 20, 2025
@gerrod3 gerrod3 force-pushed the pull-through-filters branch 3 times, most recently from 54cdf1b to f7f6068 Compare February 25, 2025 16:03
@gerrod3 gerrod3 marked this pull request as ready for review February 25, 2025 16:14
@gerrod3 gerrod3 force-pushed the pull-through-filters branch 4 times, most recently from 89415ed to 11a9083 Compare March 24, 2025 15:22
if d.headers["content-type"] == "application/vnd.pypi.simple.v1+json":
page = ProjectPage.from_json_data(json.load(open(d.path, "rb")), base_url=remote.url)
else:
page = ProjectPage.from_html(package, open(d.path, "rb").read(), base_url=remote.url)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not requesting a change, just a question:

Are JSON responses from the simple API a recent addition? How could it be HTML or JSON?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep new PEP: https://peps.python.org/pep-0691/. The accept headers specify that we accept both the json + html (normal) response with a preference for the new json format.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, that's an improvement tbh.

@gerrod3 gerrod3 force-pushed the pull-through-filters branch from 11a9083 to 5a91413 Compare March 24, 2025 15:50
@gerrod3 gerrod3 force-pushed the pull-through-filters branch from 5a91413 to fc82100 Compare March 24, 2025 16:07
@gerrod3 gerrod3 merged commit 1530d2f into pulp:main Mar 24, 2025
12 checks passed
@gerrod3 gerrod3 deleted the pull-through-filters branch March 24, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for remote's includes/excludes in pull-through caching
2 participants