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

playground: fix bug which can't specify db port #1511

Merged

Conversation

hecomlilong
Copy link
Contributor

What problem does this PR solve?

The command "tiup playground" can't specify db port even though customizing --db.config

What is changed and how it works?

When db port is specified, it will be passed by parameter -P in function of "NewTiDBInstance"

Check List

Tests

  • Unit test
  • Integration test

Code changes

NONE

Side effects
NONE

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 8, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AstroProfundis

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.

@CLAassistant
Copy link

CLAassistant commented Aug 8, 2021

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot requested review from july2993 and lonng August 8, 2021 08:28
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 8, 2021
@AstroProfundis AstroProfundis added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. component/playground Issues about the tiup-playground component labels Aug 9, 2021
"testing"

"github.com/BurntSushi/toml"
"github.com/pingcap/tidb/config"
Copy link
Contributor

Choose a reason for hiding this comment

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

We are avoiding dependency upon tidb and other components by intend, please use general interface objects (map[string]interface{} with type assertion) to decode the config.

Or simply provide a command line argument in playground to specify TiDB port and overwrite the default.

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 11, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 13, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2021

Codecov Report

Merging #1511 (f32e266) into master (c12fd8e) will increase coverage by 29.90%.
The diff coverage is 60.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1511       +/-   ##
===========================================
+ Coverage   26.26%   56.17%   +29.90%     
===========================================
  Files         267      292       +25     
  Lines       24047    26222     +2175     
===========================================
+ Hits         6316    14730     +8414     
+ Misses      16908     9470     -7438     
- Partials      823     2022     +1199     
Flag Coverage Δ
cluster 44.02% <ø> (?)
dm 26.27% <ø> (?)
integrate 50.74% <60.00%> (+34.69%) ⬆️
playground 13.75% <60.00%> (?)
tiup 16.04% <ø> (ø)
unittest 22.82% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
components/playground/instance/instance.go 51.72% <ø> (ø)
components/playground/main.go 45.71% <20.00%> (+43.34%) ⬆️
components/playground/instance/tidb.go 84.61% <100.00%> (ø)
components/playground/playground.go 49.22% <100.00%> (+49.22%) ⬆️
pkg/logger/logger.go 100.00% <0.00%> (ø)
components/playground/instance/pd.go 75.00% <0.00%> (ø)
pkg/cluster/operation/upgrade.go 59.48% <0.00%> (ø)
pkg/cluster/operation/telemetry.go 0.00% <0.00%> (ø)
components/dm/task/update_dm_meta.go 86.04% <0.00%> (ø)
... and 216 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 c12fd8e...f32e266. Read the comment docs.

@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: f32e266

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 16, 2021
@AstroProfundis AstroProfundis added this to the v1.5.5 milestone Aug 16, 2021
@ti-chi-bot ti-chi-bot merged commit c66dc09 into pingcap:master Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/playground Issues about the tiup-playground component good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants