Skip to content
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

[fast-client][server] Throw 403 for metadata request that does not have storage read quota enabled #975

Merged
merged 2 commits into from May 13, 2024

Conversation

xunyin8
Copy link
Contributor

@xunyin8 xunyin8 commented May 6, 2024

[fast-client][server] Throw 403 for metadata request that does not have storage read quota enabled

  1. The idea is to block new fast-client traffic that do not have storage node read quota enabled. New client version will fail fast and have a clear error message to direct the user on what's missing. Old client versions will keep failing the metadata request and the user will also see the error message once dig deeper into the error trace.

How was this PR tested?

Unit test and integration test

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

adamxchen
adamxchen previously approved these changes May 6, 2024
Copy link
Collaborator

@adamxchen adamxchen left a comment

Choose a reason for hiding this comment

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

Looks good to me overall. Just have one nit. And for my curiosity, have we ensured all fast client would have storage read quota enabled? Like, when they onboard, will this config be turned on automatically?

@xunyin8
Copy link
Contributor Author

xunyin8 commented May 6, 2024

Looks good to me overall. Just have one nit. And for my curiosity, have we ensured all fast client would have storage read quota enabled? Like, when they onboard, will this config be turned on automatically?

This is done manually for now but later it can and will be automated/self serve.

@xunyin8 xunyin8 force-pushed the BlockNonSNEnabledFC branch 2 times, most recently from 4d5ced4 to 3244fe2 Compare May 8, 2024 00:21
…ve storage read quota enabled

1. The idea is to block new fast-client traffic that do not have storage node read quota enabled.
New client version will fail fast and have a clear error message to direct the user on what's missing.
Old client versions will keep failing the metadata request and the user will also see the error
message once dig deeper into the error trace.
@xunyin8 xunyin8 force-pushed the BlockNonSNEnabledFC branch 2 times, most recently from e6b1a48 to 699081e Compare May 8, 2024 18:04
Copy link
Collaborator

@adamxchen adamxchen left a comment

Choose a reason for hiding this comment

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

Thank you!

@xunyin8 xunyin8 merged commit db36ee2 into linkedin:main May 13, 2024
32 checks passed
mynameborat added a commit that referenced this pull request May 21, 2024
- Fix tests failures due to [fast-client][server] Throw 403 for metadata request that does not have storage read quota enabled #975
- Extracting the test fixes from [internal][client] Support GRPC port discovery for non-local environment #987
- Reset storage node read quota enabled flag prior to each test in FastClientIndividualFeatureConfigurationTest

Co-authored-by: Bharath Kumarasubramanian <bkumarasubramanian@linkedin.com>
mynameborat added a commit that referenced this pull request May 23, 2024
…ent (#987)

- [Functional] Introduce logic to use fallback Grpc port for netty server address -> Grpc server mapping
- [Refactor] Modularize request handling and remove boiler plate in GrpcTransportClient
- [Bug fix] Fix integration tests that was failing due to [fast-client][server] Throw 403 for metadata request that does not have storage read quota enabled #975
- [Clean up] Remove some validations, added few invariants check and reorganize some depending on the mode (local vs integration/production)
- [Clean up] Rename fields to remove type information
- [Test] Add unit tests for GrpcTransportClient class

Co-authored-by: Bharath Kumarasubramanian <bkumaras@linkedin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants