Skip to content

Commit b29583d

Browse files
committed
Switch to 0dt upgrades
1 parent 0ede59c commit b29583d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

misc/python/materialize/checks/scenarios_upgrade.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
from materialize.checks.actions import Action, Initialize, Manipulate, Sleep, Validate
12+
from materialize.checks.all_checks.password_auth import PasswordAuth
1213
from materialize.checks.checks import Check
1314
from materialize.checks.executors import Executor
1415
from materialize.checks.features import Features
@@ -541,16 +542,18 @@ def base_version(self) -> MzVersion:
541542
def actions(self) -> list[Action]:
542543
print(f"Upgrading from tag {self.base_version()}")
543544

544-
def upgrade_actions(version: MzVersion | None) -> list[Action]:
545+
def upgrade_actions(version: MzVersion | None, generation: int) -> list[Action]:
546+
service_name = f"mz_{generation}"
545547
return [
546-
KillMz(
547-
capture_logs=True
548-
), # We always use True here otherwise docker-compose will lose the pre-upgrade logs
549-
StartMz(
548+
start_mz_read_only(
550549
self,
551550
tag=version,
551+
deploy_generation=generation,
552+
mz_service=service_name,
552553
),
553-
Validate(self),
554+
WaitReadyMz(service_name),
555+
PromoteMz(service_name),
556+
Validate(self, mz_service=service_name),
554557
]
555558

556559
actions = [
@@ -563,7 +566,7 @@ def upgrade_actions(version: MzVersion | None) -> list[Action]:
563566
Manipulate(self, phase=2),
564567
]
565568

566-
for version in self.v25_2_versions[1:] + [None]:
567-
actions.extend(upgrade_actions(version))
569+
for (generation, version) in enumerate(self.v25_2_versions[1:] + [None]):
570+
actions.extend(upgrade_actions(version, generation+1))
568571

569572
return actions

0 commit comments

Comments
 (0)