Skip to content

[codex] fix boolean env parsing in client config#685

Draft
guysmoilov wants to merge 3 commits intomainfrom
ws-tech-debt-ratchet-apr15
Draft

[codex] fix boolean env parsing in client config#685
guysmoilov wants to merge 3 commits intomainfrom
ws-tech-debt-ratchet-apr15

Conversation

@guysmoilov
Copy link
Copy Markdown
Member

What changed

  • keep boolean env parsing explicit for DAGSHUB_QUIET and DAGSHUB_DISABLE_TRACEPARENT
  • leave DAGSHUB_HTTP_TIMEOUT type unchanged after review follow-up
  • add self-contained config test covering boolean env parsing

Why

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=false now disables quiet mode as expected
  • DAGSHUB_DISABLE_TRACEPARENT=1 still enables traceparent disabling
  • timeout behavior stays aligned with existing contract

Validation

  • python3 -m unittest tests.common.test_config
  • python3 -m py_compile dagshub/common/config.py tests/common/test_config.py

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.
@dagshub
Copy link
Copy Markdown

dagshub Bot commented Apr 20, 2026

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5645170d-5477-4fc0-a6f4-9fd26e1fdce7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ws-tech-debt-ratchet-apr15

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant