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

admin: Add Chart Catalog infrastructure #27505

Merged
merged 1 commit into from
Jul 18, 2019
Merged

admin: Add Chart Catalog infrastructure #27505

merged 1 commit into from
Jul 18, 2019

Conversation

sploiselle
Copy link
Contributor

To support creating a catalog of predefined charts to aid in debugging, this PR introduces the
internal mechanisms by which we can define and generate a catalog of charts.

This PR does not contain an exhaustive catalog, but instead only an illustrative subset of the
catalog to demonstrate the code's ergonomics. I will add the remainder of the catalog once
this code is reviewed.

The provided tests will also be expanded on in a subsequent commit.

@danhhz The library of consts that you proposed grew really unwieldy given the size of the final catalog (~150 distinct values). I'd love to make sure this is as easy as possible to use, though, so please include any other suggestions.

@mrtracy Can I get you to take a peek and ensure that pkg/ts/catalog/chart_catalog.go's chartDefaultsPerMetricType has sensible defaults?

Release note: none

@sploiselle sploiselle requested review from danhhz, couchand, mrtracy and a team July 13, 2018 15:55
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@couchand
Copy link
Contributor

It looks like maybe you haven't included some new files?

Without looking too much into the specifics, I wonder if this is too focused on the display of the charts? Along the same lines of the direction I was pushing on the previous PR, I think this should be articulated as a catalog of metrics without respect to the manner in which they are displayed. The latter introduces a whole set of thorny issues that can be avoided by treating this as organizational, not presentational.

@sploiselle sploiselle requested review from spencerkimball and vilterp and removed request for danhhz, couchand and mrtracy May 14, 2019 14:38
@sploiselle
Copy link
Contributor Author

@spencerkimball Here's the actual "catalog" onto which you should be able to graft this notion of "components." Obviously, let me know if there's a more optimal way to structure this to facilitate that or if there's anyone else I should tag to review it.

@vilterp Do you mind taking a look at this given that it does interface with the admin UI in some capacity?

@tbg tbg added the X-noremind Bots won't notify about PRs with X-noremind label Jun 19, 2019
Copy link
Member

@spencerkimball spencerkimball left a comment

Choose a reason for hiding this comment

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

LGTM. My biggest concern is how we'll encourage people to keep chart_catalog.go up to date.

// Organization identifies the sections in which to place the chart.
// (Sections are created ad hoc as ChartSections whenever they're identified in
// a chartDescription.)
// Inner array is Level 0 (req), Level 1 (req), Level 2 (opt).
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what these levels mean. Could you augment the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added much more context to the general structure of the project.

pkg/ts/catalog/chart_catalog.proto Outdated Show resolved Hide resolved
@sploiselle
Copy link
Contributor Author

@spencerkimball If there are any metrics that don't appear in at least one chart, there is a test that fails. Hoping that doesn't disincentivize creating metrics in the first place, but seems reasonable to ensure that the catalog doesn't wither in the face of progress.

Create internal mechanisms to define and serve a predefined set of charts that could be used by the Admin UI.

Release note: none
@sploiselle
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Jul 18, 2019
27505: admin: Add Chart Catalog infrastructure r=sploiselle a=sploiselle

To support creating a catalog of predefined charts to aid in debugging, this PR introduces the
internal mechanisms by which we can define and generate a catalog of charts.

This PR does not contain an exhaustive catalog, but instead only an illustrative subset of the
catalog to demonstrate the code's ergonomics. I will add the remainder of the catalog once
this code is reviewed.

The provided tests will also be expanded on in a subsequent commit.

@danhhz The library of consts that you proposed grew really unwieldy given the size of the final catalog (~150 distinct values). I'd love to make sure this is as easy as possible to use, though, so please include any other suggestions.

@mrtracy Can I get you to take a peek and ensure that `pkg/ts/catalog/chart_catalog.go`'s [`chartDefaultsPerMetricType`](https://github.com/cockroachdb/cockroach/compare/master...sploiselle:chart-catalog-endpoint?expand=1#diff-fc032d10a16db3caf6e19e81a2549edeR57) has sensible defaults?

Release note: none

Co-authored-by: Sean Loiselle <himself@seanloiselle.com>
@craig
Copy link
Contributor

craig bot commented Jul 18, 2019

Build succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X-noremind Bots won't notify about PRs with X-noremind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants