Skip to content

Commit 68a566c

Browse files
authored
Merge pull request #33461 from def-/pr-orchestratord-upgrade
orchestratord test: Introduce upgrade scenario
2 parents 9d06fe7 + 7926862 commit 68a566c

File tree

4 files changed

+616
-187
lines changed

4 files changed

+616
-187
lines changed

ci/nightly/pipeline.template.yml

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,35 +2293,83 @@ steps:
22932293
- id: orchestratord-defaults
22942294
label: "Orchestratord test (defaults for properties)"
22952295
depends_on: build-aarch64
2296-
timeout_in_minutes: 180
2296+
timeout_in_minutes: 120
22972297
plugins:
22982298
- ./ci/plugins/mzcompose:
22992299
composition: orchestratord
2300-
args: [--scenario=defaults, --recreate-cluster]
2300+
args: [--action=noop, --properties=defaults, --recreate-cluster]
23012301
ci-builder: stable
23022302
agents:
23032303
queue: hetzner-aarch64-16cpu-32gb
23042304

2305-
- id: orchestratord-all
2306-
label: "Orchestratord test (every property)"
2305+
- id: orchestratord-individual
2306+
label: "Orchestratord test (individual properties)"
23072307
depends_on: build-aarch64
2308-
timeout_in_minutes: 180
2308+
timeout_in_minutes: 120
23092309
plugins:
23102310
- ./ci/plugins/mzcompose:
23112311
composition: orchestratord
2312-
args: [--scenario=all, --recreate-cluster]
2312+
args: [--action=noop, --properties=individual, --recreate-cluster]
23132313
ci-builder: stable
23142314
agents:
23152315
queue: hetzner-aarch64-16cpu-32gb
23162316

23172317
- id: orchestratord-combine
23182318
label: "Orchestratord test (combine properties)"
23192319
depends_on: build-aarch64
2320-
timeout_in_minutes: 180
2320+
timeout_in_minutes: 120
2321+
plugins:
2322+
- ./ci/plugins/mzcompose:
2323+
composition: orchestratord
2324+
args: [--action=noop, --properties=combine, --runtime=3600, --recreate-cluster]
2325+
ci-builder: stable
2326+
agents:
2327+
queue: hetzner-aarch64-16cpu-32gb
2328+
2329+
- id: orchestratord-upgrade-individual
2330+
label: "Orchestratord test (upgrade, individual props)"
2331+
depends_on: build-aarch64
2332+
timeout_in_minutes: 120
2333+
plugins:
2334+
- ./ci/plugins/mzcompose:
2335+
composition: orchestratord
2336+
args: [--action=upgrade, --properties=individual, --runtime=3600, --recreate-cluster]
2337+
ci-builder: stable
2338+
agents:
2339+
queue: hetzner-aarch64-8cpu-16gb
2340+
2341+
- id: orchestratord-upgrade-combine
2342+
label: "Orchestratord test (upgrade, combine props)"
2343+
depends_on: build-aarch64
2344+
timeout_in_minutes: 120
2345+
plugins:
2346+
- ./ci/plugins/mzcompose:
2347+
composition: orchestratord
2348+
args: [--action=upgrade, --properties=combine, --runtime=3600, --recreate-cluster]
2349+
ci-builder: stable
2350+
agents:
2351+
queue: hetzner-aarch64-8cpu-16gb
2352+
2353+
- id: orchestratord-upgrade-chain-individual
2354+
label: "Orchestratord test (upgrade chain, individual props)"
2355+
depends_on: build-aarch64
2356+
timeout_in_minutes: 120
2357+
plugins:
2358+
- ./ci/plugins/mzcompose:
2359+
composition: orchestratord
2360+
args: [--action=upgrade-chain, --properties=individual, --runtime=3600, --recreate-cluster]
2361+
ci-builder: stable
2362+
agents:
2363+
queue: hetzner-aarch64-8cpu-16gb
2364+
2365+
- id: orchestratord-upgrade-chain-combine
2366+
label: "Orchestratord test (upgrade chain, combine props)"
2367+
depends_on: build-aarch64
2368+
timeout_in_minutes: 120
23212369
plugins:
23222370
- ./ci/plugins/mzcompose:
23232371
composition: orchestratord
2324-
args: [--scenario=combine, --runtime=7200, --recreate-cluster]
2372+
args: [--action=upgrade-chain, --properties=combine, --runtime=3600, --recreate-cluster]
23252373
ci-builder: stable
23262374
agents:
23272375
queue: hetzner-aarch64-16cpu-32gb

