Skip to content

tests: kill the process tree on integ command timeout and widen the callback wait - #9203

Open
roger-zhangg wants to merge 3 commits into
developfrom
fix-windows-integ-flakes
Open

tests: kill the process tree on integ command timeout and widen the callback wait#9203
roger-zhangg wants to merge 3 commits into
developfrom
fix-windows-integ-flakes

Conversation

@roger-zhangg

Copy link
Copy Markdown
Member

Which issue(s) does this change fix?

N/A — nightly integration test failures.

Why is this change necessary?

Two Windows jobs failed in the 2026-08-26 nightly (run 32926245225). Both are test-harness flakes, not product bugs — the same commit passed in the runs on either side of it.

  1. tier1-windows-build-2: all 4 x86_64 Rust builds timed out at 600s, on all 4 attempts each (91 min job). run_command kills only the direct child on timeout, so cargo/zig grandchildren survive holding the $CARGO_HOME/.package-cache lock, which cargo waits on indefinitely. One slow build therefore poisons every later build in the job.
  2. tier1-windows-other: test_tier1_callback got 30s for the callback ID to appear. The invoke was healthy and mid-startup (poll() = None, last line Found credentials in environment variables. at ~19s) — the budget is just too tight for container startup on Windows. Same failure on 2026-08-20.

How does it address the issue?

  1. Use the existing kill_process helper (kills the tree, already used by the long-running-process tests) in the timeout path of run_command and run_command_with_input, wrapped so it can never mask the original TimeoutExpired.
  2. Raise the wait_for_callback_id default from 30s to 120s.

What side effects does this change have?

The callback wait is polled and returns as soon as the line lands, so the happy path is unchanged; only a genuinely failing wait takes longer before asserting. Timeouts now also reap grandchildren, which is what the non-timeout paths already do.

Verified locally that a timed-out command's orphaned grandchild survives on develop and is killed with this change, with TimeoutExpired still raised in both cases. make black-check and make lint pass.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…allback wait

A timed-out command killed only the direct child, so cargo/zig grandchildren
survived holding the cargo package-cache lock, making every rerun time out too.
Also raise the callback-ID wait, which is an upper bound the happy path never pays.
@roger-zhangg
roger-zhangg requested a review from a team as a code owner August 26, 2026 20:20

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: 699af95..a587085
Files: 2
Comments: 1

Comment thread tests/testing_utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant