Skip to content

Xtrigger OR doesn't fail validation #6771

@wxtim

Description

@wxtim

Reference to Discourse

Description

Using xtriggers in a logical "or" (i.e. @xtriggerA | @xtriggerB) will not work. It will be treated as an "and". However this structure passes validation.

Reproducible Example

# Test added to tests/integration/test_config.py
def test_xtrig_or_fails_validation(
    flow: "Fixture",
    validate: "Fixture",
):
    id_ = flow(
        {
            "scheduling": {
                "initial cycle point": "2024",
                "xtriggers": {
                    "xrandom": "xrandom(100)",
                    "echo": "echo(succeed=True)"
                },
                "graph": {"R1": "@xrandom | @echo => foo"},
            }
        }
    )
    expected_msg = "'|', 'or' operator, is not supported in xtriggers."
    with pytest.raises(XtriggerConfigError, match=expected_msg):
        validate(id_)

Metadata

Metadata

Labels

bugSomething is wrong :(small

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions