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

[DNM] *: fix buildutil.VerifyNoImports, rework illegal imports #64450

Closed
wants to merge 8 commits into from

Conversation

ajwerner
Copy link
Contributor

@ajwerner ajwerner commented Apr 30, 2021

The prefix of commits before fixing the testing infrastructure are attempts to break illegal imports
from sql and roachpb. I have a feeling there is more to do. I think the way I'd like to merge this is by fixing
the problems and then merging the fixed test. I'm headed out soon so I probably won't get to this next week
but it should be a good start.

The changes to fix the dependencies have been broken out into separate PRs:

@cockroach-teamcity
Copy link
Member

This change is Reviewable

The `geo` package depends on tons of stuff. The usage
only needed geopb.

Release note: None
The usage of `kvserver` in the `sql` package is generally forbidden.
The tests to enforce that were broken. This patch reworks the
dependency to move the business logic into the `kvserver` package.

Release note: None
This setting was being imported from `sql` which created
an illegal dependency.

Release note: None
The dependency on these concepts was creating unintended dependencies on
things like storage and pebble.

Release note: None
The linter was not happy about these.

Release note: None
This thing has not worked since cockroachdb#49447 and the transition to go modules.
This change adopts the newer `packages` API and enhances the abstraction
a bit.

Release note: None
craig bot pushed a commit that referenced this pull request Apr 30, 2021
63087: ui: use uPlot lib for line graphs on metrics page  r=dhartunian a=dhartunian

Previously, we were using the nvd3 library to render line graphs. This
library is deprecated and relied on svg for rendering visuals. For
clusters past a certain size (~30 nodes) performance on the metrics
dashboards would become unusably slow due to the large amount of svg on
the page. In addition, it looks like nvd3 would render a lot of
unnecessary svg along with the lines to render points on hover which was
difficult to circumvent.

This PR replaces the `LineGraph` component with one that uses the uPlot
library (https://github.com/leeoniya/uPlot). This library uses the
canvas API to render and has been engineered with performance in mind
for larger datasets. The implementation in this PR can render a
60-cluster Hardward metrics page quite quickly while retaining a
guideline on hover with legend displaying the values at the guideline.

Here's a list of important features implemented with uPlot in this commit
- Plotting graphs with correctly formatted x-axis
- Hovering legend on mouseover that mimics what we had before (legend
redesign is pending future work)
- Aggregation of multiple "result" time series from CRDB into a single
set of y values aligned against a single time series (this is how uPlot
requires its data to be formatted, we previously had separate time axes
per plot series)
- Interactive selection of zoom area on uPlot graph that triggers a zoom
on the entire dashboard
- uPlot uses same color palette as nvd3 implementation

Removed features from nvd3 implementation:
- Synced guideline on all graphs in dashboard

Resolves #62463.

Release note (ui change): use a new library for line graphs that renders
metrics more efficiently. Customers with large clusters can now load and
interact with metrics much faster than before. (TODO: what features are
different with this new library?)

64391: clusterversion: introduce 21.2 development versions r=j-low a=j-low

Release note: None

64466: kvserver,sql,server: rework dependencies for `compact_engine_span` r=ajwerner a=ajwerner

The usage of `kvserver` in the `sql` package is generally forbidden.
The tests to enforce that were broken. This patch reworks the
dependency to move the business logic into the `kvserver` package.

Part of #64450.

Release note: None

Co-authored-by: David Hartunian <davidh@cockroachlabs.com>
Co-authored-by: Andrii Vorobiov <and.vorobiov@gmail.com>
Co-authored-by: Joseph Lowinske <joe@cockroachlabs.com>
Co-authored-by: Andrew Werner <awerner32@gmail.com>
craig bot pushed a commit that referenced this pull request Apr 30, 2021
64465: util/encoding: break dependency on geo r=ajwerner a=ajwerner

The `geo` package depends on tons of stuff. The usage
only needed geopb.

Part of #64450.

Release note: None

Co-authored-by: Andrew Werner <awerner32@gmail.com>
craig bot pushed a commit that referenced this pull request May 10, 2021
64469: server/diagnostics: move dep_test.go to the right package, fix dep r=ajwerner a=ajwerner

Part of #64450.

Release note: None

Co-authored-by: Andrew Werner <awerner32@gmail.com>
craig bot pushed a commit that referenced this pull request May 11, 2021
64467: kvserver: move `SplitByLoadMergeDelay` to kvserverbase r=ajwerner a=ajwerner

This setting was being imported from `sql` which created
an illegal dependency.

Part of #64450.

Release note: None

Co-authored-by: Andrew Werner <awerner32@gmail.com>
@ajwerner
Copy link
Contributor Author

We've moved this into bazel.

@ajwerner ajwerner closed this Dec 13, 2022
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.

2 participants