Skip to content

Commit

Permalink
roachtest: remove RequiresLicense test spec
Browse files Browse the repository at this point in the history
As of #135326, roachprod will now generate an
enterprise license if one is not supplied, making
the test spec no longer need.
  • Loading branch information
DarrylWong committed Dec 13, 2024
1 parent 047d1be commit 25247c0
Show file tree
Hide file tree
Showing 31 changed files with 21 additions and 93 deletions.
8 changes: 0 additions & 8 deletions pkg/cmd/roachtest/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/task"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod/config"
"github.com/cockroachdb/cockroach/pkg/roachprod/logger"
"github.com/cockroachdb/cockroach/pkg/roachprod/vm"
"github.com/cockroachdb/cockroach/pkg/util/allstacks"
Expand Down Expand Up @@ -299,13 +298,6 @@ func (r *testRunner) Run(
return fmt.Errorf("no test matched filters")
}

hasDevLicense := config.CockroachDevLicense != ""
for _, t := range tests {
if t.RequiresLicense && !hasDevLicense {
return fmt.Errorf("test %q requires an enterprise license, set COCKROACH_DEV_LICENSE", t.Name)
}
}

if err := clustersOpt.validate(); err != nil {
return err
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/cmd/roachtest/tests/acceptance.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func registerAcceptance(r registry.Registry) {
timeout time.Duration
encryptionSupport registry.EncryptionSupport
defaultLeases bool
requiresLicense bool
randomized bool
workloadNode bool
incompatibleClouds registry.CloudSet
Expand Down Expand Up @@ -148,7 +147,6 @@ func registerAcceptance(r registry.Registry) {
CompatibleClouds: registry.AllClouds.Remove(tc.incompatibleClouds),
Suites: registry.Suites(registry.Nightly, registry.Quick, registry.Acceptance),
Randomized: tc.randomized,
RequiresLicense: tc.requiresLicense,
}

if tc.timeout != 0 {
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/roachtest/tests/admission_control_database_drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func registerDatabaseDrop(r registry.Registry) {
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Weekly),
Cluster: clusterSpec,
RequiresLicense: true,
SnapshotPrefix: "droppable-database-tpce-100k",
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
snapshots, err := c.ListSnapshots(ctx, vm.VolumeSnapshotListOpts{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ func registerDiskBandwidthOverload(r registry.Registry) {
Benchmark: true,
CompatibleClouds: registry.AllExceptAzure,
// TODO(aaditya): change to weekly once the test stabilizes.
Suites: registry.ManualOnly,
Cluster: r.MakeClusterSpec(2, spec.CPU(8), spec.WorkloadNode(), spec.ReuseNone()),
RequiresLicense: true,
Leases: registry.MetamorphicLeases,
Suites: registry.ManualOnly,
Cluster: r.MakeClusterSpec(2, spec.CPU(8), spec.WorkloadNode(), spec.ReuseNone()),
Leases: registry.MetamorphicLeases,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.Spec().NodeCount != 2 {
t.Fatalf("expected 2 nodes, found %d", c.Spec().NodeCount)
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/roachtest/tests/admission_control_elastic_cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func registerElasticControlForCDC(r registry.Registry) {
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Weekly),
Cluster: r.MakeClusterSpec(4, spec.CPU(8), spec.WorkloadNode()),
RequiresLicense: true,
Leases: registry.MetamorphicLeases,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.Spec().NodeCount < 4 {
Expand Down
5 changes: 2 additions & 3 deletions pkg/cmd/roachtest/tests/admission_control_elastic_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ func registerElasticIO(r registry.Registry) {
Suites: registry.Suites(registry.Nightly),
// Tags: registry.Tags(`weekly`),
// Second node is solely for Prometheus.
Cluster: r.MakeClusterSpec(2, spec.CPU(8), spec.WorkloadNode()),
RequiresLicense: true,
Leases: registry.MetamorphicLeases,
Cluster: r.MakeClusterSpec(2, spec.CPU(8), spec.WorkloadNode()),
Leases: registry.MetamorphicLeases,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() {
t.Skip("IO overload test is not meant to run locally")
Expand Down
5 changes: 2 additions & 3 deletions pkg/cmd/roachtest/tests/admission_control_index_backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ func registerIndexBackfill(r registry.Registry) {
// TODO(aaditya): Revisit this as part of #111614.
//Suites: registry.Suites(registry.Weekly),
//Tags: registry.Tags(`weekly`),
Cluster: clusterSpec,
RequiresLicense: true,
SnapshotPrefix: "index-backfill-tpce-100k",
Cluster: clusterSpec,
SnapshotPrefix: "index-backfill-tpce-100k",
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
snapshots, err := c.ListSnapshots(ctx, vm.VolumeSnapshotListOpts{
// TODO(irfansharif): Search by taking in the other parts of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func registerIntentResolutionOverload(r registry.Registry) {
// Tags: registry.Tags(`weekly`),
// Second node is solely for Prometheus.
Cluster: r.MakeClusterSpec(2, spec.CPU(8), spec.WorkloadNode()),
RequiresLicense: true,
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/roachtest/tests/backup_restore_roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func registerBackupRestoreRoundTrip(r registry.Registry) {
Owner: registry.OwnerDisasterRecovery,
Cluster: r.MakeClusterSpec(4, spec.WorkloadNode()),
EncryptionSupport: registry.EncryptionMetamorphic,
RequiresLicense: true,
NativeLibs: registry.LibGEOS,
// See https://github.com/cockroachdb/cockroach/issues/105968
CompatibleClouds: registry.Clouds(spec.GCE, spec.Local),
Expand Down
42 changes: 8 additions & 34 deletions pkg/cmd/roachtest/tests/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1358,11 +1358,10 @@ func runCDCKafkaAuth(ctx context.Context, t test.Test, c cluster.Cluster) {

func registerCDC(r registry.Registry) {
r.Add(registry.TestSpec{
Name: "cdc/initial-scan-only",
Owner: registry.OwnerCDC,
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.WorkloadNode(), spec.Arch(vm.ArchAMD64)),
RequiresLicense: true,
Name: "cdc/initial-scan-only",
Owner: registry.OwnerCDC,
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.WorkloadNode(), spec.Arch(vm.ArchAMD64)),
// This test uses google cloudStorageSink because it is the fastest,
// but it is not a requirement for this test. The sink could be
// chosen on a per cloud basis if we want to run this on other clouds.
Expand Down Expand Up @@ -1392,7 +1391,6 @@ func registerCDC(r registry.Registry) {
Name: "cdc/initial-scan-rolling-restart/normal-checkpoint",
Owner: registry.OwnerCDC,
Cluster: r.MakeClusterSpec(4),
RequiresLicense: true,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
Timeout: 30 * time.Minute,
Expand All @@ -1404,7 +1402,6 @@ func registerCDC(r registry.Registry) {
Name: "cdc/initial-scan-rolling-restart/shutdown-checkpoint",
Owner: registry.OwnerCDC,
Cluster: r.MakeClusterSpec(4),
RequiresLicense: true,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
Timeout: 30 * time.Minute,
Expand All @@ -1418,7 +1415,6 @@ func registerCDC(r registry.Registry) {
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.WorkloadNode(), spec.CPU(16)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
CompatibleClouds: registry.AllClouds,
Suites: registry.Suites(registry.Nightly),
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand Down Expand Up @@ -1448,7 +1444,6 @@ func registerCDC(r registry.Registry) {
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.WorkloadNode(), spec.CPU(16)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
CompatibleClouds: registry.OnlyAWS,
Suites: registry.ManualOnly,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand Down Expand Up @@ -1480,7 +1475,6 @@ func registerCDC(r registry.Registry) {
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.WorkloadNode(), spec.CPU(16)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand All @@ -1505,11 +1499,10 @@ func registerCDC(r registry.Registry) {
},
})
r.Add(registry.TestSpec{
Name: "cdc/initial-scan-only/parquet",
Owner: registry.OwnerCDC,
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.WorkloadNode(), spec.Arch(vm.ArchAMD64)),
RequiresLicense: true,
Name: "cdc/initial-scan-only/parquet",
Owner: registry.OwnerCDC,
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.WorkloadNode(), spec.Arch(vm.ArchAMD64)),
// This test uses google cloudStorageSink because it is the fastest,
// but it is not a requirement for this test. The sink could be
// chosen on a per cloud basis if we want to run this on other clouds.
Expand Down Expand Up @@ -1539,7 +1532,6 @@ func registerCDC(r registry.Registry) {
Owner: registry.OwnerCDC,
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.WorkloadNode(), spec.Arch(vm.ArchAMD64)),
RequiresLicense: true,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand Down Expand Up @@ -1584,7 +1576,6 @@ func registerCDC(r registry.Registry) {
// TODO(radu): fix this.
CompatibleClouds: registry.AllClouds,
Suites: registry.ManualOnly,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand All @@ -1611,7 +1602,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand All @@ -1634,7 +1624,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -1665,7 +1654,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -1744,7 +1732,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -1783,7 +1770,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
RequiresDeprecatedWorkload: true, // uses ledger
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
Expand Down Expand Up @@ -1819,7 +1805,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -1850,7 +1835,6 @@ func registerCDC(r registry.Registry) {
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -1889,7 +1873,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -1930,7 +1913,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -1962,7 +1944,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -2006,7 +1987,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runCDCKafkaAuth(ctx, t, c)
},
Expand All @@ -2018,7 +1998,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.OnlyAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
c.Start(ctx, t.L(), option.DefaultStartOpts(), install.MakeClusterSettings(), c.All())
mskMgr := newMSKManager(ctx, t)
Expand Down Expand Up @@ -2054,7 +2033,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.Cloud() == spec.Local && runtime.GOARCH == "arm64" {
// N.B. We have to skip locally since amd64 emulation may not be available everywhere.
Expand Down Expand Up @@ -2101,7 +2079,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
ct := newCDCTester(ctx, t, c)
defer ct.Close()
Expand Down Expand Up @@ -2249,7 +2226,6 @@ func registerCDC(r registry.Registry) {
ct.waitForWorkload()
ct.verifyMetrics(ctx, verifyMetricsNonZero("changefeed_network_bytes_in", "changefeed_network_bytes_out"))
},
RequiresLicense: true,
})
r.Add(registry.TestSpec{
Name: "cdc/bank",
Expand All @@ -2258,7 +2234,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Timeout: 60 * time.Minute,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runCDCBank(ctx, t, c)
Expand All @@ -2271,7 +2246,6 @@ func registerCDC(r registry.Registry) {
Leases: registry.MetamorphicLeases,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runCDCSchemaRegistry(ctx, t, c)
},
Expand Down
4 changes: 0 additions & 4 deletions pkg/cmd/roachtest/tests/cdc_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func registerCDCBench(r registry.Registry) {
Cluster: r.MakeClusterSpec(nodes+1, spec.CPU(cpus)),
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Weekly),
RequiresLicense: true,
Timeout: 4 * time.Hour, // Allow for the initial import and catchup scans with 100k ranges.
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runCDCBenchScan(ctx, t, c, scanType, rows, ranges, format)
Expand Down Expand Up @@ -119,7 +118,6 @@ func registerCDCBench(r registry.Registry) {
Cluster: r.MakeClusterSpec(nodes+2, spec.CPU(cpus)),
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Weekly),
RequiresLicense: true,
Timeout: time.Hour,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runCDCBenchWorkload(ctx, t, c, ranges, readPercent, "", "", nullSink)
Expand All @@ -137,7 +135,6 @@ func registerCDCBench(r registry.Registry) {
Cluster: r.MakeClusterSpec(nodes+2, spec.CPU(cpus)),
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Weekly),
RequiresLicense: true,
Timeout: time.Hour,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runCDCBenchWorkload(ctx, t, c, ranges, readPercent, server, format, nullSink)
Expand All @@ -153,7 +150,6 @@ func registerCDCBench(r registry.Registry) {
Cluster: r.MakeClusterSpec(nodes+3, spec.CPU(cpus)),
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Weekly),
RequiresLicense: true,
Timeout: time.Hour,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runCDCBenchWorkload(ctx, t, c, ranges, readPercent, server, format, kafkaSink)
Expand Down
3 changes: 0 additions & 3 deletions pkg/cmd/roachtest/tests/cdc_filtering.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func registerCDCFiltering(r registry.Registry) {
Cluster: r.MakeClusterSpec(3),
CompatibleClouds: registry.AllClouds,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: runCDCSessionFiltering(ignoreFiltering),
})
r.Add(registry.TestSpec{
Expand All @@ -48,7 +47,6 @@ func registerCDCFiltering(r registry.Registry) {
Cluster: r.MakeClusterSpec(3),
CompatibleClouds: registry.AllClouds,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: runCDCTTLFiltering(ttlFilteringClusterSetting, ignoreFiltering),
})
r.Add(registry.TestSpec{
Expand All @@ -57,7 +55,6 @@ func registerCDCFiltering(r registry.Registry) {
Cluster: r.MakeClusterSpec(3),
CompatibleClouds: registry.AllClouds,
Suites: registry.Suites(registry.Nightly),
RequiresLicense: true,
Run: runCDCTTLFiltering(ttlFilteringTableStorageParam, ignoreFiltering),
})
}
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/roachtest/tests/cluster_to_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,6 @@ func c2cRegisterWrapper(
CompatibleClouds: sp.clouds,
Suites: sp.suites,
TestSelectionOptOutSuites: sp.suites,
RequiresLicense: true,
Run: run,
})
}
Expand Down
Loading

0 comments on commit 25247c0

Please sign in to comment.