pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
411 stars 304 forks source link

use port to probe db in playground #2296

Closed KanShiori closed 8 months ago

KanShiori commented 8 months ago

What problem does this PR solve?

Close #2221

What is changed and how it works?

Use port not root user to probe db in playground.

Check List

Tests

  1. Create a tidb configuration that contains init SQL to init root password.

    # init.sql
    ALTER USER 'root'@'%' IDENTIFIED BY '123';
    # tidb.toml
    initialize-sql-file = "/root/shiori/pingcap/tiup/bin/init.sql"
  2. Execute tiup playground --db.config tidb.toml. image

  3. Connect db with password successfully. image

    • No code

Code changes

Side effects

Related changes

Release notes:

NONE
codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (bdf6f26) 55.54% compared to head (2aa3450) 55.53%.

:exclamation: Current head 2aa3450 differs from pull request most recent head a43b536. Consider uploading reports for the commit a43b536 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2296 +/- ## ========================================== - Coverage 55.54% 55.53% -0.01% ========================================== Files 326 326 Lines 34421 34413 -8 ========================================== - Hits 19117 19109 -8 Misses 13022 13022 Partials 2282 2282 ``` | [Flag](https://app.codecov.io/gh/pingcap/tiup/pull/2296/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [playground](https://app.codecov.io/gh/pingcap/tiup/pull/2296/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `15.47% <100.00%> (-0.05%)` | :arrow_down: | | [tiup](https://app.codecov.io/gh/pingcap/tiup/pull/2296/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `15.68% <ø> (ø)` | | | [unittest](https://app.codecov.io/gh/pingcap/tiup/pull/2296/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `22.47% <0.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/pingcap/tiup/pull/2296?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [components/playground/main.go](https://app.codecov.io/gh/pingcap/tiup/pull/2296?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-Y29tcG9uZW50cy9wbGF5Z3JvdW5kL21haW4uZ28=) | `59.37% <100.00%> (-0.06%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/pingcap/tiup/pull/2296/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kaaaaaaang commented 8 months ago

/lgtm

kaaaaaaang commented 8 months ago

/approve

ti-chi-bot[bot] commented 8 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaaaaaaang

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: - ~~[OWNERS](https://github.com/pingcap/tiup/blob/master/OWNERS)~~ [kaaaaaaang] 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[bot] commented 8 months ago

[LGTM Timeline notifier]

Timeline:

ti-chi-bot[bot] commented 8 months ago

New changes are detected. LGTM label has been removed.