fix: suggest the correct cache config key in netfs-redirect warning#6282
Open
baszalmstra wants to merge 2 commits into
Open
fix: suggest the correct cache config key in netfs-redirect warning#6282baszalmstra wants to merge 2 commits into
baszalmstra wants to merge 2 commits into
Conversation
The network-filesystem redirect warning built its suggested config key
from `CacheKind::subdir()`, the on-disk directory name. For the pypi
mapping cache that name (`conda-pypi-mapping`) differs from the actual
TOML field (`pypi-mapping`), so the warning told users to add
`[cache.conda-pypi-mapping]`, which is then rejected as an unknown key
("Ignoring 'cache.conda-pypi-mapping'").
Add `CacheKind::config_key()` returning the real TOML field name and use
it in the warning. Includes a regression test asserting every kind's
config_key round-trips through `CacheConfig` deserialization.
Fixes prefix-dev#6281
2 tasks
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.
Description
When a cache lives on a network filesystem, pixi prints a warning telling you which cache config key to set to override the redirect. For the pypi mapping cache, the warning suggested a key name that pixi does not actually accept, so following the advice produced an "Ignoring" warning and the setting had no effect. This corrects the warning to suggest the key that actually works.
Fixes #6281
How Has This Been Tested?
Added a regression test that confirms the key suggested in the warning is accepted by the config parser for every cache kind. All existing cache config tests continue to pass.
AI Disclosure
Tools: Claude
Checklist: