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

br: make br help sync with the new checksum default value #58558

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

BornChanger
Copy link
Contributor

@BornChanger BornChanger commented Dec 26, 2024

What problem does this PR solve?

Issue Number: close #58559

Problem Summary:

What changed and how does it work?

make the br output gives the correct --checksum default values for br backup --help and br restore --help commands respetively.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
image image
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

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 do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 26, 2024
Copy link

tiprow bot commented Dec 26, 2024

Hi @BornChanger. 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-sigs/prow repository.

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 73.4025%. Comparing base (ef7ade7) to head (0625788).
Report is 34 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58558        +/-   ##
================================================
- Coverage   73.5359%   73.4025%   -0.1334%     
================================================
  Files          1681       1681                
  Lines        464055     472482      +8427     
================================================
+ Hits         341247     346814      +5567     
- Misses       101997     104749      +2752     
- Partials      20811      20919       +108     
Flag Coverage Δ
integration 42.8881% <0.0000%> (?)

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 44.9760% <0.0000%> (-0.7907%) ⬇️

@BornChanger
Copy link
Contributor Author

/cc @Tristan1900

Copy link

ti-chi-bot bot commented Dec 26, 2024

@BornChanger: GitHub didn't allow me to request PR reviews from the following users: Tristan1900.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @Tristan1900

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-sigs/prow repository.

Signed-off-by: BornChanger <[email protected]>
Copy link

ti-chi-bot bot commented Dec 26, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from bornchanger, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 26, 2024
Signed-off-by: BornChanger <[email protected]>
Copy link
Contributor

@Tristan1900 Tristan1900 left a comment

Choose a reason for hiding this comment

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

Thanks for the change! Agree it's cleaner to have two separate variables to control the checksum

@@ -609,9 +606,6 @@ func (cfg *Config) ParseFromFlags(flags *pflag.FlagSet) error {
return errors.Trace(err)
}

if cfg.Checksum, err = flags.GetBool(FlagChecksum); err != nil {
Copy link
Contributor

@Tristan1900 Tristan1900 Dec 26, 2024

Choose a reason for hiding this comment

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

if we decide to have two separate configs to control checksum, i.e. backupChecksum, restoreChecksum, I guess we need to parse them in their respective cfg so code can actually use.

I think the flow is like

  1. parse flags if it's from cmd.
  2. build cfg either from cmd flags or directly in brie
  3. pass cfg to backup/restore functions

Signed-off-by: BornChanger <[email protected]>
Copy link

ti-chi-bot bot commented Dec 27, 2024

@BornChanger: The following tests 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 0625788 link true /test pull-br-integration-test
idc-jenkins-ci-tidb/unit-test 0625788 link true /test unit-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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. 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.

br: br backup command help gives incorrect default value for checkum
2 participants