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

lightning: fix lightning TLS.WithHost to access the correct host #45749

Merged
merged 3 commits into from Aug 3, 2023

Conversation

lichunzhu
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #45747

Problem Summary:

What is changed and how it works?

TrimPrefix before WithHost

Check List

Tests

  • Unit test

Side effects

  • None

Documentation

  • None

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 2, 2023
@tiprow
Copy link

tiprow bot commented Aug 2, 2023

Hi @lichunzhu. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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 kubernetes/test-infra repository.

@lichunzhu
Copy link
Contributor Author

/run-br-integration-test

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #45749 (bb979f2) into master (412fa13) will increase coverage by 0.2139%.
Report is 10 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #45749        +/-   ##
================================================
+ Coverage   73.3314%   73.5453%   +0.2139%     
================================================
  Files          1271       1274         +3     
  Lines        392954     395107      +2153     
================================================
+ Hits         288159     290583      +2424     
+ Misses        86415      86213       -202     
+ Partials      18380      18311        -69     
Flag Coverage Δ
integration 78.1388% <ø> (?)
unit 73.5375% <100.0000%> (+0.2060%) ⬆️

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

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 85.0467% <ø> (ø)
br 52.0692% <100.0000%> (+0.0709%) ⬆️

@lichunzhu
Copy link
Contributor Author

/run-br-integration-test

@lance6716
Copy link
Contributor

/test pull-br-integration-test

@tiprow
Copy link

tiprow bot commented Aug 2, 2023

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-br-integration-test

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 kubernetes/test-infra repository.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 2, 2023

@lichunzhu: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-br-integration-test 4e5c9aa link true /test pull-br-integration-test

Full PR test history. Your PR dashboard.

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@lichunzhu
Copy link
Contributor Author

lichunzhu commented Aug 2, 2023

@GMHDBJD @lance6716 @D3Hunter PTAL
The failed test cases seem to be caused by TiFlash problem

// WithHost creates a new TLS instance with the host replaced.
func (tc *TLS) WithHost(host string) *TLS {
host = strings.TrimPrefix(host, "http://")
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove url = "https://" + host instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some host has a scheme while some doesn't. To avoid users configure a wrong url, I remove both scheme.

@lance6716
Copy link
Contributor

/approve

@ti-chi-bot ti-chi-bot bot added the approved label Aug 2, 2023
@lichunzhu
Copy link
Contributor Author

/test pull-br-integration-test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 3, 2023

@lichunzhu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test canary-scan-security
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-ddl-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-mysql-connector-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test pull-notify-when-compatibility-sections-changed

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test pull-br-integration-test

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 kubernetes/test-infra repository.

@tiprow
Copy link

tiprow bot commented Aug 3, 2023

@lichunzhu: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-br-integration-test

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 kubernetes/test-infra repository.

Copy link
Contributor

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

LGTM

@lance6716
Copy link
Contributor

/lgtm

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GMHDBJD, lance6716

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 3, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-03 06:20:41.050982556 +0000 UTC m=+339124.993331087: ☑️ agreed by GMHDBJD.
  • 2023-08-03 06:21:00.10958502 +0000 UTC m=+339144.051933551: ☑️ agreed by lance6716.

@lichunzhu
Copy link
Contributor Author

/test pull-br-integration-test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 3, 2023

@lichunzhu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test canary-scan-security
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-ddl-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-mysql-connector-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test pull-notify-when-compatibility-sections-changed

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test pull-br-integration-test

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 kubernetes/test-infra repository.

@tiprow
Copy link

tiprow bot commented Aug 3, 2023

@lichunzhu: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-br-integration-test

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit d3836c9 into pingcap:master Aug 3, 2023
20 of 26 checks passed
@lichunzhu lichunzhu deleted the fixLightningTLS branch August 3, 2023 09:27
lichunzhu added a commit to ti-chi-bot/tidb that referenced this pull request Aug 16, 2023
@lance6716
Copy link
Contributor

/cherry-pick release-7.1

@ti-chi-bot
Copy link
Member

@lance6716: new pull request created to branch release-7.1: #47734.

In response to this:

/cherry-pick release-7.1

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lightning failed to parse host
4 participants