Skip to content

roachtest: port change-replicas/mixed-version to mixedversion#113222

Merged
craig[bot] merged 3 commits intocockroachdb:masterfrom
erikgrinaker:mixedversion-change-replicas
Nov 7, 2023
Merged

roachtest: port change-replicas/mixed-version to mixedversion#113222
craig[bot] merged 3 commits intocockroachdb:masterfrom
erikgrinaker:mixedversion-change-replicas

Conversation

@erikgrinaker
Copy link
Copy Markdown
Contributor

roachtestutil/mixedversion: add ClusterSettingOption

This allows e.g. passing envvars to clusters.

roachtest: port change-replicas/mixed-version to mixedversion

Resolves #110532.
Epic: none
Release note: None

@erikgrinaker erikgrinaker added the backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only label Oct 27, 2023
@erikgrinaker erikgrinaker self-assigned this Oct 27, 2023
@erikgrinaker erikgrinaker requested a review from a team as a code owner October 27, 2023 15:27
@erikgrinaker erikgrinaker requested review from srosenberg and removed request for a team October 27, 2023 15:27
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@erikgrinaker erikgrinaker changed the title roachtest: port change-replicas/mixed-version to mixedversion roachtest: port change-replicas/mixed-version to mixedversion Oct 27, 2023
@erikgrinaker
Copy link
Copy Markdown
Contributor Author

mixedversion is great, thanks for writing it!

A minor annoyance here is the guidance to return errors from steps. It's usually much more convenient to use Testify (e.g. require).

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:

Nice, thanks for adding the cluster setting option!

A minor annoyance here is the guidance to return errors from steps.

Yeah, I somewhat regret this direction. It is something I want to revisit when I get the chance.

One comment about the change-replicas test: instead of picking a random gateway in the beginning of the test and using it all the time, you could change your db.ExecContext calls to h.Exec. That should take care of: 1) picking a random node each time; 2) logging the statement executed; 3) calling ExecContext with the appropriate context.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @srosenberg)

@erikgrinaker erikgrinaker force-pushed the mixedversion-change-replicas branch 2 times, most recently from 8c7eca1 to ecfbfcb Compare October 30, 2023 10:37
@erikgrinaker
Copy link
Copy Markdown
Contributor Author

instead of picking a random gateway in the beginning of the test and using it all the time, you could change your db.ExecContext calls to h.Exec

Good idea, done.

Seeing some test flakes here where the replicate queue fails to enforce zone configs. The previous test had workarounds for this, but I was hoping these wouldn't be necessary anymore -- will have a closer look.

@erikgrinaker
Copy link
Copy Markdown
Contributor Author

The flakes here appear to be because the nodes sometimes get incorrect node attributes. E.g. n3 has attribute node2, so when we set constraints = [-node2] that actually empties n3 of replicas, failing the assertion that n2 should be emptied.

Opened #113384 for this.

This allows e.g. passing envvars to clusters.

Epic: none
Release note: None
Epic: none
Release note: None
@erikgrinaker
Copy link
Copy Markdown
Contributor Author

Merging now that #113384 is resolved. Thanks for the fix and review!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 7, 2023

Build succeeded:

@craig craig bot merged commit 1f402df into cockroachdb:master Nov 7, 2023
@erikgrinaker erikgrinaker deleted the mixedversion-change-replicas branch November 14, 2023 10:38
@renatolabs
Copy link
Copy Markdown

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 change-replicas/mixed-version to new mixed-version framework

3 participants