Skip to content

Commit 0c2e481

Browse files
Merge pull request #33975 from MaterializeInc/push-vvszukxmvvps
don't run validation if modifications cause a failure to reconcile
2 parents c08da0d + 3dc49bb commit 0c2e481

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/orchestratord/mzcompose.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ class LicenseKey(Modification):
200200
@classmethod
201201
def values(cls) -> list[Any]:
202202
# TODO: Add back "del" when https://github.com/MaterializeInc/database-issues/issues/9599 is resolved
203-
# TODO: Add back invalid when it's solved for upgrades
204-
return ["valid"]
203+
return ["valid", "invalid"]
205204

206205
@classmethod
207206
def failed_reconciliation_values(cls) -> list[Any]:
@@ -231,10 +230,6 @@ def validate(self, mods: dict[type[Modification], Any]) -> None:
231230

232231
def check() -> None:
233232
environmentd = get_environmentd_data()
234-
if self.value == "invalid":
235-
assert len(environmentd["items"]) == 0
236-
return
237-
238233
envs = environmentd["items"][0]["spec"]["containers"][0]["env"]
239234
if self.value == "del" or (mods[LicenseKeyCheck] == False):
240235
for env in envs:
@@ -1678,8 +1673,9 @@ def run_scenario(
16781673
if subclass not in mod_dict:
16791674
mod_dict[subclass] = subclass.default()
16801675
try:
1681-
for mod in mods:
1682-
mod.validate(mod_dict)
1676+
if not expect_fail:
1677+
for mod in mods:
1678+
mod.validate(mod_dict)
16831679
except:
16841680
print(
16851681
f"Reproduce with bin/mzcompose --find orchestratord run default --recreate-cluster --scenario='{scenario_json}'"

0 commit comments

Comments
 (0)