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

OnExit Handler for Workflow Template #1688

Closed
naiduasn opened this issue Oct 17, 2019 · 2 comments · Fixed by #1716
Closed

OnExit Handler for Workflow Template #1688

naiduasn opened this issue Oct 17, 2019 · 2 comments · Fixed by #1716
Assignees
Labels
type/feature Feature request
Milestone

Comments

@naiduasn
Copy link

naiduasn commented Oct 17, 2019

Is this a BUG REPORT or FEATURE REQUEST?:
Feature Request

What happened:
I want to get a notification for every stage and every stage is now a workflow template for me. I defined exit handlers in workflow template but those are not getting executed.
What you expected to happen:
i expected onExit handler to work even for workflow template

How to reproduce it (as minimally and precisely as possible):

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: workflow-template-stage-template-with-exit
spec:
  entrypoint: stage-template-with-exit
  onExit: exit-stepper
  templates:
  - name: stage-template-with-exit
    inputs:
      parameters:
      - name: message
    container:
      image: docker/whalesay
      command: [cowsay]
      args: ["{{inputs.parameters.message}}"]
  - name: exit-stepper
    steps:
    - - name: celebrate
        template: celebrate
      - name: cry
        template: cry
  - name: celebrate
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["echo hooray!"]
  - name: cry
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["echo boohoo!"]

Anything else we need to know?:

Environment:

  • Argo version:
argo: v2.4.1
  BuildDate: 2019-10-08T23:15:27Z
  GitCommit: d7f099992d8cf93c280df2ed38a0b9a1b2614e56
  GitTreeState: clean
  GitTag: v2.4.1
  GoVersion: go1.11.5
  Compiler: gc
  Platform: darwin/amd64
  • Kubernetes version :
clientVersion:
  buildDate: "2019-06-20T04:52:26Z"
  compiler: gc
  gitCommit: e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529
  gitTreeState: clean
  gitVersion: v1.15.0
  goVersion: go1.12.6
  major: "1"
  minor: "15"
  platform: darwin/amd64
serverVersion:
  buildDate: "2019-06-19T16:32:14Z"
  compiler: gc
  gitCommit: e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529
  gitTreeState: clean
  gitVersion: v1.15.0
  goVersion: go1.12.5
  major: "1"
  minor: "15"
  platform: linux/amd64

Other debugging information (if applicable):

  • workflow result:
$ argo get <workflowname>
  • executor logs:
$ kubectl logs <failedpodname> -c init
$ kubectl logs <failedpodname> -c wait
  • workflow-controller logs:
time="2019-10-17T06:12:48Z" level=info msg="Creating a docker executor"

time="2019-10-17T06:12:48Z" level=info msg="Executor (version: v2.4.1, build_date: 2019-10-08T23:14:37Z) initialized (pod: default/workflow-template-stage-dmhw2) with template:\n{\"name\":\"stage\",\"arguments\":{},\"inputs\":{\"parameters\":[{\"name\":\"message\",\"value\":\"hello world\"}]},\"outputs\":{},\"metadata\":{},\"container\":{\"name\":\"\",\"image\":\"docker/whalesay\",\"command\":[\"cowsay\"],\"args\":[\"hello world\"],\"resources\":{}}}"

time="2019-10-17T06:12:48Z" level=info msg="Waiting on main container"

time="2019-10-17T06:12:53Z" level=info msg="main container started with container ID: f3d0b26ecc6033526b98412a564086c921bbad4ad5837621b015d3e65979884b"

time="2019-10-17T06:12:53Z" level=info msg="Starting annotations monitor"

time="2019-10-17T06:12:53Z" level=info msg="docker wait f3d0b26ecc6033526b98412a564086c921bbad4ad5837621b015d3e65979884b"

time="2019-10-17T06:12:53Z" level=info msg="Starting deadline monitor"

time="2019-10-17T06:12:53Z" level=info msg="Main container completed"

time="2019-10-17T06:12:53Z" level=info msg="No output parameters"

time="2019-10-17T06:12:53Z" level=info msg="No output artifacts"

time="2019-10-17T06:12:53Z" level=info msg="Killing sidecars"

time="2019-10-17T06:12:53Z" level=info msg="Annotations monitor stopped"

time="2019-10-17T06:12:53Z" level=info msg="No Script output reference in workflow. Capturing script output ignored"

time="2019-10-17T06:12:53Z" level=info msg="Alloc=4820 TotalAlloc=11390 Sys=70078 NumGC=4 Goroutines=9"
@simster7 simster7 added the type/feature Feature request label Oct 21, 2019
@simster7 simster7 self-assigned this Oct 23, 2019
@simster7 simster7 added this to the v2.5 milestone Oct 28, 2019
@simster7 simster7 pinned this issue Oct 28, 2019
@simster7 simster7 unpinned this issue Oct 28, 2019
@mosfet1kg
Copy link

It seems OnExit Handler for Workflow Template still doesn't work.

Is there anyone who knows whether it works or not?

@alexec alexec reopened this Sep 4, 2020
@alexec
Copy link
Contributor

alexec commented Sep 4, 2020

@mosfet1kg I think this has been recently fixed. Are you running the latest version v2.10.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants