Skip to content

Commit

Permalink
Merge pull request #105046 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-105036

release-23.1: roachtest: skip some local tests on ARM64
  • Loading branch information
rail committed Jun 16, 2023
2 parents 7353713 + 8995b02 commit cf85e8a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 56 deletions.
1 change: 1 addition & 0 deletions pkg/cmd/roachtest/registry/registry_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ type Registry interface {
MakeClusterSpec(nodeCount int, opts ...spec.Option) spec.ClusterSpec
Add(TestSpec)
PromFactory() promauto.Factory
Cloud() string
}
4 changes: 4 additions & 0 deletions pkg/cmd/roachtest/test_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,7 @@ func (r testRegistryImpl) List(filters []string) []registry.TestSpec {
sort.Slice(tests, func(i, j int) bool { return tests[i].Name < tests[j].Name })
return tests
}

func (r testRegistryImpl) Cloud() string {
return r.cloud
}
78 changes: 22 additions & 56 deletions pkg/cmd/roachtest/tests/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -935,19 +935,24 @@ func runCDCKafkaAuth(ctx context.Context, t test.Test, c cluster.Cluster) {
}
}

func skipLocalUnderArm64(cloud string) string {
if cloud == spec.Local && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
return "Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888"
}
return ""
}

func registerCDC(r registry.Registry) {
r.Add(registry.TestSpec{
Name: "cdc/initial-scan-only",
Owner: registry.OwnerCDC,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand All @@ -971,14 +976,11 @@ func registerCDC(r registry.Registry) {
Owner: registry.OwnerCDC,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand All @@ -1001,15 +1003,12 @@ func registerCDC(r registry.Registry) {
Owner: registry.OwnerCDC,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
Tags: []string{"manual"},
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand All @@ -1032,14 +1031,11 @@ func registerCDC(r registry.Registry) {
Owner: registry.OwnerCDC,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand All @@ -1058,14 +1054,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand All @@ -1089,14 +1082,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand Down Expand Up @@ -1125,14 +1115,11 @@ func registerCDC(r registry.Registry) {
// of this test. Look into it.
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand Down Expand Up @@ -1163,14 +1150,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand All @@ -1196,14 +1180,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand Down Expand Up @@ -1238,14 +1219,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand Down Expand Up @@ -1277,14 +1255,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand All @@ -1307,14 +1282,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.CPU(16), spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand Down Expand Up @@ -1356,14 +1328,11 @@ func registerCDC(r registry.Registry) {
Owner: `cdc`,
Benchmark: true,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
ct := newCDCTester(ctx, t, c)
defer ct.Close()

Expand Down Expand Up @@ -1396,15 +1365,12 @@ func registerCDC(r registry.Registry) {
Name: "cdc/bank",
Owner: `cdc`,
// N.B. ARM64 is not yet supported, see https://github.com/cockroachdb/cockroach/issues/103888.
Skip: skipLocalUnderArm64(r.Cloud()),
Cluster: r.MakeClusterSpec(4, spec.Arch(vm.ArchAMD64)),
Leases: registry.MetamorphicLeases,
RequiresLicense: true,
Timeout: 30 * time.Minute,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.IsLocal() && runtime.GOARCH == "arm64" {
// N.B. we also have to skip locally since amd64 emulation may not be available everywhere.
t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/103888")
}
runCDCBank(ctx, t, c)
},
})
Expand Down

0 comments on commit cf85e8a

Please sign in to comment.