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

server(cdc): avoid printing help messages when cdc server exits #5524

Merged
merged 15 commits into from
May 26, 2022

Conversation

crelax
Copy link
Contributor

@crelax crelax commented May 23, 2022

What problem does this PR solve?

Issue Number: close #5519

What is changed and how it works?

In func RunE() of the cdc server command, if no error occurs in the validation, return nil directly in spite of errors thrown by the execution. Handle the execution errors using cobra.CheckErr()

Tests

  • Integration test
    • tests/integration_tests/cdc_server_tips: The tests cover two scenarios: one cdc server command with invalid arguments should print usage tips, while the other is validated and should not.
  • Manual test
    • Start a tidb cluster and add a cluster using cdc server
    • Create a changefeed task using cli changefeed
    • Press Ctrl + C and in the terminal of cdc server and check whether there are prompt messages printed
Will it cause performance regression or break compatibility?

No

Do you need to update user documentation, design documentation or monitoring documentation?

No

Release note

Clear redundant cdc server prompt in a normal exit

@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 23, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3AceShowHand
  • liuzix

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. do-not-merge/needs-triage-completed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 23, 2022
@crelax crelax self-assigned this May 23, 2022
@crelax
Copy link
Contributor Author

crelax commented May 23, 2022

/run-check-issue-triage-complete

@liuzix liuzix changed the title (component/cdc-server) update: clear redundant cdc server prompt in a normal exit server(cdc): avoid printing help messages when cdc server exists May 23, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2022

Codecov Report

Merging #5524 (8a1a011) into master (fcea4d5) will increase coverage by 0.1679%.
The diff coverage is 60.3387%.

Flag Coverage Δ
cdc 61.5694% <62.0865%> (+0.4213%) ⬆️
dm 52.0497% <56.4728%> (+0.0070%) ⬆️

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

@@               Coverage Diff                @@
##             master      #5524        +/-   ##
================================================
+ Coverage   56.0768%   56.2448%   +0.1679%     
================================================
  Files           535        527         -8     
  Lines         70143      69866       -277     
================================================
- Hits          39334      39296        -38     
+ Misses        27078      26846       -232     
+ Partials       3731       3724         -7     

@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. label May 25, 2022
@sre-bot
Copy link

sre-bot commented May 25, 2022

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 25, 2022
@liuzix
Copy link
Contributor

liuzix commented May 25, 2022

/run-integration-tests

@liuzix liuzix requested a review from amyangfei May 25, 2022 05:23
@crelax crelax force-pushed the clear-redundant-cdc-server-prompt branch from a9e3220 to dcc50ce Compare May 25, 2022 06:15
@crelax crelax requested a review from liuzix May 25, 2022 06:37
@crelax crelax requested a review from amyangfei May 25, 2022 06:37
@crelax crelax added the affects-6.1 This bug affects the 6.1.x(LTS) versions. label May 25, 2022
@crelax
Copy link
Contributor Author

crelax commented May 25, 2022

/run-verify-test

@crelax crelax removed the affects-6.1 This bug affects the 6.1.x(LTS) versions. label May 25, 2022
@crelax
Copy link
Contributor Author

crelax commented May 25, 2022

/run-all-tests

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 26, 2022
@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 May 26, 2022
@3AceShowHand
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 8a1a011

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 26, 2022
@crelax
Copy link
Contributor Author

crelax commented May 26, 2022

/run-verify-test

@liuzix liuzix changed the title server(cdc): avoid printing help messages when cdc server exists server(cdc): avoid printing help messages when cdc server exits May 26, 2022
@ti-chi-bot ti-chi-bot merged commit 1c5e550 into pingcap:master May 26, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5604.

@crelax crelax deleted the clear-redundant-cdc-server-prompt branch June 20, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 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.

Redundant cdc server usage message in a normal exit
7 participants