[codex] fix boolean env parsing in client config#685
Draft
guysmoilov wants to merge 3 commits intomainfrom
Draft
[codex] fix boolean env parsing in client config#685guysmoilov wants to merge 3 commits intomainfrom
guysmoilov wants to merge 3 commits intomainfrom
Conversation
Stop treating any non-empty string as a truthy boolean and ensure HTTP timeout is loaded as a numeric value. Add small self-contained tests so common values like 'false' and '12.5' keep behaving the way users expect.
Continue parsing the timeout env var into a numeric type so overrides are not left as strings, but narrow it back to int seconds to preserve the simpler historical contract while still fixing the boolean parsing bug.
The boolean env parsing bug was clearly broken, but casting the timeout introduced extra behavior without enough payoff. Keep the risk-free boolean cleanup and stop changing the timeout value type until there is a stronger reason to tighten that contract.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
What changed
DAGSHUB_QUIETandDAGSHUB_DISABLE_TRACEPARENTDAGSHUB_HTTP_TIMEOUTtype unchanged after review follow-upWhy
Boolean env parsing was clearly wrong because any non-empty string became truthy. Timeout casting looked riskier than useful, so final version keeps only low-risk behavior fix.
Impact
DAGSHUB_QUIET=falsenow disables quiet mode as expectedDAGSHUB_DISABLE_TRACEPARENT=1still enables traceparent disablingValidation
python3 -m unittest tests.common.test_configpython3 -m py_compile dagshub/common/config.py tests/common/test_config.py