Skip to content

roachtest: port import/mixed-versions to the new framework#113546

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:port-import
Nov 1, 2023
Merged

roachtest: port import/mixed-versions to the new framework#113546
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:port-import

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

Fixes: #110529.

Release note: None

@yuzefovich yuzefovich added the backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only label Oct 31, 2023
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@yuzefovich yuzefovich force-pushed the port-import branch 3 times, most recently from c620278 to df12260 Compare November 1, 2023 01:28
@yuzefovich yuzefovich marked this pull request as ready for review November 1, 2023 02:16
@yuzefovich yuzefovich requested a review from a team as a code owner November 1, 2023 02:16
@yuzefovich yuzefovich requested review from a team, DarrylWong, DrewKimball and renatolabs and removed request for a team and DarrylWong November 1, 2023 02:16
@yuzefovich
Copy link
Copy Markdown
Member Author

Got a successful run from the gceworker, so it's RFAL.

Copy link
Copy Markdown
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

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

:lgtm: That was fast!

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @renatolabs)

Copy link
Copy Markdown

@renatolabs renatolabs left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)


pkg/cmd/roachtest/tests/mixed_version_import.go line 44 at r1 (raw file):

func runImportMixedVersions(ctx context.Context, t test.Test, c cluster.Cluster, warehouses int) {
	crdbNodes := c.All()
	c.Put(ctx, t.Cockroach(), "./cockroach", crdbNodes)

You can skip this step and use tpccImportCmdWithCockroachBinary(test.DefaultCockroachPath) down below to avoid uploading a new binary to the cluster.


pkg/cmd/roachtest/tests/mixed_version_import.go line 48 at r1 (raw file):

	// NB: We rely on the testing framework to choose a random predecessor to
	// upgrade from.
	mvt := mixedversion.NewTest(ctx, t, t.L(), c, crdbNodes, mixedversion.AlwaysUseFixtures)

Is there a specific reason to always use fixtures? The test doesn't seem to rely on them.


pkg/cmd/roachtest/tests/mixed_version_import.go line 52 at r1 (raw file):

		node := h.RandomNode(r, crdbNodes)
		l.Printf("dropping tpcc db if exists on node %d", node)
		_, err := h.Connect(node).ExecContext(ctx, "DROP DATABASE IF EXISTS tpcc CASCADE;")

We can replace the RandomNode and log call with h.Exec().

There are some minor differences:
- we no longer install fixtures (which weren't used anyway)
- we'll probably run the IMPORT multiple times throughout the test run.

Release note: None
Copy link
Copy Markdown
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @DrewKimball and @renatolabs)


pkg/cmd/roachtest/tests/mixed_version_import.go line 44 at r1 (raw file):

Previously, renatolabs (Renato Costa) wrote…

You can skip this step and use tpccImportCmdWithCockroachBinary(test.DefaultCockroachPath) down below to avoid uploading a new binary to the cluster.

Nice, thanks, done.


pkg/cmd/roachtest/tests/mixed_version_import.go line 48 at r1 (raw file):

Previously, renatolabs (Renato Costa) wrote…

Is there a specific reason to always use fixtures? The test doesn't seem to rely on them.

The original test used fixtures, so I kept that. I also don't see the reason for using them, removed.


pkg/cmd/roachtest/tests/mixed_version_import.go line 52 at r1 (raw file):

Previously, renatolabs (Renato Costa) wrote…

We can replace the RandomNode and log call with h.Exec().

Done.

Copy link
Copy Markdown

@renatolabs renatolabs left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @DrewKimball and @yuzefovich)


pkg/cmd/roachtest/tests/mixed_version_import.go line 48 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

The original test used fixtures, so I kept that. I also don't see the reason for using them, removed.

Yeah, nothing wrong with using them; by default the test will now probabilistically run with them, which makes more sense for tests that don't explicitly rely on the contents of the fixtures.

@yuzefovich
Copy link
Copy Markdown
Member Author

Got a passing run on the gceworker with latest push too.

TFTRs!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 1, 2023

Build succeeded:

@craig craig bot merged commit 8c7f1a9 into cockroachdb:master Nov 1, 2023
@yuzefovich yuzefovich deleted the port-import branch November 1, 2023 20:43
@yuzefovich
Copy link
Copy Markdown
Member Author

blathers backport 23.1

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Nov 1, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 1e5f61e to blathers/backport-release-23.1-113546: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 23.1 failed. See errors above.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

roachtest: port import/mixed-versions to new mixed-version framework

4 participants