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

Query: /api/v1/stores panics when store is healthy - v0.14.0-rc.0 #2846

Closed
cuotos opened this issue Jul 6, 2020 · 0 comments · Fixed by #2848
Closed

Query: /api/v1/stores panics when store is healthy - v0.14.0-rc.0 #2846

cuotos opened this issue Jul 6, 2020 · 0 comments · Fixed by #2848

Comments

@cuotos
Copy link
Contributor

cuotos commented Jul 6, 2020

Thanos v0.14.0-rc.0

When query is connected to a healthy Store, viewing /stores shows
image

accessing /api/v1/stores causes a panic.

Issue was introduced in #2809.

When nil error is passed to updateStoreStatus(store *storeRef, err error) results in a nil pointer here
status.LastError = &stringError{originalErr: err}

I've got a PR that i've tried to unit tests the entire function so should catch this.

I do not know all the details of how this worked before, I can only assume that *MOST of the errors that get passed to this will have custom Marshal methods, and this fix was to catch those errors that do not, as these will normally Marshal to {}.

Let me know if I've mis understood this.

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