Add env var uppercase validation - #6815
Conversation
Greptile SummaryThis PR enforces uppercase environment-variable names at EnvVar construction time.
Confidence Score: 4/5The PR is not yet safe to merge because the previously reported hard break for existing lowercase or mixed-case EnvVar names remains. The current constructor still raises immediately for names previously accepted by the public EnvVar API, and no deprecation warning, normalization, or fallback preserves compatibility for downstream callers. Files Needing Attention: packages/reflex-base/src/reflex_base/environment.py
|
| Filename | Overview |
|---|---|
| packages/reflex-base/src/reflex_base/environment.py | Adds strict uppercase-name validation to EnvVar construction, while the previously reported compatibility break remains. |
| tests/units/test_environment.py | Adds parameterized tests confirming rejection of non-uppercase names and acceptance of uppercase names. |
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." | Re-trigger Greptile
| if not name.isupper(): | ||
| msg = f"Environment variable name must be uppercase: {name!r}" | ||
| raise ValueError(msg) |
There was a problem hiding this comment.
When downstream code constructs EnvVar through reflex.config.EnvVar or reflex_base.environment.EnvVar with an existing lowercase or mixed-case name, this unconditional check raises ValueError, causing application initialization or startup to fail without the required deprecation and fallback period.
Context Used: CLAUDE.md (source)
Knowledge Base Used: Config and Environment System
Merging this PR will not alter performance
Comparing Footnotes
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
No description provided.