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: pass RunOptions instead of NodeListOption #117320

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

herkolategan
Copy link
Collaborator

This change updates the Run and RunE cluster interface methods to take install.RunOptions as a parameter instead of option.NodeListOption to expose the additional available options to roachtest.

Epic: None
Release Note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@herkolategan herkolategan marked this pull request as ready for review January 5, 2024 16:18
@herkolategan herkolategan requested review from a team as code owners January 5, 2024 16:18
@herkolategan herkolategan requested review from srosenberg and renatolabs and removed request for a team January 5, 2024 16:18
Copy link
Collaborator Author

@herkolategan herkolategan left a comment

Choose a reason for hiding this comment

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

@@ -80,3 +80,8 @@ type StopOpts struct {
func DefaultStopOpts() StopOpts {
return StopOpts{RoachprodOpts: roachprod.DefaultStopOpts()}
}

// OnNodes returns a RunOptions that will run on the given nodes.
func OnNodes(nodes NodeListOption) install.RunOptions {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: WithNodes seems more standard

@@ -101,11 +101,11 @@ type Cluster interface {

// Run is fatal on errors.
// Use it when an error means the test should fail.
Run(ctx context.Context, node option.NodeListOption, args ...string)
Run(ctx context.Context, options install.RunOptions, args ...string)

// RunE runs a command on the specified nodes and returns an error.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: might be worth expanding the comment; e.g.,

... on the specified nodes (RunOptions.Nodes) with specified RetryOptions...

Copy link
Collaborator Author

@herkolategan herkolategan 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 @renatolabs)


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

Previously, srosenberg (Stan Rosenberg) wrote…

Nit: might be worth expanding the comment; e.g.,

... on the specified nodes (RunOptions.Nodes) with specified RetryOptions...

Good idea, Done.


pkg/cmd/roachtest/option/options.go line 85 at r1 (raw file):

Previously, srosenberg (Stan Rosenberg) wrote…

Nit: WithNodes seems more standard

Makes sense, I'll update the roachprod side toWithNodes as well for consistency.

@herkolategan herkolategan force-pushed the hbl/roachtest-run-nodes branch 2 times, most recently from adc8861 to ee81105 Compare January 11, 2024 10:59
Previously, OnNodes was added to roachprod as a method to easily create
RunOptions that will run on the specified nodes. This function has been renamed
to WithNodes to be more aligned with the other RunOption methods.

Additionally, a convenience function, WithNodes, has been added to roachtest
options to instantiate RunOptions with a NodeListOption.

Epic: None
Release Note: None
This change updates the `Run` and `RunE` cluster interface methods to take
`install.RunOptions` as a parameter instead of `option.NodeListOption` to expose
the additional available options to `roachtest`.

Epic: None
Release Note: None
@herkolategan
Copy link
Collaborator Author

TFTR!

bors r=srosenberg

@craig
Copy link
Contributor

craig bot commented Jan 12, 2024

Build succeeded:

@craig craig bot merged commit 4421a1b into cockroachdb:master Jan 12, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants