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

shipper: better error message when thanos.shipper.json invalid #5174

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Feb 21, 2022

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

Changes

  • Improve diagnostics in error from shipper.ReadMetaFile when thanos.shipper.json is invalid JSON, to help in troubleshooting
  • Replace usages of ioutil in shipper tests, as it's deprecated
  • Add three testcases for shipper.ReadMetaFile

Verification

I added a testcase corresponding to my change.

@aknuds1
Copy link
Contributor Author

aknuds1 commented Feb 21, 2022

Please let me know if I should add a changelog entry with this type of change to an error message.

pstibrany
pstibrany previously approved these changes Feb 21, 2022
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

Thanks!

pkg/shipper/shipper.go Outdated Show resolved Hide resolved
pkg/shipper/shipper.go Outdated Show resolved Hide resolved
Improve diagnostics in error from shipper.ReadMetaFile when
thanos.shipper.json is invalid JSON.

Also replace usages of ioutil in shipper tests, as it's deprecated.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1 aknuds1 force-pushed the chore/improve-shipper-read-meta branch from 8b891f7 to 3ca616e Compare February 21, 2022 16:42
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.

Thank you, solid work!

@GiedriusS GiedriusS merged commit 2315a3a into thanos-io:main Feb 21, 2022
@aknuds1 aknuds1 deleted the chore/improve-shipper-read-meta branch February 22, 2022 07:59
Nicholaswang pushed a commit to Nicholaswang/thanos that referenced this pull request Mar 6, 2022
…s-io#5174)

Improve diagnostics in error from shipper.ReadMetaFile when
thanos.shipper.json is invalid JSON.

Also replace usages of ioutil in shipper tests, as it's deprecated.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Nicholaswang <wzhever@gmail.com>
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