Test the consistency with another mz version.
(c: Composition, parser: WorkflowArgumentParser)
| 45 | |
| 46 | |
| 47 | def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: |
| 48 | """ |
| 49 | Test the consistency with another mz version. |
| 50 | """ |
| 51 | |
| 52 | c.down(destroy_volumes=True) |
| 53 | |
| 54 | test = FeatureFlagConsistencyTest() |
| 55 | |
| 56 | parser.add_argument("--configuration", action="append", default=[], type=str) |
| 57 | |
| 58 | parser.add_argument( |
| 59 | "--evaluation-strategy", |
| 60 | default=EVALUATION_STRATEGY_NAME_DFR, |
| 61 | type=str, |
| 62 | choices=INTERNAL_EVALUATION_STRATEGY_NAMES, |
| 63 | ) |
| 64 | |
| 65 | parser.add_argument( |
| 66 | "--other-tag", |
| 67 | type=str, |
| 68 | default="common-ancestor", |
| 69 | ) |
| 70 | |
| 71 | parser.add_argument( |
| 72 | "--query-output-mode", |
| 73 | type=lambda mode: QueryOutputMode[mode.upper()], |
| 74 | choices=QUERY_OUTPUT_MODE_CHOICES, |
| 75 | default=QueryOutputMode.SELECT, |
| 76 | ) |
| 77 | |
| 78 | args = test.parse_output_consistency_input_args(parser) |
| 79 | |
| 80 | port_mz_default_internal, port_mz_system_internal = 6875, 6877 |
| 81 | port_mz_default_this, port_mz_system_this = 6875, 6877 |
| 82 | port_mz_default_other, port_mz_system_other = 16875, 16877 |
| 83 | |
| 84 | configurations = args.configuration |
| 85 | |
| 86 | if len(configurations) == 0: |
| 87 | configurations = FEATURE_FLAG_CONFIGURATION_PAIRS.keys() |
| 88 | |
| 89 | runtime_per_config_in_sec = args.max_runtime_in_sec / len(configurations) |
| 90 | |
| 91 | test_summaries = [] |
| 92 | |
| 93 | for configuration in configurations: |
| 94 | test.set_configuration_pair_by_name(configuration) |
| 95 | assert test.flag_configuration_pair is not None |
| 96 | print(f"Running flag configuration: {test.flag_configuration_pair.name}") |
| 97 | |
| 98 | with c.override( |
| 99 | Materialized( |
| 100 | name="mz_this", |
| 101 | ports=[ |
| 102 | f"{port_mz_default_this}:{port_mz_default_internal}", |
| 103 | f"{port_mz_system_this}:{port_mz_system_internal}", |
| 104 | ], |
nothing calls this directly
no test coverage detected