Repository navigation
testserver: optional response headers on fault rules - #7784
Draft
yuanjieding-db wants to merge 1 commit into
Draft
yuanjieding-db wants to merge 1 commit into
yuanjieding-db wants to merge 1 commit into
Conversation
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/cmd/fs/cp-r-requests: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): same output as main (4e503ea) |
A fault rule can now carry headers that are added to its response, so an acceptance test can return, e.g., Retry-After with an injected 503. fault.py takes them as --header NAME:VALUE. Existing rules are unchanged. The fault endpoint now calls set directly to pass the headers, which leaves FaultRules.SetAfterHandler without callers, so it is removed. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 3dd7522
Top 9 slowest tests (at least 2 minutes):
|
yuanjieding-db
force-pushed
the
yuanjieding-db/testserver-fault-headers
branch
from
November 18, 2026 19:02
99ea713 to
3dd7522
Compare
This was referenced Nov 18, 2026
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.
Stack. Each PR is based on the one before it, so its diff shows only its own change.
This is part 2.
Changes
A testserver fault rule can now carry response headers.
fault.pytakes them as--header NAME:VALUE, repeated for more headers. Existing rules are unchanged. The fault endpoint now callssetdirectly to pass the headers, soFaultRules.SetAfterHandlerhas no callers left and is removed. This is test infrastructure only, so there's no release note.Why
The breaker's acceptance test in #7786 needs a 500 that carries
Retry-After.Tests
TestServerFaultHeaders: the header is on the fault response and not on the next one.go test ./acceptancesuite, including every test that usesfault.py.Self-review
Isaac review: no findings.
/code-review(medium), 7 findings:--headeraccepted an empty or missing name. It now exits with--header needs NAME:VALUE.Headerswas exported, unlike its sibling fields. It's unexported now, which also keeps code outside the package from changing the map that copies returned byCheckshare.http.Headercanonicalizes them. No test needs that.--body-containshas no bounds check. That's existing code, outside this change.settakes positional arguments. A struct would be a bigger refactor than this one helper needs.This pull request and its description were written by Isaac.