Inconsistencies of the conda configuration system
Checklist
- I added a descriptive title
- I searched open reports and couldn't find a duplicate
Summary
There are a number of inconsistencies and/or surprising behavior in the conda configuration system. Part of it comes from the homemade Configuration object, plus the singleton pattern, plus the kitchen-sink approach to store many convenience variables and state in the conda.base.context.context object.
There are also many sources of the configuration values:
- Hardcoded defaults in the Python modules
- Several
.condarc/condarc.d/*files, at the system, user and environment level - Auto-generated
CONDA_*environment variables (but no warning if they are mispelled)
On top of this we have:
- Surprising merging rules like extended lists and updated dictionaries instead of overrides.
- Lacking documentation
- Intricate
conda configimplementation with way too many flags but a simplistic implementation with some undefined behaviours. - No schema! The tooling ecosystem might add their own data to the config files, and
condawill ignore it, or silently delete it or who knows what.
The cherry on top is that at some point this will have to be made extensible to accommodate the plugin system in some sane way...
Linked Issues & PRs
Environment specific configuration
conda install/update --name envdoes not load environment-specific.condarcfile #10637- Environment-specific configurations leak into new environments #11874
- Environment-specific conda
pinnedfile vs global 'pinned' file - precedence and usage #10041 - make platform configurable via condarc #10695
- Setting conda environment variable containing = symbol does not work, works in bash #10503
- Setting an environment variable does not work when value contains a dollar sign $ #10126
- Env-specific
changeps1=falsepolicy still changes PS1 #9265
Channels
- defaults channels leak into environments config #12136
nodefaultschannel should always be taken into account #12010conda config --appendinjects the default value too (e.g.--append channels conda-forgeresults inchannels: [conda-forge, defaults]#12356
$CONDARC and .condarc search paths
- conda config --set doesn't respect $CONDARC #9962
- include statement in condarc and ~/.conda/condarc.d ignored #10874
- Search for config in ~/.config/conda/condarc on Linux #9840
- Override condarc path #6902 & Provide a way to override condarc search path:
CONDA_NO_CONFIG_SEARCH_PATH#11838
Other bugs
- Config remove-key removes comments from condarc #10278
- conda config --set doesn't respect $CONDARC #9962
- CONDARC is ignored #10790
CONDA_EXTRACT_THREADS(multithreaded package extraction) is not configurable #12286- Hiding the .condarc file on Windows causes PermissionError #12199
#! finaldirective in configuration files can be bypassed with environment variables #12122- coult not set custom_channels from command line #10526
Other feature requests
- Add
--name/-noption toconda config#12137 - Prevent state spilling all over the place #10779
- Revamp with
pydantic
Documentation
The conda configuration documentation is particularly intricate. There are three pages, each with overlapping but different content. In particular, the "reference" (as per the Diátaxis framework) should be better separated.
- Conda > User Guide > Configuration
- Sample .condarc file should have a "see also" note pointing to
Conda configuration(below)
- Sample .condarc file should have a "see also" note pointing to
- Conda configuration
- Command reference >
conda config
More issues / PRs:
- Document the
#!finalflag for condarc options #11377 - More information needed in docs on channel priorities #12232
- Sample .condarc file in docs needs more content #11907
- Multi-user installs #11731
- Propose clarifcation on merge strategy. #10295
- update config docs #9192
- Important flag to lock admin configuration missing in documentation #10821
- Conda remote_read_timeout_secs parameter is not being passed to pip install section #12237 & Add information about configuring pip in documentation #12255
- Quiet mode through .condarc #10811