-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
rpc: Add caching support (backport #9650) #9665
Open
mergify
wants to merge
3
commits into
v0.37.x
Choose a base branch
from
mergify/bp/v0.37.x/pr-9650
base: v0.37.x
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
* Set cache control in the HTTP-RPC response header * Add a simply cache policy to the RPC routes * add a condition to check the RPC request has default height settings * fix cherry pick error * update pending log * use options struct intead of single parameter * refacor FuncOptions to functional options * add functional options in WebSocket RPC function * revert doc * replace deprecated function call * revise functional options * remove unuse comment * fix revised error * adjust cache-control settings * Update rpc/jsonrpc/server/http_json_handler.go Co-authored-by: Thane Thomson <connect@thanethomson.com> * linter: Fix false positive Signed-off-by: Thane Thomson <connect@thanethomson.com> * rpc: Separate cacheable and non-cacheable HTTP response writers Allows us to roll this change out in a non-API-breaking way, since this is an additive change. Signed-off-by: Thane Thomson <connect@thanethomson.com> * rpc: Ensure consistent caching strategy Ensure a consistent caching strategy across both JSONRPC- and URI-based requests. This requires a bit of a refactor of the previous caching logic, which is complicated a little by the complex reflection-based approach taken in the Tendermint RPC. Signed-off-by: Thane Thomson <connect@thanethomson.com> * rpc: Add more tests for caching Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update CHANGELOG_PENDING Signed-off-by: Thane Thomson <connect@thanethomson.com> * light: Sync routes config with RPC core Signed-off-by: Thane Thomson <connect@thanethomson.com> * rpc: Update OpenAPI docs Signed-off-by: Thane Thomson <connect@thanethomson.com> Signed-off-by: Thane Thomson <connect@thanethomson.com> Co-authored-by: jayt106 <jaytseng106@gmail.com> Co-authored-by: jay tseng <jay.tseng@crypto.com> Co-authored-by: JayT106 <JayT106@users.noreply.github.com> (cherry picked from commit 816c6ba) # Conflicts: # CHANGELOG_PENDING.md # test/fuzz/tests/rpc_jsonrpc_server_test.go
Signed-off-by: Thane Thomson <connect@thanethomson.com>
thanethomson
added
the
S:wip
Work in progress (prevents stalebot from automatically closing)
label
Nov 5, 2022
sergio-mena
approved these changes
Nov 7, 2022
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.
LGTM
@sergio-mena would you recommend holding off on merging this until v0.37.1? |
I would say so |
this is a big deal. Thanks team. |
7 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.
This is an automatic backport of pull request #9650 done by Mergify.
Cherry-pick of 816c6ba has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com