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

Correction of misleading help text(#5142) #7231

Merged
merged 3 commits into from
May 11, 2020
Merged

Correction of misleading help text(#5142) #7231

merged 3 commits into from
May 11, 2020

Conversation

ArthurSens
Copy link
Member

It's my first PR to prometheus, so if I did anything wrong please tell me and I will be glad to fix any problem

Fixes #5142

Fixes #5142

Signed-off-by: arthursens <arthursens2005@gmail.com>
@@ -204,7 +204,7 @@ func main() {
a.Flag("storage.tsdb.retention.time", "How long to retain samples in storage. When this flag is set it overrides \"storage.tsdb.retention\". If neither this flag nor \"storage.tsdb.retention\" nor \"storage.tsdb.retention.size\" is set, the retention time defaults to "+defaultRetentionString+". Units Supported: y, w, d, h, m, s, ms.").
SetValue(&newFlagRetentionDuration)

a.Flag("storage.tsdb.retention.size", "[EXPERIMENTAL] Maximum number of bytes that can be stored for blocks. Units supported: KB, MB, GB, TB, PB. This flag is experimental and can be changed in future releases.").
a.Flag("storage.tsdb.retention.size", "[EXPERIMENTAL] Maximum number of bytes that can be stored for blocks. Make sure to specify the unit suffix. Ex: \"512MB\". Units supported: KB, MB, GB, TB, PB. This flag is experimental and can be changed in future releases.").
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

B is also supported.

The new text doesn't feel right. Maybe something like A unit is required, supported units:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be aware that a unit is required, supported units: B, KB, MB, GB, TB, PB. Ex: "512MB"

Is that ok?

Signed-off-by: arthursens <arthursens2005@gmail.com>
@@ -204,7 +204,7 @@ func main() {
a.Flag("storage.tsdb.retention.time", "How long to retain samples in storage. When this flag is set it overrides \"storage.tsdb.retention\". If neither this flag nor \"storage.tsdb.retention\" nor \"storage.tsdb.retention.size\" is set, the retention time defaults to "+defaultRetentionString+". Units Supported: y, w, d, h, m, s, ms.").
SetValue(&newFlagRetentionDuration)

a.Flag("storage.tsdb.retention.size", "[EXPERIMENTAL] Maximum number of bytes that can be stored for blocks. Make sure to specify the unit suffix. Ex: \"512MB\". Units supported: KB, MB, GB, TB, PB. This flag is experimental and can be changed in future releases.").
a.Flag("storage.tsdb.retention.size", "[EXPERIMENTAL] Maximum number of bytes that can be stored for blocks. Be aware that a unit is required, supported units: B, KB, MB, GB, TB, PB. Ex: \"512MB\". This flag is experimental and can be changed in future releases.").
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for "Be aware that", it doesn't add anything.

@roidelapluie
Copy link
Member

Should we add EB too?

@brian-brazil
Copy link
Contributor

If it's supported but missing, we should add it.

@ArthurSens
Copy link
Member Author

And is EB supported? I am reading the code but can't seem to find anything on that

If someone could show me where this flag is used on tsdb just so I can better understand the code... I would really appreciate it 😅

@brian-brazil
Copy link
Contributor

This handling all comes from upstream, which does have it: https://github.com/alecthomas/units/blob/master/bytes.go

Added EB as supported unit in 'storage.tsdb.retention.size' help text, also com storage documentation

Signed-off-by: arthursens <arthursens2005@gmail.com>
@brian-brazil brian-brazil merged commit 7727b90 into prometheus:master May 11, 2020
@brian-brazil
Copy link
Contributor

Thanks!

@ArthurSens
Copy link
Member Author

thank you for your help in this pr

kakkoyun pushed a commit to kakkoyun/prometheus that referenced this pull request Jun 8, 2020
* Correction of misleading help text(prometheus#5142)

Signed-off-by: arthursens <arthursens2005@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misleading help text for storage.tsdb.retention.size
3 participants