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 "--tag" argument for subcommands. #1998

Merged
merged 3 commits into from
Aug 4, 2022

Conversation

pingyu
Copy link
Contributor

@pingyu pingyu commented Jul 26, 2022

Issue Number: #1997

Signed-off-by: pingyu yuping@pingcap.com

What problem does this PR solve?

Close #1997 .

What is changed and how it works?

Use rootCmd.PersistentFlags() to add the "--tag" argument, other than rootCmd.Flags(), which is invisible to subcommands. Refer to https://github.com/spf13/cobra/blob/main/user_guide.md#persistent-flags.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
bin/tiup-playground display --tag clst21-up
Pid     Role      Uptime
---     ----      ------
743313  pd        125h42m51.503041111s
743345  tikv      125h42m51.372436142s
743346  tikv-cdc  125h42m51.363139055s

Code changes

  • No.

Side effects

  • No.

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

Fix "--tag" argument for playground subcommands.

Issue Number: pingcap#1997

Signed-off-by: pingyu <yuping@pingcap.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 26, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nexustar

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 the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 26, 2022
Signed-off-by: pingyu <yuping@pingcap.com>
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 27, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1998 (56fc0f1) into master (e8fe110) will decrease coverage by 2.25%.
The diff coverage is n/a.

❗ Current head 56fc0f1 differs from pull request most recent head b2c523f. Consider uploading reports for the commit b2c523f to get more accurate results

@@            Coverage Diff             @@
##           master    #1998      +/-   ##
==========================================
- Coverage   44.93%   42.68%   -2.25%     
==========================================
  Files         308      272      -36     
  Lines       35887    31565    -4322     
==========================================
- Hits        16123    13472    -2651     
+ Misses      17828    16421    -1407     
+ Partials     1936     1672     -264     
Flag Coverage Δ
cluster 40.61% <ø> (+11.68%) ⬆️
dm 24.11% <ø> (ø)
playground ?
tiup ?
unittest ?

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

Impacted Files Coverage Δ
pkg/utils/regexp.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/store/store.go 0.00% <0.00%> (-100.00%) ⬇️
components/dm/ansible/worker.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/store/local.go 0.00% <0.00%> (-81.48%) ⬇️
pkg/telemetry/telemetry.go 0.00% <0.00%> (-81.25%) ⬇️
pkg/repository/utils/hash.go 0.00% <0.00%> (-81.25%) ⬇️
pkg/repository/model/publish.go 0.00% <0.00%> (-80.00%) ⬇️
pkg/utils/freeport.go 0.00% <0.00%> (-77.42%) ⬇️
pkg/repository/progress.go 23.08% <0.00%> (-76.92%) ⬇️
pkg/meta/err.go 0.00% <0.00%> (-76.19%) ⬇️
... and 163 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 e8fe110...b2c523f. Read the comment docs.

@nexustar
Copy link
Collaborator

nexustar commented Aug 4, 2022

/merge

@ti-chi-bot
Copy link
Member

@nexustar: /merge in this pull request requires 1 approval(s).

In response to this:

/merge

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 ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 4, 2022
@nexustar
Copy link
Collaborator

nexustar commented Aug 4, 2022

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: b2c523f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 4, 2022
@ti-chi-bot ti-chi-bot merged commit 4bfcbf8 into pingcap:master Aug 4, 2022
@nexustar nexustar added this to the v1.11.0 milestone Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

playground: "--tag" is not working for sub-commands
4 participants