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

pkgs.dev.azure.com is not cached? #10359

Open
KalleDK opened this issue Jan 7, 2025 · 1 comment
Open

pkgs.dev.azure.com is not cached? #10359

KalleDK opened this issue Jan 7, 2025 · 1 comment
Labels
cache Caching of packages and metadata question Asking for clarification or support

Comments

@KalleDK
Copy link

KalleDK commented Jan 7, 2025

For some reason the cache is missed when using azure index.
I realized it when add / remove of packages that should be cache was redownloaded / refreshed everytime.

Two small examples showing the difference ( I don't know if Azure is denying cache and that is the problem )

mkdir test
cd test
uv init .
uv add typing-extensions
uv remove typing-extensions --offline
uv add typing-extensions --offline
# Now add azure index in pyproject.toml
# [tool.uv]
# index-url = "https://[email protected]/XXXx/YYYYY/_packaging/ZZZZ/pypi/simple/"
uv add typing-extensions
uv remove typing-extensions --offline
uv add typing-extensions --offline
# Last here fails with missing in cache
× No solution found when resolving dependencies:
  ╰─▶ Because typing-extensions was not found in the cache and your project depends on typing-extensions, we can conclude that your project's requirements are unsatisfiable.

      hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.

Tried with a clean cache, and the package is in the cache.

An even more peculiar is that the remove is also not working, if you have more than one dependency.

mkdir test
cd test
uv init .
uv add typing-extensions
uv add tomlkit
uv remove typing-extensions --offline
uv add typing-extensions --offline
# Now add azure index in pyproject.toml
# [tool.uv]
# index-url = "https://[email protected]/XXXx/YYYYY/_packaging/ZZZZ/pypi/simple/"
uv add typing-extensions
uv add tomlkit
uv remove typing-extensions --offline
# Already fails on the remove for some reason
× No solution found when resolving dependencies:
  ╰─▶ Because tomlkit was not found in the cache and your project depends on tomlkit>=0.13.2, we can conclude that your project's requirements are unsatisfiable.

      hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache.
@charliermarsh
Copy link
Member

You can run with -vvv and we'll give you logs about the caching behavior of the index. My guess is that pkgs.dev.azure.com does not include any caching headers.

@charliermarsh charliermarsh added question Asking for clarification or support cache Caching of packages and metadata labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache Caching of packages and metadata question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

2 participants