-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REFACTORED] Add support for Thrift and HTTP client-side fault injection. #673
Merged
HiramSilvey
merged 3 commits into
reddit:master
from
HiramSilvey:refactored-fault-injection
Jan 22, 2025
Merged
[REFACTORED] Add support for Thrift and HTTP client-side fault injection. #673
HiramSilvey
merged 3 commits into
reddit:master
from
HiramSilvey:refactored-fault-injection
Jan 22, 2025
Conversation
This file contains 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
HiramSilvey
changed the title
Refactored fault injection
[REFACTORED] Add support for Thrift and HTTP client-side fault injection.
Jan 16, 2025
HiramSilvey
requested review from
fishy,
kylelemons and
konradreiche
and removed request for
a team
January 17, 2025 21:52
fishy
reviewed
Jan 21, 2025
konradreiche
requested changes
Jan 21, 2025
konradreiche
requested review from
konradreiche
and removed request for
konradreiche
January 21, 2025 18:43
fishy
approved these changes
Jan 21, 2025
konradreiche
approved these changes
Jan 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, a couple more asks but nothing blocking as far as I can tell 🙂
HiramSilvey
force-pushed
the
refactored-fault-injection
branch
from
January 22, 2025 19:33
eeb64ac
to
0e9d4a2
Compare
3 tasks
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.
💸 TL;DR
NOTE: This is a refactor of the approved PR #666 based on offline feedback. In addition to being a refactor, this also moves the fault injection middleware to be the final middleware for each protocol, as it is meant to simulate the upstream service being unavailable.
This PR introduces client-side fault injection capability to HTTP and Thrift clients. The behavior is controlled via new
X-Bp-Fault
headers, and does nothing if they aren't present, are invalid, or don't match the outgoing request.📜 Details
If clients are currently passing matching
X-Bp-Fault
headers around and they happen to be valid according to this change, then unintended fault injection could take place. This is extremely unlikely to occur given how specific the headers and their valid values are, but I wanted to call it out as technically it could affect requests unintentionally.🧪 Testing Steps / Validation
Thorough unit tests were added across the common library and protocol-specific code.
✅ Checks