Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fail to apply the promise if there are duplicated container names within a workflow #114

Open
kirederik opened this issue Apr 30, 2024 · 0 comments
Labels
debuggability Tickets that are focussed on making the debugging & building of promises easier enhancement New feature or request

Comments

@kirederik
Copy link
Member

kirederik commented Apr 30, 2024

A promise cannot contain workflows with duplicated container names, like in the example below:

apiVersion: platform.kratix.io/v1alpha1
kind: Promise
metadata:
  name: jenkins
spec:
  api: # crd
  # any other fields
  workflows:
    resource: # or promise:
      configure: # or delete
      - apiVersion: platform.kratix.io/v1alpha1
        kind: Pipeline
        metadata:
          name: pipeline-1
        spec:
          containers:
          - image: ghcr.io/syntasso/kratix-marketplace/a-configure-pipeline:v0.1.0
            name: configure-pipeline # <<<< duplicated
          - image: ghcr.io/syntasso/kratix-marketplace/b-configure-pipeline:v0.1.0
            name: configure-pipeline # <<<< duplicated
      - apiVersion: platform.kratix.io/v1alpha1
        kind: Pipeline
        metadata:
          name: pipeline-2
        spec:
          containers:
          - image: ghcr.io/syntasso/kratix-marketplace/b-configure-pipeline:v0.1.0
            name: configure-pipeline

However, when the user applies this promise, they receive no immediate feedback.

A better experience would be to fail the apply, and output a message with the reason for the error.

@kirederik kirederik added the enhancement New feature or request label Apr 30, 2024
@catmo-syntasso catmo-syntasso added the debuggability Tickets that are focussed on making the debugging & building of promises easier label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debuggability Tickets that are focussed on making the debugging & building of promises easier enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants