Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

macos-x86_64:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-build') }}
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v4.2.2
with:
Expand All @@ -89,7 +89,7 @@ jobs:

macos-aarch64:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-build') }}
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v4.2.2
with:
Expand Down
14 changes: 8 additions & 6 deletions crates/tower-cmd/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ where

// Wait for app to complete or SIGTERM
let status_result = tokio::select! {
status = status_task => status.unwrap(),
status = status_task => {
debug!("Status task completed, result: {:?}", status);
status.unwrap()
},
_ = tokio::signal::ctrl_c(), if !output::get_output_mode().is_mcp() => {
output::write("\nReceived Ctrl+C, stopping local run...\n");
app.lock().await.terminate().await.ok();
Expand All @@ -205,8 +208,8 @@ where
// And if we crashed, err out
match status_result {
Status::Exited => output::success("Your local run exited cleanly."),
Status::Crashed { .. } => {
output::error("Your local run crashed!");
Status::Crashed { code } => {
output::error(&format!("Your local run crashed with exit code: {}", code));
return Err(Error::AppCrashed);
}
_ => {
Expand Down Expand Up @@ -611,20 +614,19 @@ async fn monitor_local_status(app: Arc<Mutex<LocalApp>>) -> Status {
err_count = 0;

match status {
tower_runtime::Status::Exited => {
Status::Exited => {
debug!("Run exited cleanly, stopping status monitoring");

// We're done. Exit this loop and function.
return status;
}
tower_runtime::Status::Crashed { .. } => {
Status::Crashed { .. } => {
debug!("Run crashed, stopping status monitoring");

// We're done. Exit this loop and function.
return status;
}
_ => {
debug!("App status: other, continuing to monitor");
sleep(Duration::from_millis(100)).await;
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/tower-runtime/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,20 +441,20 @@ fn make_env_vars(
debug!(ctx: &ctx, "converting {} env variables", (params.len() + secs.len()));

for (key, value) in secs.into_iter() {
debug!(ctx: &ctx, "adding key {}", make_env_var_key(&key));
res.insert(make_env_var_key(&key), value.to_string());
}

for (key, value) in params.into_iter() {
debug!(ctx: &ctx, "adding key {}", make_env_var_key(&key));
res.insert(key.to_string(), value.to_string());
}

for (key, value) in other_env_vars.into_iter() {
debug!(ctx: &ctx, "adding key {}", &key);
res.insert(key.to_string(), value.to_string());
}

let added_keys = res.keys().map(|s| &**s).collect::<Vec<&str>>().join(", ");
debug!(ctx: &ctx, "added keys {}", &added_keys);

// We also need a PYTHONPATH that is set to the current working directory to help with the
// dependency resolution problem at runtime.
let pythonpath = cwd.to_string_lossy().to_string();
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/features/steps/cli_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def step_final_status_should_show_crashed_in_red(context):
red_color_code in output
), f"Expected red color codes in output, got: {output}"
assert (
"Your local run crashed!" in output
"Your local run crashed with exit code:" in output
), f"Expected 'Your local run crashed!' message, got: {output}"


Expand Down