Repository navigation
fix(cli): don't let CLI defaults override REDIS_ENTRAID_* env config - #208
Merged
vchomakov merged 1 commit intoNov 27, 2026
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #208 +/- ##
==========================================
- Coverage 88.20% 87.61% -0.60%
==========================================
Files 19 19
Lines 1060 1122 +62
==========================================
+ Hits 935 983 +48
- Misses 125 139 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Thanks for following up on #207. Verified locally: with the |
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.
Fixes #207
Cause
In
src/main.py,--entraid-identity-type,--entraid-scopes,--entraid-resource,--entraid-token-refresh-ratio,--entraid-retry-max-attemptsand--entraid-retry-delay-msdeclared Click defaults. They always had a value, socli()always forwarded them toset_entraid_config_from_cli, which overwrote whatENTRAID_CFGhad read fromREDIS_ENTRAID_*. For example,REDIS_ENTRAID_IDENTITY_TYPE=user_assignedwas silently reset tosystem_assigned.Fix
Same approach as #206: remove the six Click defaults, so an option is only forwarded when it is actually given (the existing checks in
cli()already skipNone). Help text now mentions the env var and the effective default. The defaults themselves stay inENTRAID_CFGinsrc/common/config.py.Tests
Two new tests in
tests/test_main.py: no unset--entraid-*option reachesset_entraid_config_from_cli, and env-derivedENTRAID_CFGvalues survive an invocation without flags. Both fail before the change and pass after. The full test suite passes (378 tests), andruff check/ruff format --checkare clean.Disclosure
This change was prepared with the assistance of an AI tool (Claude Code).