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

child steps template with outputs breaks execution of the parent steps template #12286

Closed
2 of 3 tasks
ghost opened this issue Nov 29, 2023 · 5 comments
Closed
2 of 3 tasks
Assignees
Labels
area/controller Controller issues, panics solution/duplicate This issue or PR is a duplicate of an existing one type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@ghost
Copy link

ghost commented Nov 29, 2023

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what did you expect to happen?

Okay, so this is a weird one.

If you run the workflow I provided below, you'll see that step1, which is supposed to trigger template t2, never shows up in the UI. The workflow gets marked as successful, and after inspecting the workflow status manually using kubectl, I can see that step1 did get executed, but it is not visible in the UI. This might not be a bug in the UI since the controller could be doing something wrong, and the UI follows along. I don't have enough knowledge about internals to know right away.

This only happens when step0 calls another StepsTemplate that has outputs declared (in this case it is t1). When I remove outputs from t1 it works, the step1 does show up in the UI. If step0 calls t2 it works as well.

Workflow that does not work - step1 never shows up in the UI
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: lifecycle-hook-tmpl-level-
  labels:
    test: test
spec:
  entrypoint: t0
  templates:
    - name: t0
      steps:
        - - name: step0
            template: t1
        - - name: step1
            template: t2
    - name: t1
      outputs:
        parameters:
          - name: dummy
            valueFrom:
              expression: "1"
      steps:
        - - name: step2
            template: t2
    - name: t2
      container:
        image: alpine:3.6
        command: [sh, -c]
        args: ["echo this is t2"]
How the UI looks like case1_doesnt_work
Workflow that does work - step1 shows up in the UI (outputs from t1 are removed)
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: lifecycle-hook-tmpl-level-
  labels:
    test: test
spec:
  entrypoint: t0
  templates:
    - name: t0
      steps:
        - - name: step0
            template: t1
        - - name: step1
            template: t2
    - name: t1
      # outputs:
      #   parameters:
      #     - name: dummy
      #       valueFrom:
      #         expression: "1"
      steps:
        - - name: step2
            template: t2
    - name: t2
      container:
        image: alpine:3.6
        command: [sh, -c]
        args: ["echo this is t2"]
How the UI looks like case2_works

I was getting around this issue #12283 by declaring dummy outputs, but then I noticed the bug I described above.

Version

v3.5.2

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

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: lifecycle-hook-tmpl-level-
  labels:
    test: test
spec:
  entrypoint: t0
  templates:
    - name: t0
      steps:
        - - name: step0
            template: t1
        - - name: step1
            template: t2
    - name: t1
      outputs:
        parameters:
          - name: dummy
            valueFrom:
              expression: "1"
      steps:
        - - name: step2
            template: t2
    - name: t2
      container:
        image: alpine:3.6
        command: [sh, -c]
        args: ["echo this is t2"]

Logs from the workflow controller

-

Logs from in your workflow's wait container

-
@ghost ghost added the type/bug label Nov 29, 2023
@Joibel Joibel added the area/controller Controller issues, panics label Nov 29, 2023
@Joibel
Copy link
Member

Joibel commented Nov 29, 2023

This sounds similar to something I've looked at recently. I'll take a look - thanks for narrowing it down.

@Joibel Joibel self-assigned this Nov 29, 2023
@ghost
Copy link
Author

ghost commented Nov 29, 2023

Awesome, no problem.

@Joibel
Copy link
Member

Joibel commented Dec 1, 2023

I'm pretty sure you've only reproduced this on 3.5.1 and it is fixed on 3.5.2 by #12203.

@ghost
Copy link
Author

ghost commented Dec 1, 2023

Hmm, it's possible I made a mistake when specifying the version, I definitively know the bug was there. I was working in a temporary environment so I can't 100% confirm what version I had checked out. I can confirm that I don't see the bug anymore when building from the main branch. Thanks for taking the time to help, and sorry if this wasted your time.

@ghost ghost closed this as completed Dec 1, 2023
@agilgur5 agilgur5 added the solution/duplicate This issue or PR is a duplicate of an existing one label Dec 1, 2023
@agilgur5
Copy link
Member

agilgur5 commented Dec 1, 2023

For posterity, marking as duplicate of #12165

@agilgur5 agilgur5 added the type/regression Regression from previous behavior (a specific type of bug) label Dec 1, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics solution/duplicate This issue or PR is a duplicate of an existing one type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

No branches or pull requests

2 participants