Repository navigation
Refuse unfiltered conda repodata while cooldown is on - #605
Merged
Merged
Conversation
The proxy filters repodata.json and current_repodata.json, but repodata.json.bz2 went through the metadata cache unfiltered, and repodata.json.zst and repodata.jlap reached the download handler and were passed through. conda tries repodata.json.zst first, so with cooldown on it got versions still in cooldown. With cooldown on these now answer 404, and conda falls back to repodata.json. repodata_from_packages.json is filtered like repodata.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With cooldown on, the proxy filters
repodata.jsonandcurrent_repodata.json, but other forms of the same index went out unfiltered:repodata.json.bz2was served through the metadata cache as is;repodata.json.zst,repodata.jlapand the compressedcurrent_repodataandrepodata_from_packagesfiles fell through to the download handler, which passes non-package files upstream unchanged;repodata_from_packages.jsontoo.conda tries
repodata.json.zstfirst (repodata_use_zstis on by default), and conda-forge serves it, so a conda client saw versions still in cooldown.With cooldown on, the compressed and patch forms now answer 404, and conda and mamba fall back to
repodata.json, which is filtered.repodata_from_packages.jsonis plain JSON and is filtered likerepodata.json. Without cooldown nothing changes.TestCondaRepodataVariantsUnderCooldownchecks each form with cooldown on (404, no upstream request) and off (passed through), and thatrepodata_from_packages.jsonis filtered; it fails on main. I also ranconda searchfrom conda 24.11.3 (condaforge/miniforge3) against conda-forge through the proxy with a 3d cooldown: it asked forrepodata.json.zst, got 404, fetchedrepodata.jsonand found the package.