Skip to content

Skip accelerator integration test on GCP STOCKOUT - #406

Open
neddp wants to merge 1 commit into
mainfrom
skip-accelerator-test-on-stockout
Open

neddp wants to merge 1 commit into
mainfrom
skip-accelerator-test-on-stockout

Conversation

@neddp

@neddp neddp commented Nov 16, 2026

Copy link
Copy Markdown
Member

When us-east1-b has no GPU resources, create_vm with an accelerator returns CanRetry: true with STOCKOUT in the message. This is a transient GCP capacity issue, not a CPI bug, but it was failing the integration test and blocking the pipeline.

Change: detect the STOCKOUT response in the accelerator test and call Skip() instead of failing. Any other error (wrong type, bad credentials, real CPI regression) still fails the test normally.

It's not a perfect fix, but considering the current GPU situation, this is the best we can do IMO.

When us-east1-b has no GPU resources available, the VM creation returns
CanRetry=true with STOCKOUT in the message. Treat this as a skip rather
than a failure so transient GCP capacity issues don't block the pipeline.
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The accelerator integration test now handles the create_vm response directly. If the response contains a retryable error with STOCKOUT in its message, the test skips. Otherwise, it requires a nil error and reads the VM ID from the result.

Suggested reviewers: iainsproat, aramprice

Merge Risk: Minimal · up to b890d

This change makes the accelerator integration test skip when GCP reports a transient GPU capacity shortage. It affects only test behavior, with no production impact, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the accelerator integration test now skips when GCP returns a STOCKOUT response. The summary confirms that vm_test.go skips the test on a retryable STOCKOUT error and …
Description check Passed The description states the cause (us-east1-b has no GPU resources, create_vm returns CanRetry with STOCKOUT), the change (Skip() on STOCKOUT in the accelerator test), and the intended scope (other err…
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.
Full details: Title check

Explanation

The title names the main change: the accelerator integration test now skips when GCP returns a STOCKOUT response. The summary confirms that vm_test.go skips the test on a retryable STOCKOUT error and otherwise expects success.

Full details: Description check

Explanation

The description states the cause (us-east1-b has no GPU resources, create_vm returns CanRetry with STOCKOUT), the change (Skip() on STOCKOUT in the accelerator test), and the intended scope (other errors still fail). This matches the raw summary of vm_test.go.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d3db2a98-e9be-4868-bf57-f00f85f0ae35
Commits

Reviewing files that changed from the base of the PR and between 4e093f5 and b890d91.

Files selected for processing: 1

  • src/bosh-google-cpi/integration/vm_test.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@neddp
neddp requested review from a team, aramprice, dudejas and fmoehler and removed request for a team November 16, 2026 17:00

@aramprice aramprice left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a way to "dry run" the API call so that we can verify that the API call made by the CPI works in some way that doesn't run into the STOCKOUT issue.

@github-project-automation github-project-automation Bot moved this from Pending Review | Discussion to Waiting for Changes | Open for Contribution in Foundational Infrastructure Working Group Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for Changes | Open for Contribution

Development

Successfully merging this pull request may close these issues.

2 participants