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: correctly marshal errors to JSON and ignore if nil #2848

Merged
merged 2 commits into from
Jul 7, 2020
Merged

Query: correctly marshal errors to JSON and ignore if nil #2848

merged 2 commits into from
Jul 7, 2020

Conversation

cuotos
Copy link
Contributor

@cuotos cuotos commented Jul 6, 2020

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

Changes

Fixes: #2846
Passing nil error to updateStoreStatus causes a panic. This is displayed to the user in the Stores ui when the Store is healthy

Added higher level unit test to catch this, and hopefully clarified existing test.

Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

lgtm. Let's see what @GiedriusS thinks.

Just a small nit on changelog entry.

Have you tested this on a running system?

CHANGELOG.md Outdated Show resolved Hide resolved
@cuotos
Copy link
Contributor Author

cuotos commented Jul 7, 2020 via email

pkg/query/storeset.go Outdated Show resolved Hide resolved
pkg/query/storeset_test.go Outdated Show resolved Hide resolved
pkg/query/storeset_test.go Outdated Show resolved Hide resolved
pkg/query/storeset_test.go Outdated Show resolved Hide resolved
pkg/query/storeset_test.go Show resolved Hide resolved
@cuotos
Copy link
Contributor Author

cuotos commented Jul 7, 2020

@kakkoyun , @bwplotka Is it possible for me to trigger a rerun on just the circle tests? they seem to pass locally, and are related to reloading of config, not this change?

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM, thanks all!

Yea, reloader is flaky, help wanted to fix it 🙉 (#2622)

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.

👍

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.

Wait... where's the CHANGELOG.md entry? 😄

@kakkoyun
Copy link
Member

kakkoyun commented Jul 7, 2020

@GiedriusS I have requested him to remove it since this hasn't released yet.
#2848 (comment)

That reminded me maybe we should change the base branch to release-0.14. What do you think?

@bwplotka
Copy link
Member

bwplotka commented Jul 7, 2020

correct

@kakkoyun kakkoyun changed the base branch from master to release-0.14 July 7, 2020 15:56
@kakkoyun kakkoyun changed the base branch from release-0.14 to master July 7, 2020 15:57
@kakkoyun
Copy link
Member

kakkoyun commented Jul 7, 2020

@cuotos Then could you branch out from release-0.14 and apply your changes?

@GiedriusS
Copy link
Member

But are there any practical differences between merging this into master and then cherry picking it into release-0.14 vs. the other way around?

@kakkoyun
Copy link
Member

kakkoyun commented Jul 7, 2020

Right, let's merge.

@kakkoyun kakkoyun merged commit 963431d into thanos-io:master Jul 7, 2020
kakkoyun pushed a commit that referenced this pull request Jul 7, 2020
* correctly marshal errors to JSON and ignore if nil

Signed-off-by: Dan Potepa <[email protected]>

* LastError should be cleared if the newer update was ok

Signed-off-by: Dan Potepa <[email protected]>
Signed-off-by: Kemal Akkoyun <[email protected]>
@cuotos cuotos deleted the fixErrorMarshal branch July 7, 2020 17:53
paulfantom added a commit to paulfantom/thanos that referenced this pull request Jul 9, 2020
* upstream/release-0.14: (46 commits)
  Cut release v0.14.0-rc.1 (thanos-io#2853)
  Query: correctly marshal errors to JSON and ignore if nil (thanos-io#2848)
  ci: Manually download promu in crossbuild stage (thanos-io#2828)
  Cut release v0.14.0-rc.0 (thanos-io#2826)
  Soft cut changelog on master to indicate v0.14.0 being in progress (thanos-io#2824)
  Update ThanosReceiveNoUpload to select sum == 0 (thanos-io#2819)
  receive: Added more observability, fixed leaktest, to actually check leaks ): (thanos-io#2817)
  Query: always return a string in the `lastError` field (thanos-io#2809)
  Added missing CHANGELOG entry for PR 2613 (thanos-io#2820)
  receive: Fixed small options race; Removed unused StartTime feature. (thanos-io#2816)
  go.mod: Bump Prometheus to current latest (thanos-io#2814)
  Implement CLI Flags page in React UI (thanos-io#2796)
  Improve ThanosReceiveNoUpload to only alert on current instances
  store: Preallocate output buffer when encoding postings. (thanos-io#2812)
  compact: introduce flag --block-viewer.global.sync-block-interval (thanos-io#2752)
  docs: compact: add blurb about how retention policy works (thanos-io#2808)
  Reduced memory allocations in readIndexRange() (thanos-io#2807)
  ui: Add Stores page to React UI (thanos-io#2754)
  Added Kemal to Maintainer Role; Kemal is volounteering to be next release shephard (thanos-io#2804)
  proposal: Add scalable rule storage proposal (thanos-io#2661)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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