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-23.1: roachtest: port tpcc/mixed-headroom to the new framework + refactor test context #114647

Merged

Conversation

renatolabs
Copy link
Contributor

@renatolabs renatolabs commented Nov 17, 2023

Backport:

Please see individual PRs for details.

Release justification: test-only changes.

/cc @cockroachdb/release

DarrylWong and others added 3 commits November 17, 2023 10:41
Note that the new framework randomizes how many version
upgrades occur. This removes the need for both a single
upgrade and multiple upgrade test and the two were merged.

Release note: None
Fixes: cockroachdb#110537
This commit implements a couple of changes in the test context. First,
it adds a few new functions on `Context` that make it easy for tests
to determine what version a node is running, if the cluster is in
mixed-binary state, what nodes are running the previous and next
versions, etc.

In addition, the test planner is also changed such that every
`singleStep` (i.e., every step that leads to _something_ happening in
the test) now has an associated runtime context. Previously, only
user-hooks (`runHookStep`) would have a context associated with them.

Epic: none

Release note: None
Before each step executes, the `mixedversion` test runner logs the
current logical binary and cluster versions. With this change, we now
also log the released binary versions. This should make it even
clearer to understand the context the step is running in at a
glance. The information is also shown in test failures for steps that
are not "long running" (i.e., background steps or monitor events).

Fixes: cockroachdb#112431.

Release note: None
@renatolabs renatolabs requested a review from a team as a code owner November 17, 2023 15:43
@renatolabs renatolabs requested review from herkolategan and srosenberg and removed request for a team November 17, 2023 15:43
Copy link

blathers-crl bot commented Nov 17, 2023

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Backports should only be created for serious
    issues
    or test-only changes.
  • Backports should not break backwards-compatibility.
  • Backports should change as little code as possible.
  • Backports should not change on-disk formats or node communication protocols.
  • Backports should not add new functionality (except as defined
    here).
  • Backports must not add, edit, or otherwise modify cluster versions; or add version gates.
  • All backports must be reviewed by the owning areas TL and one additional
    TL. For more information as to how that review should be conducted, please consult the backport
    policy
    .
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
  • 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. State changes must be further protected such that nodes running old binaries will not be negatively impacted by the new state (with a mixed version test added).
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.
  • Your backport must be accompanied by a post to the appropriate Slack
    channel (#db-backports-point-releases or #db-backports-XX-X-release) for awareness and discussion.

Also, please add a brief release justification to the body of your PR to justify this
backport.

@blathers-crl blathers-crl bot added the backport Label PR's that are backports to older release branches label Nov 17, 2023
Copy link

blathers-crl bot commented Nov 17, 2023

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

The test context includes information about the versions running on
different nodes. It is static and computed during planning time. To
make it more explicit that no computation happens when a test calls
`h.Context()`, this commit makes the context a field of the helper
struct.

Epic: none

Release note: None
This makes formatting of cluster and binary versions easier to read by
formatting them using the `tabwriter` package.

Epic: none

Release note: None
@renatolabs renatolabs force-pushed the backport23.1-113706-114286 branch from 3dd93a4 to ba1c1fb Compare November 17, 2023 16:05
@DarrylWong
Copy link
Contributor

Would you like me to backport #114381 or do you just want to add it in here?

When using metamorphic builds, this test would very
rarely timeout or almost timeout. This change raises
the timeout to 4 hours.

Epic: none
Release note: none
Fixes: cockroachdb#114281
@renatolabs
Copy link
Contributor Author

Would you like me to backport #114381 or do you just want to add it in here?

Good call, I forgot about that one. Added to this backport 👍

The test uses the `crdb_internal.kv_set_queue_active` builtin, which
is only available on v22.1+.

Epic: none

Release note: None
@renatolabs
Copy link
Contributor Author

Pushed a commit with an update to change-replicas/mixed-version needed on 23.1.

@renatolabs
Copy link
Contributor Author

@renatolabs renatolabs merged commit dc4275a into cockroachdb:release-23.1 Nov 17, 2023
2 checks passed
@renatolabs renatolabs deleted the backport23.1-113706-114286 branch November 17, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Label PR's that are backports to older release branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants