influxdata / influxdata/influx-cli

[FR] Add Y/N confirm in delete predicate

Open
#128 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
75
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Hello!

Now i'am doing data delete by this command:

`influx delete --bucket Bucket_Name --org My_Org --start '1970-01-01T00:00:00Z' --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --predicate '_measurement="metrics"'`

This will delete all data in "metrics"

You can insert interactive "Yes/No" asking in this for that somebody will not loose his measurements by accident. Looks like that:

```
influx delete --bucket Bucket_Name --org My_Org --start '1970-01-01T00:00:00Z' --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --predicate '_measurement="metrics"'
Are You sure to delete whole measurement "metrics"?
Type Yes/No:
Yes
Measurement "metrics" and all it's data were deleted.
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the `influx delete` command and its handling of the `--predicate` option. Add an interactive Yes/No confirmation before deletion, then verify that confirming proceeds, declining prevents deletion, and the requested measurement and data are reported accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.