Skip to content

Avoid activity dependencies across different discriminators #60

Description

@paullatzelsperger

When creating orchestration definitions (using an OrchestrationTemplate), we should prevent activities expressing dependencies across discriminators.

Valid example: here, all dependencies are within the same discriminator (cfm.orchestration.vpa.dispose)

"activities": {
    "cfm.orchestration.vpa.dispose": [
        {
            "id": "offboarding-agent",
            "type": "onboarding-activity",
            "dependsOn": []
        },
        {
            "id": "kc-client-remover",
            "type": "keycloak-activity",
            "dependsOn": ["offboarding-agent"]
        },
    "cfm.orchestration.vpa.deploy": [{}]
    ]
}

In an invalid structure, activities express dependencies across discriminator bounds:

"activities": {
    "cfm.orchestration.vpa.dispose": [
        {
            "id": "offboarding-agent",
            "type": "onboarding-activity",
            "dependsOn": []
        }
    ],
    "cfm.orchestration.vpa.deploy": [{
         "id": "kc-client-creator",
         "type": "keycloak-activity",
         "dependsOn": ["offboarding-agent"]
    }]
}

invalid OrchestrationTemplates should be rejected with a HTTP 400.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions