Repository navigation
[PoC] Support fault injection in cloud acceptance runs - #7240
Draft
shreyas-goenka wants to merge 3 commits into
Draft
shreyas-goenka wants to merge 3 commits into
shreyas-goenka wants to merge 3 commits into
Conversation
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=0 unreleased=0 coverage=1 failing=0
|
Collaborator
Integration test reportCommit: f073dd4
Top 3 slowest tests (at least 2 minutes):
|
This branch has not been deployed
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.
Changes
Cloud acceptance tests can opt into
Proxy = trueand use existingfault.pycommands. The proxy handles fault registration locally, blocks calls for normal faults, and preserves real upstream effects for--after-handlerfaults.Reuse
testserver.FaultRulesand share its JSON registration logic. Keep rules scoped to the incoming synthetic test token, with separate SDK-authenticated upstream credentials. Replace the proxy's retrying API forwarding with HTTP forwarding that preserves statuses, bodies, queries, and response headers. Reject proxy configurations requiring unreachable localhost access from serverless.Why
fault.pycurrently registers rules only on the fake server, so fault-based tests cannot run against a real workspace. Extending the existing proxy gives local and cloud tests the same registration and matching behavior.Tests
selftest/fault_proxy, with recording disabled: blocked mutation, committed mutation followed by an injected error, and recovery from an after-handler 503.Cloud E2E on commit
079f9f3998b8verifiedTestAccept/selftest/fault_proxyagainst real workspaces, with exactly one test selected and zero skipped in each Linux job:Each run proved the pre-forwarding fault prevented a real mutation, the after-handler fault retained a real mutation, and the CLI recovered from an after-handler 503. The test cleans up its workspace directory and starts no compute.
That revision also passed the full CI lint, formatting, generated-file, and Linux DMS test checks. After keeping the matcher in
testserver, focused race tests, all six proxy selftests, and Go lint pass locally; CI reruns on the update.The corporate Go proxy currently blocks the repository's
x/net v0.62.0as recently published. Local validation used a temporary module override to cachedv0.61.0; repository dependency files are unchanged.