Skip to content

fix(ci): size the GKE UAT timeout for the bringup retry - #2078

Merged
lockwobr merged 1 commit into
mainfrom
fix/uat-gcp-retry-timeout-budget
Aug 5, 2026
Merged

lockwobr merged 1 commit into
mainfrom
fix/uat-gcp-retry-timeout-budget

Conversation

@lockwobr

@lockwobr lockwobr commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Raises uat-gcp's job timeout from 280 to 320 minutes. #2066 added a second bringup attempt without adjusting the budget, which was sized for one.

Motivation / Context

The Bringup Infra step has no step-level timeout, and the failure it retries is the actuator's own hardcoded 30m node-pool timeout — quoted from the comment #2066 added:

The GKE actuator hardcodes a 30m node-pool create timeout (terraform/compute.tf), but a slow GPU pool can take ~35m; Terraform then fails the create even though GKE finishes

So the first attempt burns the full 30 minutes before failing, then sleeps 60s, then retries. That is ~31m on top of the ~268m the existing comment budgets:

190 UAT + ~30 setup + ~8 failure-path debug collection + ~40 teardown = ~268, so 280 leaves the teardown headroom

~299m against a 280m cap.

The consequence is not a slow run. From the same comment:

The teardown MUST fit in this budget: a job-level timeout cancels pending always() steps, so an undersized cap would skip teardown and leak the GPU node.

Tripping the cap cancels the always() Destroy Cluster step and leaks the GPU node and its VPC network group — exactly the outcome #2066 exists to prevent. Its own rationale says a stranded cluster "leaks the GPU node and NETWORKS quota."

It only bites when the first attempt burns its full timeout and the retry succeeds and the run is otherwise near budget. Narrow, but that is precisely the path a retry is meant to rescue.

Found while reviewing #2073, where the file was pulled into the diff by mistake.

Fixes: N/A
Related: #2066, #2065

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: UAT CI workflow

Implementation Notes

320 preserves the original ~12m of teardown headroom over the ~299m worst case. The comment now records the arithmetic, so the next change to either number has the reasoning in front of it rather than having to re-derive it from the retry loop.

This is a stopgap. The durable fix is the upstream node-pool timeout bump 30m -> 60m tracked in #2065 (mirroring the AKS actuator, mchmarny/cluster#31); once that lands the retry becomes rare and the cap can drop back toward 280.

uat-aws and uat-azure were checked and are unaffected. Their Bringup Infra runs a single apply with no retry; their retry loops are short API-call retries (aws eks list-clusters, AKS auth propagation, az throttling) costing seconds to a few minutes, which the existing headroom already absorbs. Only GCP retries a 30-minute provisioning attempt.

Testing

yamllint -c .yamllint.yaml .github/workflows/uat-gcp.yaml   # clean
actionlint .github/workflows/uat-gcp.yaml                   # no new findings

Comment-and-constant change only; there is no behaviour to unit test. The 3 SC2016 findings actionlint reports on this file are pre-existing (identical count on main) and untouched here.

The change is only observable on a run where bringup actually retries, which is the scenario #2065 tracks eliminating.

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes: Raising a timeout cap cannot make a passing run fail. The only effect is that a run which would have been cancelled at 280m now has room to finish and, importantly, to tear its cluster down. Worst case a genuinely hung run occupies a runner ~40m longer before being cancelled.

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality — N/A, timeout constant
  • I updated docs if user-facing behavior changed — the in-file budget comment
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)
@lockwobr
lockwobr requested a review from a team as a code owner August 5, 2026 21:38
@lockwobr lockwobr self-assigned this Aug 5, 2026
@lockwobr lockwobr added the theme/ci-dx CI pipelines, developer experience, and build tooling label Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: bda1e950-2256-484a-8843-caee1286b489

📥 Commits

Reviewing files that changed from the base of the PR and between 00cb051 and ef9f7d3.

📒 Files selected for processing (1)
  • .github/workflows/uat-gcp.yaml

📝 Walkthrough

Walkthrough

The GCP UAT job timeout increases from 280 to 320 minutes. The budget documentation now includes the Bringup Infra retry, actuator timeout, and 60-second backoff. It documents an approximately 299-minute worst-case runtime and notes that future actuator timeout changes require a budget recalculation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Possibly related PRs

Suggested labels: area/docs

Suggested reviewers: njhensley

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the GKE UAT timeout fix for the Bringup Infra retry.
Description check ✅ Passed The description directly explains the timeout increase, retry budget, teardown risk, affected workflow, and validation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/uat-gcp-retry-timeout-budget

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/uat-gcp.yaml:
- Around line 86-93: Correct the timeout-budget comments around the UAT
workflow: state that a 320-minute cap leaves approximately 21 minutes above the
estimated 299-minute retry path, not 12 minutes. Revise the rollback guidance to
explain that a future reduction requires recalculating the provisioning and
teardown budgets, especially if `#2065` increases one provisioning attempt from 30
to 60 minutes; removing retries alone does not justify returning to 280.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 445823ea-3984-44a4-b116-d8f7522d1e5e

📥 Commits

Reviewing files that changed from the base of the PR and between 00cb051 and 70e012e.

📒 Files selected for processing (1)
  • .github/workflows/uat-gcp.yaml
Comment thread .github/workflows/uat-gcp.yaml Outdated
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Coverage Report ✅

Metric Value
Coverage 82.0%
Threshold 80%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-82.0%25-brightgreen)

No Go source files changed in this PR.

#2066 added a second bringup attempt to uat-gcp without raising the job
timeout, which was budgeted for one.

The step carries no step-level timeout, and the failure it retries is the
actuator's own hardcoded 30m node-pool timeout — so the first attempt
burns the full 30m before failing, plus a 60s backoff. That is ~31m on
top of the ~268m the comment budgets, i.e. ~299m against a 280m cap.

The consequence is not a slow run. As the same comment notes, a job-level
timeout cancels pending always() steps, so tripping the cap skips Destroy
Cluster and leaks the GPU node and its VPC network group — precisely what
#2066 was written to prevent. It only bites when the first attempt burns
its full timeout AND the retry succeeds AND the run is otherwise near
budget, but that is the exact path a retry is supposed to rescue.

Raise the cap to 320, leaving ~21m over the worst case, and record the
arithmetic so the next change to either number has the reasoning in front
of it.

The comment also warns against reducing the cap on the strength of #2065:
raising the actuator's node-pool timeout 30m->60m makes a single attempt
cost up to ~30m more, so the base budget rises to ~298 even if the retry
never fires. That change trades a frequent retry for a longer first
attempt; it does not free budget.

uat-aws and uat-azure are unaffected: their bringup runs a single apply,
and their retry loops are short API-call retries the existing headroom
already absorbs.

Signed-off-by: Brian Lockwood <lockwobr@gmail.com>
@lockwobr
lockwobr force-pushed the fix/uat-gcp-retry-timeout-budget branch from 70e012e to ef9f7d3 Compare August 5, 2026 21:51
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@lockwobr
lockwobr enabled auto-merge (squash) August 5, 2026 21:51
@lockwobr
lockwobr merged commit d1b7800 into main Aug 5, 2026
39 checks passed
@lockwobr
lockwobr deleted the fix/uat-gcp-retry-timeout-budget branch August 5, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci size/S theme/ci-dx CI pipelines, developer experience, and build tooling

2 participants