Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 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 |
There was a problem hiding this comment.
Pull request overview
This PR adds a new runtime info helper to detect Tower CLI “local runs”, and hardens boolean env-var parsing by ensuring missing values default to "false" instead of raising.
Changes:
- Add
info.is_local()backed byTOWER__RUNTIME__IS_LOCAL. - Fix
info.is_cloud_run()to default to"false"whenTOWER__RUNTIME__IS_TOWER_MANAGEDis missing. - Add comprehensive pytest coverage for the
tower.infoenv-var helpers, and setTOWER__RUNTIME__IS_LOCAL=truein the CLI local-run path.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/tower/test_info.py |
Adds new unit tests covering tower.info env-var accessors and boolean parsing. |
src/tower/info/__init__.py |
Implements is_local() and adjusts is_cloud_run() default behavior. |
crates/tower-cmd/src/run.rs |
Injects TOWER__RUNTIME__IS_LOCAL=true for CLI local execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Helps us write logic that's specific to local runs. Otherwise, adds some tests for the existing functions as I found a bug along the way in how we process some environment variables.