-
Notifications
You must be signed in to change notification settings - Fork 312
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
cluster: fix parsing of paths if there are redundant slashes in it #1068
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1068 +/- ##
===========================================
- Coverage 55.95% 39.10% -16.85%
===========================================
Files 282 281 -1
Lines 19898 19898
===========================================
- Hits 11133 7781 -3352
- Misses 7040 10874 +3834
+ Partials 1725 1243 -482
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/lgtm |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 3a42a5c
|
@AstroProfundis: Your PR has out-of-dated, I have automatically updated it for you. 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/ti-community-prow repository. |
…ingcap#1068) * cluster: not deleting deploy dir for imported instance * cluster/spec: trim slashes in paths Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
…1068) * cluster: not deleting deploy dir for imported instance * cluster/spec: trim slashes in paths Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
What problem does this PR solve?
If an imported cluster has deploy dir ending with
/
, and sub dirs as<deploy-dir>//sub
, the result ofCountDir()
may not be accurate, and could results to delete wrong paths onscale-in
.One of the case is when:
/foo/
, and/foo//log
, and1.2.3.4
, andThe deploy dir will be deleted when
scale-in
the grafana instance, so that the tidb instance is also broken.What is changed and how it works?
Check List
Tests
Code changes
Related changes
Release notes: