diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index faf52a45..0a4f2810 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -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: @@ -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: diff --git a/crates/tower-cmd/src/run.rs b/crates/tower-cmd/src/run.rs index dc7eb4e0..50a3de07 100644 --- a/crates/tower-cmd/src/run.rs +++ b/crates/tower-cmd/src/run.rs @@ -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(); @@ -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); } _ => { @@ -611,20 +614,19 @@ async fn monitor_local_status(app: Arc>) -> 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; } } diff --git a/crates/tower-runtime/src/local.rs b/crates/tower-runtime/src/local.rs index 5119b086..ee4968e2 100644 --- a/crates/tower-runtime/src/local.rs +++ b/crates/tower-runtime/src/local.rs @@ -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::>().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(); diff --git a/tests/integration/features/steps/cli_steps.py b/tests/integration/features/steps/cli_steps.py index da8ef117..24a510ec 100644 --- a/tests/integration/features/steps/cli_steps.py +++ b/tests/integration/features/steps/cli_steps.py @@ -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}"