Skip to content

feat: make TOWER_ENVIRONMENT ordinary passthrough in local runs#289

Merged
socksy merged 1 commit into
developfrom
feature/passthrough-tower-environment
Jun 8, 2026
Merged

feat: make TOWER_ENVIRONMENT ordinary passthrough in local runs#289
socksy merged 1 commit into
developfrom
feature/passthrough-tower-environment

Conversation

@socksy

@socksy socksy commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

make_env_vars injected TOWER_ENVIRONMENT as the last step of building a run's env, unconditionally. Because it ran last it overwrote any value a caller had already put in the env map — the hardcoded value always won.

This drops the special case so the var passes through like everything else. make_env_vars no longer injects it, and loses its now-unused env param along with the dead threading through execute_bash_program. The local run path in run.rs supplies it explicitly from the resolved --environment arg instead, next to the existing TOWER__RUNTIME__IS_LOCAL. The arg defaults to default, so a local run with no flag still gets TOWER_ENVIRONMENT=default like before.

make_env_vars injected TOWER_ENVIRONMENT as the last step of building a
run's env, unconditionally, so it overwrote any value a caller had
already set in the env map.

Drop the special case and let the value pass through like any other env
var. The local run path now supplies it explicitly from the resolved
--environment arg, which defaults to "default" — so a local run with no
flag still gets TOWER_ENVIRONMENT=default, as before. The now-unused env
parameter and its threading through execute_bash_program go with it.
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d5590f5-d637-4860-b5b2-49236d6d010c

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 feature/passthrough-tower-environment

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

@socksy socksy requested a review from bradhe June 8, 2026 17:50
@socksy socksy merged commit 5e359c4 into develop Jun 8, 2026
30 checks passed
@socksy socksy deleted the feature/passthrough-tower-environment branch June 8, 2026 17:52
@socksy socksy mentioned this pull request Jun 8, 2026
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.

2 participants