Skip to content

Improve configuration environment variable docs - #2189

Open
JeanChristopheMorinPerso wants to merge 4 commits into
AcademySoftwareFoundation:mainfrom
JeanChristopheMorinPerso:docs/config-environment-variables
Open

Improve configuration environment variable docs#2189
JeanChristopheMorinPerso wants to merge 4 commits into
AcademySoftwareFoundation:mainfrom
JeanChristopheMorinPerso:docs/config-environment-variables

Conversation

@JeanChristopheMorinPerso

@JeanChristopheMorinPerso JeanChristopheMorinPerso commented Aug 22, 2026

Copy link
Copy Markdown
Member

We've had a gap for years now in regards to config settings environment variables. I partly filled that gap when I introduced https://rez.readthedocs.io/en/stable/environment.html and the automatic documentation of env vars in settings (https://rez.readthedocs.io/en/stable/configuring_rez.html#envvar-REZ_CONTEXT_TMPDIR), but there was still a major missing piece.

Some of our settings can only be configured via an environment variable suffixed with _JSON.

This PR properly documents those and also documents that all settings be set via REZ_XXX_JSON. I also took the occasion to document the format of some env vars too.

With this, I think we can finally say that all our settings and env vars are properly documented. At least I think, until someone comes in to tell me that we missed something 😄

Lastly, I also fixed an old bug that was triggered when a user was setting a setting via an env var but without the JSON suffix for a setting that only supports JSON. Rez was raising a fat from helpful NotImplementedError. With the fix, rez raises an actionable exception.

Amp-Thread-ID: https://ampcode.com/threads/T-01a02b3d-dd38-7533-abe8-4844dadda902

Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02b3d-dd38-7533-abe8-4844dadda902
@JeanChristopheMorinPerso
JeanChristopheMorinPerso requested a review from a team as a code owner August 22, 2026 22:02
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.31%. Comparing base (5c598c5) to head (5fe4492).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2189      +/-   ##
==========================================
+ Coverage   61.29%   61.31%   +0.01%     
==========================================
  Files         164      164              
  Lines       20568    20577       +9     
  Branches     3575     3576       +1     
==========================================
+ Hits        12607    12616       +9     
  Misses       7089     7089              
  Partials      872      872              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02b3d-dd38-7533-abe8-4844dadda902
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019fd984-bbd8-750e-8a0e-7f10d664a703
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019fd984-bbd8-750e-8a0e-7f10d664a703
@sanikache

Copy link
Copy Markdown
Contributor

Is it worth adding a new test that guards against any Setting subclass referenced in config_schema that doesn't set env_var_json_only = True ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants