Skip to content

roachtest: move schemachange/secondary-index-multi-version to new framework#113696

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:port-schemachange/secondary-index-multi-version
Nov 7, 2023
Merged

roachtest: move schemachange/secondary-index-multi-version to new framework#113696
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:port-schemachange/secondary-index-multi-version

Conversation

@rafiss
Copy link
Copy Markdown
Collaborator

@rafiss rafiss commented Nov 2, 2023

The new framework has better testing and is the only one being maintained now.

fixes #110534
Release note: None

@rafiss rafiss added the backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only label Nov 2, 2023
@rafiss rafiss requested review from annrpom and renatolabs November 2, 2023 18:57
@rafiss rafiss requested a review from a team as a code owner November 2, 2023 18:57
@rafiss rafiss requested review from srosenberg and removed request for a team November 2, 2023 18:57
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator Author

@rafiss rafiss 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 (waiting on @annrpom, @renatolabs, and @srosenberg)


pkg/cmd/roachtest/tests/secondary_indexes.go line 57 at r1 (raw file):

		// Modify index data from that node.
		modifyData(1,

the old code took care to run this command on the node whose binary was upgraded. i don't think the new framework offers us that control. is that correct @renatolabs? it may be sufficient to just rely on randomization here.

@rafiss

This comment was marked as resolved.

@renatolabs

This comment was marked as resolved.

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:, but in the theme of efficiency, this is another test that I wish didn't spin up real VMs.

Nothing for this test to do right now, I think the better course of action is to set up a nightly "Local roachtest" run for tests like this and the validate-schema one recently ported.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @annrpom, @rafiss, and @srosenberg)


pkg/cmd/roachtest/tests/secondary_indexes.go line 57 at r1 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

the old code took care to run this command on the node whose binary was upgraded. i don't think the new framework offers us that control. is that correct @renatolabs? it may be sufficient to just rely on randomization here.

You can achieve the same goal with in the new test with:

upgradeContext := h.Context()
nextVersionDB := func() *gosql.DB {
    upgrading := upgradeContext.ToVersion.Compare(upgradeContext.FromVersion) > 0
    var node int
    var db *gosql.DB
    if upgrading {
        node, db = h.RandomDB(rng, upgradeContext.ToVersion)
    } else {
        node, db = h.RandomDB(rng, upgradeContext.FromVersion) // downgrading
    }

    l.Printf("connecting to n%d", node)
    return db
}

nextVersionDB().ExecContext(/* ... */)

There's a recent higher level API being introduced in a WIP PR, but the above should achieve that goal with what exists today. I'll add a note to update this test once that's ready.

@rafiss rafiss force-pushed the port-schemachange/secondary-index-multi-version branch from e62b82f to cb48785 Compare November 7, 2023 20:48
@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Nov 7, 2023

tftr!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 7, 2023

Build failed (retrying...):

@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Nov 7, 2023

bors r-

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 7, 2023

Canceled.

…mework

The new framework has better testing and is the only one being
maintained now.

Release note: None
@rafiss rafiss force-pushed the port-schemachange/secondary-index-multi-version branch from cb48785 to f22d9e5 Compare November 7, 2023 21:35
@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Nov 7, 2023

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 7, 2023

Build succeeded:

@craig craig bot merged commit b684a1d into cockroachdb:master Nov 7, 2023
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Nov 7, 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 f22d9e5 to blathers/backport-release-23.2-113696: 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.2.x failed. See errors above.


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

@rafiss rafiss deleted the port-schemachange/secondary-index-multi-version branch November 8, 2023 05:29
@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Nov 9, 2023

blathers backport 23.1

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 schemachange/secondary-index-multi-version to new mixed-version framework

3 participants