Skip to content

Commit da27309

Browse files
chore(.github): test against scylla:2025.1.0-rc4 (#4306)
* chore(Makefile): update default Scylla version to scylla-nightly:latest It's always better to analyze the newest Scylla behavior by default. It also doesn't make us bump this version once in a while. * chore(testing): adjust testing image build to ubi-9-minimal Scylla base image This commit extends the way in which the testing images is built with commands suitable for ubi-9-minimal Scylla base image. Fixes #4303 * chore(treewide): adjust tests to ubi-9-minimal Scylla base image Some tests execute commands on scylla nodes over ssh, and some of them need small alterations, so that they work on ubi-9-minimal Scylla base images. This commit also improves the implementation of timeout related tests. * chore(backup_test): remove TestBackupRestoreIntegration We haven't been supporting ansible script restore for a long time, so we don't need to keep on testing it. * chore(.github): test scylladb/scylla:2025.1.0-rc4 * fix(testing): set scylla:latest as default Scylla version scylla:latest still does not require to update this version from time to time, but it should be more stable than the nightly counterpart.
1 parent d0b508f commit da27309

13 files changed

+89
-182
lines changed

Diff for: .github/cfg/integration-test-cfg.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
tablets: enabled
4747
ssl-enabled: false
4848

49-
- scylla-version: scylladb-ci:2025.2.0-dev-0.20250310.8d676048a6d9
50-
ip-family: IPV4
49+
- scylla-version: scylla:2025.1.0-rc4
50+
ip-family: IPV6
5151
raft-schema: none
5252
tablets: disabled
5353
ssl-enabled: true
5454

55-
- scylla-version: scylladb-ci:2025.2.0-dev-0.20250310.8d676048a6d9
55+
- scylla-version: scylla:2025.1.0-rc4
5656
ip-family: IPV4
5757
raft-schema: none
5858
tablets: enabled

Diff for: .github/workflows/integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4-tablets-nossl.yaml renamed to .github/workflows/integration-tests-2025.1.0-rc4-IPV4-tablets-nossl.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ concurrency:
22
cancel-in-progress: true
33
group: int-${{ github.workflow }}-${{ github.ref }}
44
env:
5-
scylla-version: scylladb-ci:2025.2.0-dev-0.20250310.8d676048a6d9
5+
scylla-version: scylla:2025.1.0-rc4
66
ip-family: IPV4
77
raft-schema: none
88
tablets: enabled
@@ -106,7 +106,7 @@ jobs:
106106
run: make pkg-integration-test PKG=./pkg/store
107107
- name: Run migrate tests
108108
run: make pkg-integration-test PKG=./pkg/schema/migrate
109-
name: integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4-tablets-nossl
109+
name: integration-tests-2025.1.0-rc4-IPV4-tablets-nossl
110110
"on":
111111
pull_request:
112112
types:

Diff for: .github/workflows/integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4.yaml renamed to .github/workflows/integration-tests-2025.1.0-rc4-IPV6.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ concurrency:
22
cancel-in-progress: true
33
group: int-${{ github.workflow }}-${{ github.ref }}
44
env:
5-
scylla-version: scylladb-ci:2025.2.0-dev-0.20250310.8d676048a6d9
6-
ip-family: IPV4
5+
scylla-version: scylla:2025.1.0-rc4
6+
ip-family: IPV6
77
raft-schema: none
88
tablets: disabled
99
ssl-enabled: "true"
@@ -106,7 +106,7 @@ jobs:
106106
run: make pkg-integration-test PKG=./pkg/store
107107
- name: Run migrate tests
108108
run: make pkg-integration-test PKG=./pkg/schema/migrate
109-
name: integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4
109+
name: integration-tests-2025.1.0-rc4-IPV6
110110
"on":
111111
pull_request:
112112
types:

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ GIT_ROOT = $(shell git rev-parse --show-toplevel)
1616
GOBIN ?= $(shell pwd)/bin
1717
GOFILES = go list -f '{{range .GoFiles}}{{ $$.Dir }}/{{ . }} {{end}}{{range .TestGoFiles}}{{ $$.Dir }}/{{ . }} {{end}}' $(PKG)
1818

19-
SCYLLA_VERSION?=scylla:6.0.1
19+
SCYLLA_VERSION?=scylla:latest
2020
IP_FAMILY?=IPV4
2121
RAFT_SCHEMA?=none
2222
TABLETS?=enabled

Diff for: README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Scylla Manager consists of tree components:
1515

1616
## Scylla integration status
1717

18-
| ScyllaDB version | Workflows | Limitations |
19-
|------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
20-
| **2024.1.12** | ![integration-tests-2024.1.12-IPV4]<br/>![integration-tests-2024.1.12-IPV6] | Restoration of schema into cluster with `consistant_cluster_management: true` is not supported |
21-
| **2023.1.11** | ![integration-tests-2023.1.11-IPV4]<br/>![integration-tests-2023.1.11-IPV4-raftschema]<br/>![integration-tests-2023.1.11-IPV6-raftschema] | Restoration of schema into cluster with `consistant_cluster_management: true` is not supported |
22-
| **6.2.0** | ![integration-tests-6.2.0-IPV4]<br/>![integration-tests-6.2.0-IPV4-tablets]<br/>![integration-tests-6.2.0-IPV6-tablets-nossl] | Restoration of **Authentication** and **Service Levels** is not supported<br/>Restoration of schema containing **Alternator** tables is not supported |
23-
| **2025.2.0-dev-0.20250310.8d676048a6d9** | ![integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4]<br/>![integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4-tablets-nossl] | Restoration of **Authentication** and **Service Levels** is not supported<br/>Restoration of schema containing **Alternator** tables is not supported |
18+
| ScyllaDB version | Workflows | Limitations |
19+
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
20+
| **2024.1.12** | ![integration-tests-2024.1.12-IPV4]<br/>![integration-tests-2024.1.12-IPV6] | Restoration of schema into cluster with `consistant_cluster_management: true` is not supported |
21+
| **2023.1.11** | ![integration-tests-2023.1.11-IPV4]<br/>![integration-tests-2023.1.11-IPV4-raftschema]<br/>![integration-tests-2023.1.11-IPV6-raftschema] | Restoration of schema into cluster with `consistant_cluster_management: true` is not supported |
22+
| **6.2.0** | ![integration-tests-6.2.0-IPV4]<br/>![integration-tests-6.2.0-IPV4-tablets]<br/>![integration-tests-6.2.0-IPV6-tablets-nossl] | Restoration of **Authentication** and **Service Levels** is not supported<br/>Restoration of schema containing **Alternator** tables is not supported |
23+
| **2025.1.0-rc4** | ![integration-tests-2025.1.0-rc4-IPV6]<br/>![integration-tests-2025.1.0-rc4-IPV4-tablets-nossl] | Restoration of **Authentication** and **Service Levels** is not supported<br/>Restoration of schema containing **Alternator** tables is not supported |
2424

2525
[integration-tests-2024.1.12-IPV4]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-2024.1.12-IPV4.yaml/badge.svg?branch=master
2626
[integration-tests-2024.1.12-IPV6]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-2024.1.12-IPV6.yaml/badge.svg?branch=master
@@ -30,8 +30,8 @@ Scylla Manager consists of tree components:
3030
[integration-tests-6.2.0-IPV4]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-6.2.0-IPV4.yaml/badge.svg?branch=master
3131
[integration-tests-6.2.0-IPV4-tablets]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-6.2.0-IPV4-tablets.yaml/badge.svg?branch=master
3232
[integration-tests-6.2.0-IPV6-tablets-nossl]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-6.2.0-IPV6-tablets-nossl.yaml/badge.svg?branch=master
33-
[integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4.yaml/badge.svg?branch=master
34-
[integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4-tablets-nossl]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-2025.2.0-dev-0.20250310.8d676048a6d9-IPV4-tablets-nossl.yaml/badge.svg?branch=master
33+
[integration-tests-2025.1.0-rc4-IPV6]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-2025.1.0-rc4-IPV6.yaml/badge.svg?branch=master
34+
[integration-tests-2025.1.0-rc4-IPV4-tablets-nossl]: https://github.com/scylladb/scylla-manager/actions/workflows/integration-tests-2025.1.0-rc4-IPV4-tablets-nossl.yaml/badge.svg?branch=master
3535

3636
## Installing and updating Go
3737

Diff for: pkg/scyllaclient/client_scylla_integration_test.go

+33-10
Original file line numberDiff line numberDiff line change
@@ -169,38 +169,61 @@ func TestClientActiveRepairsIntegration(t *testing.T) {
169169
if err != nil {
170170
t.Fatal(err)
171171
}
172-
hosts, err := client.Hosts(context.Background())
172+
ni, err := client.AnyNodeInfo(context.Background())
173173
if err != nil {
174174
t.Fatal(err)
175175
}
176+
tabletAPI, err := ni.SupportsTabletRepair()
177+
if err != nil {
178+
t.Fatal(err)
179+
}
180+
181+
Print("Given: cluster with table to repair")
182+
const ks = "test_active_repairs_ks"
183+
s := db.CreateSessionAndDropAllKeyspaces(t, client)
184+
db.WriteData(t, s, ks, 1)
185+
186+
rd := scyllaclient.NewRingDescriber(context.Background(), client)
187+
asyncRepair := func(ctx context.Context, ks, tab, master string) {
188+
if _, err := client.RawRepair(ctx, ks, tab, master); err != nil {
189+
t.Error(err)
190+
}
191+
}
192+
if rd.IsTabletKeyspace(ks) && tabletAPI {
193+
asyncRepair = func(ctx context.Context, ks, tab, master string) {
194+
if _, err := client.TabletRepair(ctx, ks, tab, master, nil, nil); err != nil {
195+
t.Error(err)
196+
}
197+
}
198+
}
176199

177200
Print("When: cluster is idle")
178201
Print("Then: no repairs are running")
179-
active, err := client.ActiveRepairs(context.Background(), hosts)
202+
active, err := client.ActiveRepairs(context.Background(), ManagedClusterHosts())
180203
if err != nil {
181204
t.Fatal(err)
182205
}
183206
if len(active) != 0 {
184207
t.Fatal(active)
185208
}
186209

187-
Print("When: repair is running on host 0")
188-
go func() {
189-
ExecOnHost(hosts[0], "nodetool repair -pr")
190-
}()
191210
defer func() {
192-
if err := client.KillAllRepairs(context.Background(), hosts[0]); err != nil {
211+
// Make sure that repairs don't spill to other tests
212+
if err := client.KillAllRepairs(context.Background(), ManagedClusterHosts()...); err != nil {
193213
t.Fatal(err)
194214
}
195215
}()
196216

197-
Print("Then: active repairs reports host 0")
217+
Print("When: repairs are running")
218+
Print("Then: repairs are reported as active")
198219
WaitCond(t, func() bool {
199-
active, err = client.ActiveRepairs(context.Background(), hosts)
220+
// Multiple repair requests in order to reduce flakiness
221+
asyncRepair(context.Background(), ks, db.BigTableName, ManagedClusterHost())
222+
active, err = client.ActiveRepairs(context.Background(), ManagedClusterHosts())
200223
if err != nil {
201224
t.Fatal(err)
202225
}
203-
return cmp.Diff(active, hosts[0:1]) == ""
226+
return len(active) > 0
204227
}, 500*time.Millisecond, 4*time.Second)
205228
}
206229

Diff for: pkg/scyllaclient/export_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ package scyllaclient
55
import (
66
"context"
77
"time"
8+
9+
"github.com/scylladb/scylla-manager/v3/swagger/gen/scylla/v1/client/operations"
810
)
911

1012
func NoRetry(ctx context.Context) context.Context {
@@ -38,3 +40,16 @@ func (p *CachedProvider) SetValidity(d time.Duration) {
3840
func (c *Client) Hosts(ctx context.Context) ([]string, error) {
3941
return c.hosts(ctx)
4042
}
43+
44+
func (c *Client) RawRepair(ctx context.Context, ks, tab, master string) (int32, error) {
45+
p := operations.StorageServiceRepairAsyncByKeyspacePostParams{
46+
Context: forceHost(ctx, master),
47+
Keyspace: ks,
48+
ColumnFamilies: &tab,
49+
}
50+
resp, err := c.scyllaOps.StorageServiceRepairAsyncByKeyspacePost(&p)
51+
if err != nil {
52+
return 0, err
53+
}
54+
return resp.GetPayload(), nil
55+
}

Diff for: pkg/scyllaclient/retry_integration_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ func testRetry(t *testing.T, hosts []string, n int, shouldTimeout bool) error {
101101
config := scyllaclient.TestConfig(hosts, AgentAuthToken())
102102
config.Transport = hostRecorder(scyllaclient.DefaultTransport(), triedHosts)
103103

104-
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(n+1)*config.Timeout)
105-
defer cancel()
106-
defer unblock(context.Background())
107-
108-
if err := block(ctx, hosts[0:n]); err != nil {
104+
if err := block(context.Background(), hosts[0:n]); err != nil {
109105
return err
110106
}
111107

@@ -114,6 +110,10 @@ func testRetry(t *testing.T, hosts []string, n int, shouldTimeout bool) error {
114110
return err
115111
}
116112

113+
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(n+1)*config.Timeout)
114+
defer cancel()
115+
defer unblock(context.Background())
116+
117117
if _, err = client.Hosts(ctx); err != nil {
118118
if shouldTimeout {
119119
if !strings.HasSuffix(err.Error(), fmt.Sprintf("after %s: context deadline exceeded", client.Config().Timeout)) {

Diff for: pkg/service/backup/service_backup_integration_test.go

-136
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"testing"
2121
"time"
2222

23-
"github.com/gocql/gocql"
2423
"github.com/google/go-cmp/cmp"
2524
"github.com/google/go-cmp/cmp/cmpopts"
2625
"github.com/pkg/errors"
@@ -2120,141 +2119,6 @@ func TestValidateIntegration(t *testing.T) {
21202119
}
21212120
}
21222121

2123-
func TestBackupRestoreIntegration(t *testing.T) {
2124-
const (
2125-
testBucket = "backuptest-restore"
2126-
testKeyspace = "backuptest_restore"
2127-
)
2128-
2129-
location := s3Location(testBucket)
2130-
config := defaultConfig()
2131-
2132-
var (
2133-
session = CreateScyllaManagerDBSession(t)
2134-
h = newBackupTestHelper(t, session, config, location, nil)
2135-
ctx = context.Background()
2136-
clusterSession = CreateSessionAndDropAllKeyspaces(t, h.Client)
2137-
initialRowCount = 100
2138-
addedRowCount = 150
2139-
)
2140-
2141-
Print("When: cluster has data")
2142-
ExecStmt(t, clusterSession, "CREATE KEYSPACE IF NOT EXISTS "+testKeyspace+" WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 3, 'dc2': 3}")
2143-
ExecStmt(t, clusterSession, "CREATE TABLE IF NOT EXISTS "+testKeyspace+".test_table (id int PRIMARY KEY)")
2144-
for i := 1; i <= initialRowCount; i++ {
2145-
ExecStmt(t, clusterSession, "INSERT INTO "+testKeyspace+".test_table (id) VALUES "+fmt.Sprintf("(%d)", i))
2146-
}
2147-
2148-
target := backup.Target{
2149-
Units: []backup.Unit{
2150-
{
2151-
Keyspace: testKeyspace,
2152-
Tables: []string{"test_table"},
2153-
},
2154-
{
2155-
Keyspace: "system_schema",
2156-
AllTables: true,
2157-
},
2158-
},
2159-
DC: []string{"dc1", "dc2"},
2160-
Location: []backupspec.Location{location},
2161-
Retention: 3,
2162-
}
2163-
if err := h.service.InitTarget(ctx, h.ClusterID, &target); err != nil {
2164-
t.Fatal(err)
2165-
}
2166-
2167-
Print("And: run backup")
2168-
if err := h.service.Backup(ctx, h.ClusterID, h.TaskID, h.RunID, target); err != nil {
2169-
t.Fatal(err)
2170-
}
2171-
2172-
Print("Then: there is one backup")
2173-
items, err := h.service.List(ctx, h.ClusterID, []backupspec.Location{location}, backup.ListFilter{ClusterID: h.ClusterID})
2174-
if err != nil {
2175-
t.Fatal(err)
2176-
}
2177-
if len(items) != 1 {
2178-
t.Fatalf("List() = %v, expected one item", items)
2179-
}
2180-
item := items[0]
2181-
if len(item.SnapshotInfo) != 1 {
2182-
t.Fatalf("List() = %v, expected one SnapshotTag", items)
2183-
}
2184-
snapshotTag := item.SnapshotInfo[0].SnapshotTag
2185-
2186-
Print("And: add more data")
2187-
for i := initialRowCount + 1; i <= addedRowCount; i++ {
2188-
ExecStmt(t, clusterSession, "INSERT INTO "+testKeyspace+".test_table (id) VALUES "+fmt.Sprintf("(%d)", i))
2189-
}
2190-
2191-
Print("Then: there is 15 rows")
2192-
count := func() int {
2193-
c := 0
2194-
if err := clusterSession.Query("SELECT COUNT(*) FROM "+testKeyspace+".test_table;", nil).Scan(&c); err != nil {
2195-
t.Fatal("select count:", err)
2196-
}
2197-
return c
2198-
}
2199-
if c := count(); c != addedRowCount {
2200-
t.Errorf("SELECT COUNT(*) = %d, expected %d", c, addedRowCount)
2201-
}
2202-
2203-
Print("When: delete data")
2204-
q := clusterSession.Query("TRUNCATE "+testKeyspace+".test_table", nil)
2205-
q.Consistency(gocql.All)
2206-
if err := q.ExecRelease(); err != nil {
2207-
t.Fatal("TRUNCATE error", err)
2208-
}
2209-
2210-
Print("And: restore snapshot")
2211-
status, err := h.Client.Status(ctx)
2212-
if err != nil {
2213-
t.Fatal("Status() error", err)
2214-
}
2215-
2216-
for _, nis := range status {
2217-
stdout, stderr, err := ExecOnHost(nis.Addr, "chown scylla:scylla -R /var/lib/scylla/data/"+testKeyspace)
2218-
if err != nil {
2219-
t.Log("stdout", stdout)
2220-
t.Log("stderr", stderr)
2221-
t.Fatal("Command failed on host", nis.Addr, err)
2222-
}
2223-
}
2224-
downloadFilesCmd := []string{
2225-
"sudo -u scylla",
2226-
"scylla-manager-agent",
2227-
"download-files",
2228-
"-d", "/var/lib/scylla/data",
2229-
"-L", location.String(),
2230-
"-T", snapshotTag,
2231-
"-K", testKeyspace,
2232-
"--mode", "upload",
2233-
}
2234-
for _, nis := range status {
2235-
stdout, stderr, err := ExecOnHost(nis.Addr, strings.Join(downloadFilesCmd, " "))
2236-
if err != nil {
2237-
t.Log("stdout", stdout)
2238-
t.Log("err", err)
2239-
t.Log("stderr", stderr)
2240-
t.Fatal("Command failed on host", nis.Addr, err)
2241-
}
2242-
}
2243-
for _, nis := range status {
2244-
stdout, stderr, err := ExecOnHost(nis.Addr, "nodetool refresh "+testKeyspace+" test_table")
2245-
if err != nil {
2246-
t.Log("stdout", stdout)
2247-
t.Log("stderr", stderr)
2248-
t.Fatal("Command failed on host", nis.Addr, err)
2249-
}
2250-
}
2251-
2252-
Print("Then: there is previous number of rows")
2253-
if c := count(); c != initialRowCount {
2254-
t.Errorf("SELECT COUNT(*) = %d, expected %d", c, addedRowCount)
2255-
}
2256-
}
2257-
22582122
func TestBackupListIntegration(t *testing.T) {
22592123
const (
22602124
testBucket = "backuptest-list"

Diff for: pkg/service/healthcheck/service_integration_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,6 @@ func testStatusIntegration(t *testing.T, clusterID uuid.UUID, clusterSvc cluster
439439
})
440440

441441
t.Run("all nodes REST DOWN", func(t *testing.T) {
442-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
443-
defer cancel()
444-
445442
for _, h := range ManagedClusterHosts() {
446443
BlockREST(t, h)
447444
}
@@ -452,6 +449,8 @@ func testStatusIntegration(t *testing.T, clusterID uuid.UUID, clusterSvc cluster
452449
}()
453450

454451
msg := ""
452+
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
453+
defer cancel()
455454
if _, err := s.Status(ctx, clusterID); err != nil {
456455
msg = err.Error()
457456
}

0 commit comments

Comments
 (0)