fix: fix awf-runner timeout detection and no-docker test timeouts#1332
Merged
lpcox merged 2 commits intocopilot/fix-api-proxy-token-exchangefrom Mar 17, 2026
Conversation
Copilot
AI
changed the title
[WIP] [67347423002] Fix the failing GitHub Actions workflow
fix: fix awf-runner timeout detection and no-docker test timeouts
Mar 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a misleading “success” outcome in the test runner when an execa process times out with reject: false, and updates integration test timeouts to accommodate initial local image builds during buildLocal: true runs.
Changes:
- Update
AwfRunner.run()andAwfRunner.runWithSudo()to detectresult.timedOutin addition toerror.timedOut, returning a consistent timeoutAwfResult. - Increase
no-dockerintegration test runner timeouts from 30s to 120s to avoid first-run build flakiness.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/fixtures/awf-runner.ts | Properly detects the “return-on-timeout” execa behavior when reject: false, preventing false-positive successes on timeout. |
| tests/integration/no-docker.test.ts | Aligns test execution timeouts with expected --build-local first-run build duration to prevent premature timeouts. |
Comments suppressed due to low confidence (1)
tests/fixtures/awf-runner.ts:409
- Same as
run(): this return-on-timeout branch includesworkDir, but the thrown-timeoutcatchbranch above returns noworkDir. It would be helpful to populateworkDirfromerror.stderrthere too so callers can still inspect Squid logs when a command times out.
// With reject: false, execa returns instead of throwing on timeout.
// Detect this case and return a proper timeout result.
if (result.timedOut) {
return {
exitCode: -1,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+198
to
+202
| // With reject: false, execa returns instead of throwing on timeout. | ||
| // Detect this case and return a proper timeout result. | ||
| if (result.timedOut) { | ||
| return { | ||
| exitCode: -1, |
lpcox
added a commit
that referenced
this pull request
Mar 17, 2026
* Initial plan * fix: route GHEC Copilot proxy to copilot-api subdomain Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: fix awf-runner timeout detection and no-docker test timeouts (#1332) * Initial plan * fix: fix awf-runner timeout detection and no-docker test timeouts --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> Co-authored-by: Landon Cox <landon.cox@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This was referenced Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
docker command should not be availabletest inno-docker.test.tswas silently reporting success with empty stdout when the AWF process timed out during the initial Docker image build.Root cause
Two bugs combined to produce a misleading failure:
Execa's
reject: false+ timeout returns instead of throws. When a timeout fires withreject: false, execa resolves with{ timedOut: true, exitCode: undefined }rather than throwing. The runner only checkederror.timedOutin its catch block, so a timed-out result fell through toexitCode = undefined ?? 0 = 0→success: true,stdout: "".30s timeout too short for
buildLocal: truefirst run. The first test inno-docker.test.tsbears the full Docker image build cost (~40–60s). Subsequent tests reuse cached layers and complete in ~28s.Changes
tests/fixtures/awf-runner.ts— Added aresult.timedOutcheck after the try-catch in bothrun()andrunWithSudo(), so execa's return-on-timeout path correctly surfaces{ success: false, timedOut: true, exitCode: -1 }:tests/integration/no-docker.test.ts— Increased alltimeoutvalues from30000to120000to match the Jest test timeout, giving enough headroom for an initial image build.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.