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 support for remote's includes/excludes in pull-through caching #706

Open
lubosmj opened this issue Jul 19, 2024 · 1 comment · May be fixed by #747
Open

Add support for remote's includes/excludes in pull-through caching #706

lubosmj opened this issue Jul 19, 2024 · 1 comment · May be fixed by #747
Labels
feature request New feature request

Comments

@lubosmj
Copy link
Member

lubosmj commented Jul 19, 2024

As a random user, I can install any package from the referenced remote index through Pulp. It looks like pull-through distributions are ignoring includes/excludes fields from remotes. The documentation implies that this will work out of the box. Does this have any implications? Is this a feature yet to be implemented?

Steps to reproduce the behaviour in oci-env (domains enabled).

(venv3) [lmjachky@lmjachky-thinkpadt14gen4 services]$ pulp --profile local python remote create --name test --url https://pypi.org/ --includes '["shelf-reader"]'
{
  "pulp_href": "/pulp/default/api/v3/remotes/python/python/0190cbb3-e6b3-7271-a195-a5667aa931d6/",
  "pulp_created": "2024-07-19T15:54:43.252124Z",
  "pulp_last_updated": "2024-07-19T15:54:43.252136Z",
  "name": "test",
  "url": "https://pypi.org/",
  "ca_cert": null,
  "client_cert": null,
  "tls_validation": true,
  "proxy_url": null,
  "pulp_labels": {},
  "download_concurrency": null,
  "max_retries": null,
  "policy": "on_demand",
  "total_timeout": null,
  "connect_timeout": null,
  "sock_connect_timeout": null,
  "sock_read_timeout": null,
  "headers": null,
  "rate_limit": null,
  "hidden_fields": [
    {
      "name": "client_key",
      "is_set": false
    },
    {
      "name": "proxy_username",
      "is_set": false
    },
    {
      "name": "proxy_password",
      "is_set": false
    },
    {
      "name": "username",
      "is_set": false
    },
    {
      "name": "password",
      "is_set": false
    }
  ],
  "includes": [
    "shelf-reader"
  ],
  "excludes": [],
  "prereleases": true,
  "package_types": [],
  "keep_latest_packages": 0,
  "exclude_platforms": []
}
pulp --profile local python distribution create --name test --base-path test --remote test
Started background task /pulp/default/api/v3/tasks/0190cbb4-1f3b-788b-a620-656d36d591fe/
Done.
{
  "pulp_href": "/pulp/default/api/v3/distributions/python/pypi/0190cbb4-1fc1-76fe-a564-965771202cce/",
  "pulp_created": "2024-07-19T15:54:57.858495Z",
  "pulp_last_updated": "2024-07-19T15:54:57.858506Z",
  "base_path": "test",
  "base_url": "https://5d57a233243e/pypi/default/test/",
  "content_guard": null,
  "hidden": false,
  "pulp_labels": {},
  "name": "test",
  "repository": null,
  "publication": null,
  "allow_uploads": true,
  "remote": "/pulp/default/api/v3/remotes/python/python/0190cbb3-e6b3-7271-a195-a5667aa931d6/"
}
pip uninstall pytz
...
  Successfully uninstalled pytz-2024.1
pip --no-cache-dir install --trusted-host localhost:5001 -i http://localhost:5001/pypi/default/foo/simple/ pytz --no-build-isolation
...
Successfully installed pytz-2023.3
@gerrod3
Copy link
Contributor

gerrod3 commented Jul 19, 2024

I'm not sure if our docs imply that remote filters will work with pull-through caching, but that does sound like how it should intuitively work. I think this is a good feature request.

@gerrod3 gerrod3 added feature request New feature request and removed Triage-Needed Issue labels Jul 19, 2024
@lubosmj lubosmj changed the title Pull-through caching ignores includes/excludes for remotes Add support for remote's includes/excludes in pull-through caching Jul 24, 2024
@gerrod3 gerrod3 linked a pull request Oct 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants