argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.08k stars 3.2k forks source link

skipped dag node marked configmap error after its child node finishes #13329

Open tczhao opened 4 months ago

tczhao commented 4 months ago

Pre-requisites

What happened/what did you expect to happen?

node A were initially marked skipped as expected and proceed to execute B image

after B completed, A is marked as error due configmap not found. image

this behaviour only happens to dag template. Step template works fine.

We expect if a node is skipped, it shouldn't matter if the parameter refers to an empty configmap

Version(s)

3.5.2

Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

metadata:
  name: a2
spec:
  templates:
    - name: echo2
      container:
        name: ''
        image: alpine:3.7
        command:
          - echo
          - abc
    - name: echo1
      inputs:
        parameters:
          - name: abc
            valueFrom:
              configMapKeyRef:
                name: abc
                key: abc
      container:
        name: ''
        image: alpine:3.7
        command:
          - echo
          - abc
    - name: diamond
      steps:
        - - name: A
            template: echo1
            when: 1 == 0
          - name: B
            template: echo2
            dependencies: [ A ]
  entrypoint: diamond

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

Logs from in your workflow's wait container

kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
tczhao commented 4 months ago

problematic line https://github.com/argoproj/argo-workflows/blob/v3.5.2/workflow/controller/dag.go#L439

Joibel commented 4 months ago

The node.Fulfilled() criteria at https://github.com/argoproj/argo-workflows/blob/5b6ad2be163ecd3f0251a931ab84dba3c6085ad2/workflow/controller/dag.go#L429 feels like somethings in that block shouldn't apply to Skipped nodes.

tooptoop4 commented 1 week ago

where da logs?

have u tried after https://github.com/argoproj/argo-workflows/issues/13547 fix?

similar error in https://github.com/argoproj/argo-workflows/issues/13505