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

release-21.2: improve statusccl package unit test #73446

Merged

Conversation

Azhng
Copy link
Contributor

@Azhng Azhng commented Dec 3, 2021

Backport:

Please see individual PRs for details.

/cc @cockroachdb/release


Release Justification: Test only change

@blathers-crl
Copy link

blathers-crl bot commented Dec 3, 2021

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues or test-only changes.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Azhng and others added 4 commits January 4, 2022 19:08
Previously, tenant status server tests live within serverccl package.
However, this caused all nightly test failures to automaticallly
notify server team through GitHub code owner file.
This commit moves all tenant status server into statusccl package
and update statusccl package code owner to SQL O11y.

Release note: None
Pushing these assertions into the test client removes some of the line
noise from the tests, making them easier to read. We also generalize the
tenant http client to provide plain text as well as json responses.

Release note: None
Previously, running statusccl tests was very expensive. This was
because for each unit tests, the test helper set up a host cluster
and two tenant clusters. This resulted in total of 9 nodes being
created and destroyed.

This commit addresses this issue by having all unit tests sharing
a single test helper to avoid unnecessary setup and teardowns of
clusters.

Resolves cockroachdb#73359.

Release note: None
Previously, we spin up 1 host cluster and 2 tenant clusters for testing
tenant status server. Each cluster contains 3 nodes and we effectively
spin up 9 nodes for the test. This is very expensive and can cause
errors like "race: limit on 8128 simultaneously alive goroutines is
exceeded, dying" due to the underyling LLVM limitation.

This commit reduces the total number of nodes that are spinned up.
Host cluster and the second tenant cluster size is now reduced to
1 node to reduce the cost of the tests. Additional special
`randomServerIdx` value is introduced to avoid having the test
rely on the hard-coded server index.

Release note: None
@Azhng Azhng force-pushed the backport21.2-72556-72692-73363 branch from 6e3c494 to 5f7c9ae Compare January 4, 2022 19:10
@Azhng Azhng requested a review from a team January 4, 2022 20:14
@Azhng Azhng marked this pull request as ready for review January 4, 2022 20:14
Copy link
Contributor

@matthewtodd matthewtodd left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 8 of 8 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @Azhng)

@Azhng Azhng merged commit 14bcb15 into cockroachdb:release-21.2 Jan 5, 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.

4 participants