diff --git a/misc/python/materialize/zippy/mz_actions.py b/misc/python/materialize/zippy/mz_actions.py index 782d980e886e8..03389996dab7d 100644 --- a/misc/python/materialize/zippy/mz_actions.py +++ b/misc/python/materialize/zippy/mz_actions.py @@ -8,6 +8,8 @@ # by the Apache License, Version 2.0. +import os + from materialize.mzcompose.composition import Composition from materialize.mzcompose.services.materialized import ( LEADER_STATUS_HEALTHCHECK, @@ -70,7 +72,21 @@ def __init__( capabilities: Capabilities, additional_system_parameter_defaults: dict[str, str] = {}, ) -> None: - self.additional_system_parameter_defaults = additional_system_parameter_defaults + if additional_system_parameter_defaults: + self.additional_system_parameter_defaults = ( + additional_system_parameter_defaults + ) + else: + self.additional_system_parameter_defaults = {} + system_parameter_default = os.getenv("CI_MZ_SYSTEM_PARAMETER_DEFAULT", "") + if system_parameter_default: + for val in system_parameter_default.split(";"): + x = val.split("=", maxsplit=1) + assert ( + len(x) == 2 + ), f"CI_MZ_SYSTEM_PARAMETER_DEFAULT '{val}' should be the format =" + self.additional_system_parameter_defaults[x[0]] = x[1] + super().__init__(capabilities) def run(self, c: Composition, state: State) -> None: diff --git a/test/zippy/mzcompose.py b/test/zippy/mzcompose.py index 70f4efdd6736d..23a5f7e434e6e 100644 --- a/test/zippy/mzcompose.py +++ b/test/zippy/mzcompose.py @@ -13,6 +13,7 @@ expected state it can verify results for correctness. """ +import os import random import re import time @@ -177,14 +178,6 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: help="Start Prometheus and Grafana", ) - parser.add_argument( - "--system-param", - type=str, - action="append", - nargs="*", - help="System parameters to set in Materialize, i.e. what you would set with `ALTER SYSTEM SET`", - ) - parser.add_argument( "--azurite", action="store_true", help="Use Azurite as blob store instead of S3" ) @@ -215,10 +208,14 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: random.seed(args.seed) additional_system_parameter_defaults = {} - for val in args.system_param or []: - x = val[0].split("=", maxsplit=1) - assert len(x) == 2, f"--system-param '{val}' should be the format =" - additional_system_parameter_defaults[x[0]] = x[1] + system_parameter_default = os.getenv("CI_MZ_SYSTEM_PARAMETER_DEFAULT", "") + if system_parameter_default: + for val in system_parameter_default.split(";"): + x = val.split("=", maxsplit=1) + assert ( + len(x) == 2 + ), f"CI_MZ_SYSTEM_PARAMETER_DEFAULT '{val}' should be the format =" + additional_system_parameter_defaults[x[0]] = x[1] with c.override( Cockroach(