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

roachtest: fix clusterImpl.IsLocal() #98371

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

msbutler
Copy link
Collaborator

Previously, c.IsLocal() would always return false because local clusters have a time based suffix. This patch changes c.IsLocal() to return true if the cluster name is prefixed with "local".

Epic: none

Release note: none

@msbutler msbutler added the T-testeng TestEng Team label Mar 10, 2023
@msbutler msbutler requested a review from a team as a code owner March 10, 2023 13:50
@msbutler msbutler requested review from srosenberg and smg260 and removed request for a team March 10, 2023 13:50
@msbutler msbutler self-assigned this Mar 10, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@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:

Thank you for fixing! LGTM once we reuse the existing function in the config package.

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


pkg/cmd/roachtest/cluster.go line 2385 at r1 (raw file):

func (c *clusterImpl) IsLocal() bool {
	return strings.HasPrefix(c.name, "local")

We should use config.IsLocalClusterName.

@msbutler msbutler force-pushed the butler-roachtest-islocal branch from 9ea2707 to 0a4da2f Compare March 10, 2023 16:33
@msbutler
Copy link
Collaborator Author

Done!

@msbutler msbutler force-pushed the butler-roachtest-islocal branch from 0a4da2f to 9b13055 Compare March 10, 2023 19:24
Previously, c.IsLocal() would always return false because local clusters
have a time based suffix. This patch changes c.IsLocal() to return true if the
cluster name is prefixed with "local".

Epic: none

Release note: none
@msbutler msbutler force-pushed the butler-roachtest-islocal branch from 9b13055 to 8cb2803 Compare March 10, 2023 21:52
@msbutler
Copy link
Collaborator Author

bors r=renatolabs

@craig
Copy link
Contributor

craig bot commented Mar 10, 2023

Build failed:

@msbutler
Copy link
Collaborator Author

bors r=retry

@craig
Copy link
Contributor

craig bot commented Mar 11, 2023

Build succeeded:

@craig craig bot merged commit 3b88952 into cockroachdb:master Mar 11, 2023
@msbutler msbutler deleted the butler-roachtest-islocal branch March 13, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-testeng TestEng Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants