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

Standardize influx CLI '--retention' type and accepted duration units #17107

Closed
sanderson opened this issue Mar 5, 2020 · 4 comments · Fixed by #17114
Closed

Standardize influx CLI '--retention' type and accepted duration units #17107

sanderson opened this issue Mar 5, 2020 · 4 comments · Fixed by #17114

Comments

@sanderson
Copy link
Contributor

Right now, two influx commands accept a --retention flag when creating a bucket.

  • influx setup
  • influx bucket create

influx setup's --retention flag expects an integer that represents the retention period in nanoseconds. influx bucket create expects a duration, but only in units up to hours.

Proposal:
Both commands should expect the same data type for the bucket retention period. We should also accept day and week duration units.

Current behavior:
Retention flags expect different input types. The one that does expect a duration value only accepts ns, us, ms, s, and h.

Desired behavior:
Retention flags should expect the same input type. In addition to the duration units already supported, they should also support days d, and potentially even weeks w.

Use case:
Better UX

@jsteenb2
Copy link
Contributor

jsteenb2 commented Mar 5, 2020

@sanderson do you have any suggestion for what the description of retention period should read? While we got the hood open...

@sanderson
Copy link
Contributor Author

@jsteenb2 Duration bucket will retain data

@sanderson
Copy link
Contributor Author

@jsteenb2 from influx setup -h:

-r, --retention duration   Duration bucket will retain data. 0 is infinite. Default is 0. (default -1ns)

Is the default for retentions 0 or -1ns?

@jsteenb2
Copy link
Contributor

jsteenb2 commented Mar 6, 2020

0 will default to infinite retention period

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants