-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use time.RFC3339 in bucket inspect command for consistency #5114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thx
cmd/thanos/tools_bucket.go
Outdated
@@ -997,8 +997,8 @@ func (t Table) Less(i, j int) bool { | |||
|
|||
func compare(s1, s2 string) bool { | |||
// Values can be either Time, Duration, comma-delimited integers or strings. | |||
s1Time, s1Err := time.Parse("02-01-2006 15:04:05", s1) | |||
s2Time, s2Err := time.Parse("02-01-2006 15:04:05", s2) | |||
s1Time, s1Err := time.Parse(time.RFC1123, s1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be RFC3339
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 😆 I'm not sure how I mixed up my copy/paste there but fixed now 🙇
Signed-off-by: Paul Traylor <[email protected]>
34f291c
to
ab87baa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)))
…#5114) Signed-off-by: Paul Traylor <[email protected]> Signed-off-by: Nicholaswang <[email protected]>
Changes
Most places in thanos use RFC3339 for formatting, but I noticed that
thanos tools bucket inspect
had the format hardcoded.Verification
Built the thanos binary and tried the inspect command to verify the output