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

ui: react: Add runtime and build info page #2832

Merged
merged 7 commits into from Jul 9, 2020

Conversation

onprem
Copy link
Member

@onprem onprem commented Jul 2, 2020

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

Changes

  • Implement API endpoints /status/runtimeinfo and /api/buildinfo
  • Enable the Runtime & Build Information page in react UI

Verification

Tested locally using both production and development build.

Screenshot

Runtime & Build Info page

Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
cmd/thanos/query.go Outdated Show resolved Hide resolved
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
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.

Some suggestions on how to make it even better :P Awesome work! btw, how is this not a user-facing change? 😄 we should probably make a new entry in the CHANGELOG.md file

pkg/query/api/v1.go Show resolved Hide resolved
cmd/thanos/query.go Show resolved Hide resolved
@onprem
Copy link
Member Author

onprem commented Jul 4, 2020

how is this not a user-facing change?

Oh I thought the new UI is still in beta 😅 But yeah, maybe we should add an entry in CHANGELOG for this.

cmd/thanos/query.go Outdated Show resolved Hide resolved
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
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.

Awesome! Love it - clean, concise code. Only one very minor nit in line but it's not a blocker, let's merge this and you could follow up with another small PR! ❤️

GOGC: os.Getenv("GOGC"),
GODEBUG: os.Getenv("GODEBUG"),
}
return status
Copy link
Member

Choose a reason for hiding this comment

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

We could just return this struct directly, no need for a variable. But I'd guess that the compiler already does this optimization for us. Plus, I'm surprised that none of our linters caught this. Perhaps we could improve the linters to catch functions that look like:

func foo() test {
  a := test{}
  return a
}

In the distant future? 😄

@GiedriusS GiedriusS merged commit dc93f12 into thanos-io:master Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants