Skip to content

Harden PR Sous Chef conclusion checkout to prevent MODULE_NOT_FOUND failure cascade - #49052

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/aw-failures-retry-checkout
Closed

Harden PR Sous Chef conclusion checkout to prevent MODULE_NOT_FOUND failure cascade#49052
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/aw-failures-retry-checkout

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

A transient network/DNS failure during the conclusion job’s Checkout actions folder step was causing a second-order crash (MODULE_NOT_FOUND for setup_globals.cjs and related helpers), obscuring the real root cause. This change hardens that path so checkout failures are retried and, if still unsuccessful, fail with a direct checkout error instead of cascading module errors.

  • Scope

    • Targets the pr-sous-chef conclusion setup path specifically (WorkflowID == "pr-sous-chef"), without changing checkout behavior for other workflows/jobs.
  • Conclusion checkout resilience

    • Adds retry/backoff checkout generation for the conclusion setup path:
      • attempt 1
      • retry after 5s
      • retry after 15s
    • Each attempt is continue-on-error: true, followed by an explicit terminal step that emits a clear checkout failure message and exits non-zero if all attempts fail.
  • Compiler and generated workflow updates

    • Adds generateCheckoutActionsFolderWithRetry(...) in the workflow compiler.
    • Wires conclusion setup (buildConclusionSetupSteps) to use retrying checkout for pr-sous-chef.
    • Regenerates .github/workflows/pr-sous-chef.lock.yml to include the retry sequence in the conclusion job.
  • Regression guardrails

    • Adds focused compiler tests for:
      • retry-step generation shape/content
      • pr-sous-chef-only application of retrying checkout in conclusion setup.
- name: Checkout actions folder
  id: checkout-actions-folder-attempt-1
  continue-on-error: true
  uses: actions/checkout@...
  with:
    repository: github/gh-aw
    sparse-checkout: |
      actions

- name: Backoff before retrying checkout actions folder (5s)
  if: steps.checkout-actions-folder-attempt-1.outcome == 'failure'
  run: sleep 5

# ...attempt-2, backoff 15s, attempt-3...

- name: Fail with clear checkout error after retries
  if: steps.checkout-actions-folder-attempt-3.outcome == 'failure'
  run: |
    echo "::error::Failed to checkout github/gh-aw actions folder after 3 attempts (5s/15s backoff). This is usually a transient GitHub DNS or network failure."
    exit 1

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix conclusion job's setup_globals.cjs module not found regression Harden PR Sous Chef conclusion checkout to prevent MODULE_NOT_FOUND failure cascade Jul 30, 2026
Copilot AI requested a review from pelikhan July 30, 2026 06:33
@pelikhan pelikhan closed this Jul 30, 2026
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.

[aw-failures] Conclusion job's setup_globals.cjs MODULE_NOT_FOUND cascade has regressed (repeat of #28149)

2 participants