-
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
ui: Fix Block Viewer for Compactor and Store #3098
Conversation
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
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.
Looks good only some few soft comments. Thanks for super quick fix!
@@ -14,6 +14,7 @@ We use *breaking :warning:* word for marking changes that are not backward compa | |||
### Fixed | |||
|
|||
* [#3095](https://github.com/thanos-io/thanos/pull/3095) Rule: update manager when all rule files are removed. | |||
* [#3098](https://github.com/thanos-io/thanos/pull/3098) ui: Fix Block Viewer for Compactor and Store |
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.
No need for this, as it's fixing the release directly. But that's ok I will adjust it.
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!
if viewParam == "loaded" { | ||
return bapi.loadedBlocksInfo, nil, nil | ||
} | ||
return bapi.globalBlocksInfo, nil, nil |
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.
This feels weird from perspective on components that does not have global 🤔
Also I think it's on purpose that in code we talk about global
view and in React / UI we have blocks
?
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.
I agree it is weird. But in our last 1:1, me, @squat, and @GiedriusS discussed and decided to go with this. As we have the same API but different needs in different components (Bucket viewer: a global view of blocks, Compactor: both global and loaded and Store: loaded only) we came up with two solutions:
- Modify the API logic so that we can register a single type of API multiple times in a single component with different prefixes. This means that in the Compactor, we can create two instances of Blocks API on two different prefixes (let's say
/api/v1/loaded
and/api/v1/global
) much like how we handled the old UI. - Extend the blocks API to have two types of data (for Global and Loaded) always and add a query parameter in the existing
/api/v1/blocks
endpoint.
The first solution is more generic but it requires us to modify logic for all of the API packages. Also, it would result in some weird endpoints like /api/v1/loaded/blocks
and /api/v1/global/blocks
(ideally the level of specificity should increase, /api/v1/blocks/loaded
) because we can only add a prefix to a router. The second solution was simpler to implement and only affected the Blocks API. So even though it felt a little weird, we decided to go with it.
* ui: Fix Block viewer for Compactor and Store Signed-off-by: Prem Kumar <prmsrswt@gmail.com> * Add an entry in CHANGELOG.md Signed-off-by: Prem Kumar <prmsrswt@gmail.com> * ui: react: Fixed tests for Blocks Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
* ui: Fix Block viewer for Compactor and Store Signed-off-by: Prem Kumar <prmsrswt@gmail.com> * Add an entry in CHANGELOG.md Signed-off-by: Prem Kumar <prmsrswt@gmail.com> * ui: react: Fixed tests for Blocks Signed-off-by: Prem Kumar <prmsrswt@gmail.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Made sure old sse S3 option if specified, produces error. Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Cut v0.15.0-rc.0 Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * tsdbstore: Optimized response framing if iterator finished. Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Apply suggestions from code review Co-authored-by: Krasimir Georgiev <8903888+krasi-georgiev@users.noreply.github.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Rule: update manager when all rule files are removed (#3095) This bug was already fixed in #2615 but it got lost when we merged #2200. Co-authored-by: johncming <johncming@yahoo.com> Co-authored-by: Lili Cosic <cosiclili@gmail.com> Signed-off-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: johncming <johncming@yahoo.com> Co-authored-by: Lili Cosic <cosiclili@gmail.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * ui: Fix Block Viewer for Compactor and Store (#3098) * ui: Fix Block viewer for Compactor and Store Signed-off-by: Prem Kumar <prmsrswt@gmail.com> * Add an entry in CHANGELOG.md Signed-off-by: Prem Kumar <prmsrswt@gmail.com> * ui: react: Fixed tests for Blocks Signed-off-by: Prem Kumar <prmsrswt@gmail.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * querier: Fix overwriting maxSourceResolution when auto downsampling is enabled (#3105) * Fix overwriting maxSourceResolution when auto downsampling is enabled Signed-off-by: Ben Ye <yb532204897@gmail.com> * add changelog Signed-off-by: Ben Ye <yb532204897@gmail.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Author: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com> Date: Thu Aug 27 14:10:19 2020 +0300 (#3010) Make the PromQL lookBack configurable with a flag Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com> Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Cut release v0.15.0-rc.1 (#3103) * Cut release v0.15.0-rc.1 Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Address review issues Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Fix changelog Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Cut release v0.15.0 (#3129) Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Minor fix Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> * Address review comments Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com> Co-authored-by: Krasimir Georgiev <8903888+krasi-georgiev@users.noreply.github.com> Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: johncming <johncming@yahoo.com> Co-authored-by: Lili Cosic <cosiclili@gmail.com> Co-authored-by: Prem Kumar <prmsrswt@gmail.com> Co-authored-by: Ben Ye <yb532204897@gmail.com>
Signed-off-by: Prem Kumar prmsrswt@gmail.com
Fixes #3093
Changes
Verification
Tested locally for Bucket web, Compactor, and Store using docker-compose setup.