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

Use time.RFC3339 in bucket inspect command for consistency #5114

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

kfdm
Copy link
Contributor

@kfdm kfdm commented Feb 2, 2022

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

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

GiedriusS
GiedriusS previously approved these changes Feb 2, 2022
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

👍 thx

@@ -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)
Copy link
Member

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?

Copy link
Contributor Author

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 🙇

Copy link
Member

@squat squat left a comment

Choose a reason for hiding this comment

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

Thanks :)))

@squat squat enabled auto-merge (squash) February 2, 2022 09:03
@squat squat merged commit 2dc268b into thanos-io:main Feb 2, 2022
@kfdm kfdm deleted the bucket-inspect-time branch February 3, 2022 00:29
Nicholaswang pushed a commit to Nicholaswang/thanos that referenced this pull request Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants