-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ci: Debugging for compilation issues #11062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| - name: Capture state on timeout | ||
| if: cancelled() | ||
| run: | | ||
| echo "==========================================" | ||
| echo "INTEGRATION TEST STEP TIMED OUT" | ||
| echo "==========================================" | ||
| echo "Time: $(date)" | ||
| echo "" | ||
| echo "=== Active Rust/Cargo Processes (likely hung) ===" | ||
| ps aux | grep -E "[r]ustc|[c]argo" || echo "No rustc/cargo processes found" | ||
| echo "" | ||
| echo "=== Top CPU Consumers ===" | ||
| if [ "$RUNNER_OS" == "Linux" ]; then | ||
| ps aux --sort=-%cpu | head -15 | ||
| elif [ "$RUNNER_OS" == "macOS" ]; then | ||
| ps aux -r | head -15 | ||
| fi | ||
| echo "" | ||
| echo "(ICE files will be checked in next step)" | ||
| shell: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Capture state on timeout" steps use if: cancelled() condition, but this won't trigger when a step times out—it only triggers when the entire workflow is cancelled by a user or external event. These steps should use if: always() or another appropriate condition to ensure they execute during step timeouts.
View Details
📝 Patch Details
diff --git a/.github/workflows/turborepo-test.yml b/.github/workflows/turborepo-test.yml
index a075c3196..3908f4d23 100644
--- a/.github/workflows/turborepo-test.yml
+++ b/.github/workflows/turborepo-test.yml
@@ -201,7 +201,7 @@ jobs:
shell: bash
- name: Capture state on timeout
- if: cancelled()
+ if: always()
run: |
echo "=========================================="
echo "INTEGRATION TEST STEP TIMED OUT"
@@ -449,7 +449,7 @@ jobs:
shell: bash
- name: Capture state on timeout
- if: cancelled()
+ if: always()
run: |
echo "=========================================="
echo "RUST TEST STEP TIMED OUT"
Analysis
GitHub Actions "Capture state on timeout" steps use wrong condition
What fails: The "Capture state on timeout" steps in both the integration and rust_test jobs (lines 203 and 451) use if: cancelled() condition, which does not trigger when a step times out.
How to reproduce: Set up a GitHub Actions workflow with a step that has timeout-minutes: 45 and a debug step with if: cancelled() immediately after it. Let the first step exceed its timeout limit.
Result: The debug step with if: cancelled() does NOT execute when the preceding step times out. The workflow continues without capturing the debug state information.
Expected: According to GitHub Actions documentation on expressions, the cancelled() function "Returns true if the workflow was canceled." This refers to workflow-level cancellation (user cancellation), not step timeouts. Step-level timeouts ("The maximum number of minutes to run the step before killing the process") result in step failure, not workflow cancellation. Therefore, if: cancelled() will not trigger on step timeouts. The condition should be if: always() to ensure debug steps execute regardless of preceding step status.
Fix: Change if: cancelled() to if: always() in both "Capture state on timeout" steps to ensure they execute during step timeouts and capture the intended diagnostic information.
Description
We've been getting some strange CI flakes during compilation of the
turboCLI, so adding some debug logging to see if we can get more information on these.Testing Instructions
CI