Skip to content

[ci] Retry macOS PowerShell startup crashes in test processing - #13400

Closed
simonrozsival wants to merge 2 commits into
mainfrom
simonrozsival-ci-failure-investigation
Closed

simonrozsival wants to merge 2 commits into
mainfrom
simonrozsival-ci-failure-investigation

Conversation

@simonrozsival

Copy link
Copy Markdown
Member

The macOS Look for failed tests step can fail before its script starts because PowerShell's procargs call returns errno 5. This caused build 1663890 to fail even though its tests passed. Related to #12652.

Run this step through a Bash launcher on macOS, retrying only when both the exact procargs errno 5 message and ManagedPSEntry+StartupException appear. Allow two retries with 1- and 4-second delays, retain output from every attempt, and preserve the final exit code. Ordinary slicer/script failures return immediately; Windows and Linux retain their existing PowerShell task. Keep the retry outside PowerShell because the failure happens before the script executes.

Validation:

  • bash -n build-tools/automation/scripts/retry-pwsh-startup.sh — passed.
  • python3 build-tools/automation/scripts/test_retry_pwsh_startup.py -v — passed, 7 tests covering recovery, exhaustion, backoff, output/argument preservation, and non-retryable failures.
  • git diff --cached --check — passed before committing.
  • Parsed the YAML and checked its platform conditions with PyYAML — passed. Executed its actual Bash command with real PowerShell and a fake slicer — passed for success and exit code 19, including paths with spaces and verification that the slicer ran only once.

No SDK build or device tests were run: this changes CI orchestration only. A live Azure Pipelines run has not yet verified the task conditions on an agent.

The failed-test processing step can fail before its script starts when\nPowerShell's macOS procargs call returns errno 5 (issue #12652).\n\nLaunch that step from Bash on macOS and retry only when both known\nstartup-error messages are present.  Preserve output and exit status,\nand stop after three attempts without retrying ordinary script failures.\nKeep Windows and Linux on the existing PowerShell task.\n\nAdd focused tests for recovery, retry exhaustion, argument forwarding,\nlog preservation, backoff, and non-retryable failures.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 11:10
Undo the CI launcher, its tests, and the platform-specific pipeline step.

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants