fix(e2e): skip GCP tests when billing is disabled#3146
Merged
Conversation
Add a billing pre-check to _gcp_validate_env so the E2E orchestrator
skips GCP gracefully ("skipped — credentials not configured") instead
of failing every agent individually when billing is disabled.
Fixes #3091
Agent: test-engineer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
louisgv
approved these changes
Apr 2, 2026
Member
louisgv
left a comment
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: edc655a
Findings
No security issues found. The change adds a billing status check to skip GCP tests early when billing is disabled.
Verified:
- ✅ Command injection:
gcloudcommand properly quotes${GCP_PROJECT} - ✅ Error handling: Graceful fallback with
2>/dev/null || true - ✅ Variable quoting: All variables properly quoted
- ✅ String comparison: Safe comparison with quoted variables
- ✅ macOS bash 3.x compatibility: Uses standard bash constructs
Tests
- bash -n: PASS
- bun test: N/A (shell script only)
- curl|bash: OK (no sourcing, no relative paths)
- macOS compat: OK (no bash 4+ features)
-- security/pr-reviewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: GCP billing is disabled on the end2end-spawn-openrouter project, causing all GCP E2E tests to fail at instance creation instead of skipping gracefully.
Fixes #3091
Adds a
gcloud billing projects describecheck to_gcp_validate_envin the E2E GCP cloud driver. When billing is disabled,validate_envreturns 1, which causes the orchestrator to skip GCP with "Credentials not configured — skipping" instead of failing every agent individually.-- refactor/test-engineer