ci/plugins/mzcompose/hooks/command

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,13 @@ cleanup() {
134134
ci_unimportant_heading "orchestratord test: Uploading logs..."
135135
K8S_CLUSTER_NAME=kind
136136
K8S_CONTEXT="kind-$K8S_CLUSTER_NAME"
137-
for pod in $(kubectl get pods -o name | grep -v -E 'kubernetes|minio|cockroach|redpanda'); do
138-
kubectl logs --prefix=true "$pod" &>> kubectl-get-logs.log || true
139-
kubectl logs --previous --prefix=true "$pod" &>> kubectl-get-logs-previous.log || true
137+
for pod in $(kubectl get pods -o name -n materialize | grep -v -E 'kubernetes|minio|cockroach|redpanda'); do
138+
kubectl logs --prefix=true "$pod" -n materialize &>> kubectl-get-logs.log || true
139+
kubectl logs --previous --prefix=true "$pod" -n materialize &>> kubectl-get-logs-previous.log || true
140140
done
141-
kubectl get events > kubectl-get-events.log || true
142-
kubectl get all > kubectl-get-all.log || true
143-
kubectl get events > kubectl-get-events.log || true
144-
kubectl get all > kubectl-get-all.log || true
145-
kubectl describe all | awk '
141+
kubectl get events -n materialize > kubectl-get-events.log || true
142+
kubectl get all -n materialize > kubectl-get-all.log || true
143+
kubectl describe all -n materialize | awk '
146144
BEGIN { redact=0 }
147145
/^[[:space:]]*Environment:/ {
148146
indent = match($0, /[^ ]/) - 1
@@ -160,13 +158,35 @@ cleanup() {
160158
}
161159
{ print }
162160
' > kubectl-describe-all.log || true
163-
kubectl get pods -o wide > kubectl-pods-with-nodes.log || true
161+
kubectl get pods -o wide -n materialize > kubectl-pods-with-nodes.log || true
164162

165-
kubectl -n kube-system get events > kubectl-get-events-kube-system.log || true
166-
kubectl -n kube-system get all > kubectl-get-all-kube-system.log || true
167-
kubectl -n kube-system describe all > kubectl-describe-all-kube-system.log || true
163+
for pod in $(kubectl get pods -o name -n materialize-environment | grep -v -E 'kubernetes|minio|cockroach|redpanda'); do
164+
kubectl logs --prefix=true "$pod" -n materialize-environment &>> kubectl-get-logs-environment.log || true
165+
kubectl logs --previous --prefix=true "$pod" -n materialize-environment &>> kubectl-get-logs-previous-environment.log || true
166+
done
167+
kubectl get events -n materialize-environment > kubectl-get-events-environment.log || true
168+
kubectl get all -n materialize-environment > kubectl-get-all-environment.log || true
169+
kubectl describe all -n materialize-environment | awk '
170+
BEGIN { redact=0 }
171+
/^[[:space:]]*Environment:/ {
172+
indent = match($0, /[^ ]/) - 1
173+
print substr($0, 1, indent) "Environment: [REDACTED]"
174+
redact = 1
175+
next
176+
}
177+
redact {
178+
current_indent = match($0, /[^ ]/) - 1
179+
if (current_indent <= indent || NF == 0) {
180+
redact = 0
181+
} else {
182+
next
183+
}
184+
}
185+
{ print }
186+
' > kubectl-describe-all-environment.log || true
187+
kubectl get pods -o wide -n materialize-environment > kubectl-pods-with-nodes-environment.log || true
168188

169-
mapfile -t artifacts < <(printf "kubectl-get-logs.log\nkubectl-get-logs-previous.log\nkubectl-get-events.log\nkubectl-get-all.log\nkubectl-describe-all.log\nkubectl-pods-with-nodes.log\nkubectl-get-events-kube-system.log\nkubectl-get-all-kube-system.log\nkubectl-describe-all-kube-system.log\nkail-output.log\n")
189+
mapfile -t artifacts < <(printf "kubectl-get-logs.log\nkubectl-get-logs-previous.log\nkubectl-get-events.log\nkubectl-get-all.log\nkubectl-describe-all.log\nkubectl-pods-with-nodes.log\nkubectl-get-logs-environment.log\nkubectl-get-logs-previous-environment.log\nkubectl-get-events-environment.log\nkubectl-get-all-environment.log\nkubectl-describe-all-environment.log\nkubectl-pods-with-nodes-environment.log\n")
170190
artifacts_str=$(IFS=";"; echo "${artifacts[*]}")
171191
buildkite-agent artifact upload "$artifacts_str"
172192
unset artifacts

misc/python/materialize/version_list.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,26 @@ def get_self_managed_versions() -> list[MzVersion]:
6666
return sorted(result)
6767

6868

69+
BAD_SELF_MANAGED_VERSIONS = {
70+
MzVersion.parse_mz("v0.130.0"),
71+
MzVersion.parse_mz("v0.130.1"),
72+
MzVersion.parse_mz("v0.130.2"),
73+
MzVersion.parse_mz("v0.130.3"),
74+
MzVersion.parse_mz("v0.130.4"),
75+
}
76+
77+
78+
def get_all_self_managed_versions() -> list[MzVersion]:
79+
result = set()
80+
for entry in yaml.safe_load(
81+
requests.get("https://materializeinc.github.io/materialize/index.yaml").text
82+
)["entries"]["materialize-operator"]:
83+
version = MzVersion.parse_mz(entry["appVersion"])
84+
if not version.prerelease and version not in BAD_SELF_MANAGED_VERSIONS:
85+
result.add(version)
86+
return sorted(result)
87+
88+
6989
# not released on Docker
7090
INVALID_VERSIONS = {
7191
MzVersion.parse_mz("v0.52.1"),

0 commit comments

Comments
 (0)