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 "context cancelled" errors in db-console tests #135333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pkg/cmd/roachtest/tests/db_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (d *dbConsoleCypressTest) RunTest(ctx context.Context, targetNode int, l *l
url := fmt.Sprintf("https://%s", adminUIAddrs[0])
require.NoError(d.t, rtCluster.RunE(ctx, option.WithNodes(workloadNode), "mkdir", "-p", d.artifactPath))
dockerRun := fmt.Sprintf(
`docker run -v %s:/e2e/artifacts %s --config baseUrl=%s,screenshotsFolder=/e2e/artifacts,videosFolder=/e2e/artifacts %s`,
`docker run -e NO_COLOR=1 -v %s:/e2e/artifacts %s --config baseUrl=%s,screenshotsFolder=/e2e/artifacts,videosFolder=/e2e/artifacts %s`,
d.artifactPath, d.imageName, url, specStr)
// If the Docker run fails, get the test failure artifacts and write them to
// roachtest's artifact directory.
Expand All @@ -123,7 +123,7 @@ func (d *dbConsoleCypressTest) RunTest(ctx context.Context, targetNode int, l *l
if mkDirErr := os.MkdirAll(testArtifactsDir, 0777); mkDirErr != nil {
d.t.Fatal(mkDirErr)
}
require.NoError(d.t, rtCluster.Get(ctx, d.t.L(), d.artifactPath, testArtifactsDir, workloadNode))
require.NoError(d.t, rtCluster.Get(context.Background(), d.t.L(), d.artifactPath, testArtifactsDir, workloadNode))
d.t.Fatal(err)
}
}
Expand Down Expand Up @@ -195,11 +195,16 @@ func (d *dbConsoleCypressTest) writeCypressFilesToWorkloadNode(ctx context.Conte
}

func registerDbConsole(r registry.Registry) {
// Explicitly set CockroachBinary to registry.StandardCockroach to ensure that a binary
// containing db console is used. Currently, registry.RuntimeAssertionsCockroach
// is built using cockroach-short and the default of registry.RandomizedCockroach
// causes the tests to be flaky
r.Add(registry.TestSpec{
Name: "db-console/mixed-version-cypress",
Owner: registry.OwnerObservability,
Cluster: r.MakeClusterSpec(5, spec.WorkloadNode()),
CompatibleClouds: registry.AllClouds,
CockroachBinary: registry.StandardCockroach,
Suites: registry.Suites(registry.Nightly),
Randomized: false,
Run: runDbConsoleCypressMixedVersions,
Expand All @@ -210,6 +215,7 @@ func registerDbConsole(r registry.Registry) {
Owner: registry.OwnerObservability,
Cluster: r.MakeClusterSpec(4, spec.WorkloadNode()),
CompatibleClouds: registry.AllClouds,
CockroachBinary: registry.StandardCockroach,
Suites: registry.Suites(registry.Nightly),
Randomized: false,
Run: runDbConsoleCypress,
Expand Down