Skip to content

Comments

Retry packer builds on transient WinRM failures#712

Draft
jwmossmoz wants to merge 1 commit intomainfrom
retry-packer-on-transient-failure
Draft

Retry packer builds on transient WinRM failures#712
jwmossmoz wants to merge 1 commit intomainfrom
retry-packer-on-transient-failure

Conversation

@jwmossmoz
Copy link
Contributor

Summary

  • Packer builds occasionally fail with transient WinRM upload errors (Error removing temporary file ... received error response), wasting 12+ minute builds and blocking downstream SBOM/os-integration jobs.
  • Added a retry loop (up to 3 attempts, 30s delay between retries) around New-AzSharedWorkerImage in all SIG workflows.
  • Uses $LASTEXITCODE to detect failure since packer build is a native command that doesn't throw PowerShell exceptions.

Workflows updated:

  • sig-FXCI-nontrusted-parallel-build-alpha.yml
  • sig-nontrusted.yml
  • sig-trusted.yml
  • sig-monitor-nontrusted.yml
  • DEV-sig-nontrusted.yml

Example failure: https://github.com/mozilla-platform-ops/worker-images/actions/runs/21991206612/job/63538558857

Test plan

  • Trigger an alpha build and confirm retry logging appears on attempt 1 (Packer attempt 1 of 3)
  • If a transient failure occurs, verify it retries automatically instead of failing the workflow

Packer occasionally fails with transient WinRM upload errors like
"Error removing temporary file ... received error response" which
wastes the entire build. Add a retry loop (3 attempts, 30s delay)
around New-AzSharedWorkerImage in all SIG workflows. Uses
$LASTEXITCODE since packer is a native command that won't throw
PowerShell exceptions.

Applied to: sig-FXCI-nontrusted-parallel-build-alpha, sig-nontrusted,
sig-trusted, sig-monitor-nontrusted, DEV-sig-nontrusted.
@jwmossmoz jwmossmoz marked this pull request as draft February 13, 2026 17:29
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.

1 participant