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

clean: Warn for cleanup failures due to missing datadir #2105

Merged
merged 2 commits into from
Feb 2, 2023

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Jan 17, 2023

What problem does this PR solve?

If the tiup_process_meta file is missing in a datadir of a tiup playground then tiup clean will silently skipp it.

This changes this to show a message in case this happens.

$ tiup clean TS9acXe
Can't clean directory due to missing meta file: /home/dvaneeden/.tiup/data/TS9acXe
$ tiup clean --all
Can't clean directory due to missing meta file: /home/dvaneeden/.tiup/data/TS9acXe
Clean instance of `playground`, directory: /home/dvaneeden/.tiup/data/foo

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Release notes:

The `tiup clean` command now shows a message if it can't cleanup a directory due to a missing `tiup_process_meta` file.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 17, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • kaaaaaaang

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 Jan 17, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2023

Codecov Report

Base: 53.54% // Head: 50.14% // Decreases project coverage by -3.39% ⚠️

Coverage data is based on head (764b412) compared to base (d014d03).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2105      +/-   ##
==========================================
- Coverage   53.54%   50.14%   -3.39%     
==========================================
  Files         313      313              
  Lines       33191    33193       +2     
==========================================
- Hits        17769    16644    -1125     
- Misses      13295    14534    +1239     
+ Partials     2127     2015     -112     
Flag Coverage Δ
cluster 34.42% <ø> (-5.06%) ⬇️
dm 26.24% <ø> (ø)
playground 15.27% <ø> (ø)
tiup 16.50% <0.00%> (-<0.01%) ⬇️
unittest 22.77% <0.00%> (-<0.01%) ⬇️

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

Impacted Files Coverage Δ
cmd/clean.go 34.04% <0.00%> (-1.51%) ⬇️
pkg/cluster/operation/systemd.go 0.00% <0.00%> (-86.36%) ⬇️
pkg/cluster/task/limits.go 0.00% <0.00%> (-65.22%) ⬇️
pkg/cluster/manager/check.go 4.91% <0.00%> (-64.50%) ⬇️
pkg/cluster/task/sysctl.go 0.00% <0.00%> (-63.64%) ⬇️
pkg/cluster/manager/cleanup.go 0.00% <0.00%> (-59.13%) ⬇️
pkg/cluster/template/config/alertmanager.go 0.00% <0.00%> (-55.00%) ⬇️
pkg/cluster/task/copy_file.go 0.00% <0.00%> (-52.94%) ⬇️
pkg/cluster/operation/check.go 0.00% <0.00%> (-47.74%) ⬇️
pkg/cluster/task/rmdir.go 0.00% <0.00%> (-46.67%) ⬇️
... and 75 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@nexustar nexustar added this to the 1.11.2 milestone Feb 2, 2023
@ti-chi-bot
Copy link
Member

@nexustar: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

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.

@kaaaaaaang
Copy link
Collaborator

/merge

@ti-chi-bot
Copy link
Member

@kaaaaaaang: /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 Feb 2, 2023
@kaaaaaaang
Copy link
Collaborator

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 20a293f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 2, 2023
@ti-chi-bot
Copy link
Member

@dveeden: Your PR was out of date, 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/tichi repository.

@ti-chi-bot ti-chi-bot merged commit 0f38c96 into pingcap:master Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 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.

5 participants