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

dumpling/gcs: fix http client credential problem #29414

Merged
merged 9 commits into from
Nov 4, 2021

Conversation

lichunzhu
Copy link
Contributor

@lichunzhu lichunzhu commented Nov 3, 2021

What problem does this PR solve?

Dumpling will fail to export data to GCS because of a lack of privileges when we set our own HTTP client without specifying transport tls.
Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

Check List

Tests

  • [] Unit test
  • [] Integration test
  • Manual test (add detailed scripts or steps below)
    Test dump data with dumpling before/after this commit. Before this commit GCS will return a gcs error "google api: Error 401: anonymous caller does not have storage.object.create access to the Google Cloud Storage object.". After this commit dumpling can successfully dump data to GCS.

Release note

fix failing dumping to gcs bug

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 3, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • glorv
  • kennytm

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 3, 2021
@lichunzhu lichunzhu added component/dumpling This is related to Dumpling of TiDB. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 3, 2021
@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 3, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 4, 2021
maxIdleConnsPerHost := http.DefaultMaxIdleConnsPerHost
if conf.Threads > maxIdleConnsPerHost {
maxIdleConnsPerHost = conf.Threads
}
Copy link
Contributor

@kennytm kennytm Nov 4, 2021

Choose a reason for hiding this comment

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

this conf.Threads no longer affects the HTTP client though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't support certification well now when we specify our own httpClient. I add a TODO maybe we can do this better in the future.

@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 Nov 4, 2021
@glorv glorv added the needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 label Nov 4, 2021
@kennytm
Copy link
Contributor

kennytm commented Nov 4, 2021

/merge

(check_dev_2 error is caused by #29412)

@ti-chi-bot
Copy link
Member

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

Commit hash: a4fa34b

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 4, 2021
@ti-chi-bot ti-chi-bot merged commit 3f7a933 into pingcap:master Nov 4, 2021
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Nov 4, 2021
@ti-srebot
Copy link
Contributor

cherry pick to release-5.3 in PR #29458

@lichunzhu lichunzhu deleted the fixGcsBug branch November 4, 2021 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dumpling This is related to Dumpling of TiDB. needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants