cmd: fix mirror clone help panic#2717
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2717 +/- ##
==========================================
+ Coverage 36.22% 42.29% +6.07%
==========================================
Files 329 426 +97
Lines 35405 47330 +11925
==========================================
+ Hits 12823 20015 +7192
- Misses 20754 24618 +3864
- Partials 1828 2697 +869 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e8d5a65 to
b271fca
Compare
b271fca to
2d91390
Compare
What problem does this PR solve?
Issue Number: N/A
tiup mirror clone -hpanics because the root command skips environment initialization for help requests. Unlike most commands,mirror clonebuilds part of its help output from the remote mirror index so it needs the TiUP environment even on the help path.What is changed and how it works?
mirror clone -h/--helpin the root command so it does not skip environment initialization.mirror clonedynamic component flag initialization path intact, so help still includes component flags such as--tidband--tikv.mirror cloneinitializedmarker to after component flags are successfully loaded, so a failed index fetch does not prevent later retries.UptimeByHostcall for the current signature;Check List
Tests
Manual test:
Local validation:
go test ./cmd ./pkg/cluster/spec ./components/playground make lint git diff --checkCode changes
Side effects
Related changes
Release notes: