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

dashboard: fix a bug that could not handle proxy requests correctly #5326

Merged
merged 7 commits into from
Jul 21, 2022

Conversation

HunDunDM
Copy link
Member

What problem does this PR solve?

Issue Number: Close #5321

What is changed and how does it work?

Only process headers added by PD.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

Fix a bug that could not handle dashboard proxy requests correctly.

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: HunDunDM <hundundm@gmail.com>
@HunDunDM HunDunDM added the type/bugfix This PR fixes a bug. label Jul 18, 2022
@HunDunDM HunDunDM requested a review from rleungx July 18, 2022 08:44
@HunDunDM HunDunDM self-assigned this Jul 18, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 18, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-triage-completed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 18, 2022
@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #5326 (c900a99) into master (7b322e9) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5326      +/-   ##
==========================================
- Coverage   75.85%   75.77%   -0.08%     
==========================================
  Files         312      312              
  Lines       30999    31000       +1     
==========================================
- Hits        23514    23491      -23     
- Misses       5489     5504      +15     
- Partials     1996     2005       +9     
Flag Coverage Δ
unittests 75.77% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/dashboard/adapter/redirector.go 91.30% <100.00%> (+6.85%) ⬆️
...erver/config/service_middleware_persist_options.go 91.66% <0.00%> (-8.34%) ⬇️
server/region_syncer/server.go 81.86% <0.00%> (-5.50%) ⬇️
pkg/etcdutil/etcdutil.go 84.88% <0.00%> (-3.49%) ⬇️
server/schedulers/random_merge.go 61.29% <0.00%> (-3.23%) ⬇️
server/region_syncer/client.go 85.82% <0.00%> (-2.24%) ⬇️
server/schedule/hbstream/heartbeat_streams.go 72.72% <0.00%> (-2.03%) ⬇️
server/tso/tso.go 72.88% <0.00%> (-1.70%) ⬇️
server/server.go 74.56% <0.00%> (-1.20%) ⬇️
server/grpc_service.go 51.70% <0.00%> (-0.81%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b322e9...c900a99. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 18, 2022

suite.redirector.SetAddress(suite.tempServer.URL)
// Test normal forwarding
req, err := http.NewRequest("GET", redirectorServer.URL, nil)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
req, err := http.NewRequest("GET", redirectorServer.URL, nil)
req, err := http.NewRequest(http.MethodGet, redirectorServer.URL, nil)

Please replace all with http.MethodGet.

Signed-off-by: HunDunDM <hundundm@gmail.com>
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 19, 2022
@nolouch
Copy link
Contributor

nolouch commented Jul 20, 2022

/merge

@ti-chi-bot
Copy link
Member

@nolouch: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 424fedf

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 20, 2022
@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. and removed do-not-merge/needs-triage-completed labels Jul 21, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5345.

@rleungx
Copy link
Member

rleungx commented Jul 26, 2022

/run-cherry-picker

@rleungx rleungx added needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. labels Jul 26, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5353.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5354.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5355.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5356.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5357.

HunDunDM added a commit to HunDunDM/pd that referenced this pull request Jul 27, 2022
HunDunDM added a commit to HunDunDM/pd that referenced this pull request Jul 27, 2022
ti-chi-bot pushed a commit that referenced this pull request Jul 27, 2022
…5326) (#5365)

close #5321, ref #5326

Signed-off-by: HunDunDM <hundundm@gmail.com>
@nolouch nolouch deleted the fix-5321 branch September 20, 2022 07:27
ti-chi-bot added a commit that referenced this pull request Sep 20, 2022
…5326) (#5357)

close #5321, ref #5326

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: HunDunDM <hundundm@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot added a commit that referenced this pull request Sep 20, 2022
…5326) (#5345)

close #5321, ref #5326

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: HunDunDM <hundundm@gmail.com>
Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot added a commit that referenced this pull request Sep 20, 2022
…5326) (#5356)

close #5321, ref #5326

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: HunDunDM <hundundm@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot added a commit that referenced this pull request Sep 20, 2022
…5326) (#5355)

close #5321, ref #5326

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: HunDunDM <hundundm@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot added a commit that referenced this pull request Sep 20, 2022
…5326) (#5354)

close #5321, ref #5326

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: HunDunDM <hundundm@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot added a commit that referenced this pull request Sep 20, 2022
…5326) (#5353)

close #5321, ref #5326

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: HunDunDM <hundundm@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal proxy cannot work as expected
5 participants