tarantool / tarantool/tt

tt clean don't show files it is going to delete before confirmation

Open
#1,237 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
113
Forks
18
Avg merge
4d 11h
Merged PRs (30d)
23

Description

tt clean must show files it is going to delete before confirmation:

To avoid accidental deletion of files, tt clean shows the files it is going to delete and asks for confirmation.

But it doesn't.

...
   • Processing application instances file
   • Instance "instance001"
   • Instance "instance002"
   • Instance "instance003"

Confirm [y/n]: y
   • removed "/doc_src/snippets/centralized_config/instances.enabled/tarantool_config_storage/var/log/instance001/tt.log"
   • removed "/doc_src/snippets/centralized_config/instances.enabled/tarantool_config_storage/var/lib/instance001/00000000000000000000.snap"
   • removed "/doc_src/snippets/centralized_config/instances.enabled/tarantool_config_storage/var/lib/instance001/00000000000000000000.xlog"
   • removed "/doc_src/snippets/centralized_config/instances.enabled/tarantool_config_storage/var/lib/instance001/00000000000000000037.xlog"
   • removed "/doc_src/snippets/centralized_config/instances.enabled/tarantool_config_storage/var/lib/instance001/00000000000000000041.snap"
   • removed "/doc_src/snippets/centralized_config/instances.enabled/tarantool_config_storage/var/lib/instance001/00000000000000000041.xlog"
   • tarantool_config_storage:instance001...	[OK]

See:
https://github.com/tarantool/tt/blob/7dd32dc820de4d39170e4f8e5845a250bb0e3bfb/cli/cmd/clean.go#L76-L89

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cli/cmd/clean.go at the referenced lines and compare the command's output with the clean documentation. Run tt clean against an application containing removable files and verify that every file slated for deletion is listed before the confirmation prompt.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.