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

Event based Resume the suspended Workflow (EventTemplate) #3443

Closed
sarabala1979 opened this issue Jul 10, 2020 · 4 comments
Closed

Event based Resume the suspended Workflow (EventTemplate) #3443

sarabala1979 opened this issue Jul 10, 2020 · 4 comments
Labels
area/suspend-resume Suspending and resuming workflows type/feature Feature request

Comments

@sarabala1979
Copy link
Member

sarabala1979 commented Jul 10, 2020

Summary

The workflow needs to be suspended and wait for the event to resume it. This is very similar to suspendtemplate which is currently suspending workflow, so it can be resumed based on the manual intervention or duration.

Please give examples of your use case, e.g. when would you use this.

Proposal

The event template needs to support multiple event sources.

  1. Kafka
  2. Kubernetes Event
  3. SQS
  4. SNS

Sample template format

- name: eventTmpl
    event:
      source:
        kafka:
          url: kafka.argo-events:9092
          topic: topic-2
          partition: "1"
      condition:
         jsonExpression: ".event.source.type == resume"

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@sarabala1979 sarabala1979 added the type/feature Feature request label Jul 10, 2020
@sarabala1979
Copy link
Member Author

sarabala1979 commented Jul 10, 2020

Sample Workflow

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: event-template-
spec:
  entrypoint: event
  templates:
  - name: event
    steps:
    - - name: build
        template: whalesay
    - - name: event
        template: eventTmpl
    - - name: release
        template: whalesay

  - name: eventTmpl
      event:
        source:
          kafka:
            url: kafka.argo-events:9092
            topic: topic-2
            partition: "1"
        condition:
          jsonExpression: ".event.source.type == resume"
          
  - name: whalesay
    container:
      image: docker/whalesay
      command: [cowsay]
      args: ["hello world"]

@zachaller
Copy link
Contributor

Not sure of the plans to work more closely with say argo-events, but if argo-workflows just supported a lower common denominator like http, argo workflows then could use argo events to do all the other integrations like kafka, sqs etc. I do like this feature and think we could use it a well.

@alexec
Copy link
Contributor

alexec commented Jul 10, 2020

@alexec is demoing web hook events at community meeting and that might solve this use case.

@alexec alexec added the area/suspend-resume Suspending and resuming workflows label Feb 7, 2022
@agilgur5
Copy link
Member

but if argo-workflows just supported a lower common denominator like http

This exactly is possible with the API these days, such as with argo suspend and Intermediate Inputs.

I'm not sure how long that has been possible for to reference.

@alexec is demoing web hook events at community meeting and that might solve this use case.

Webhooks also have a page these days as have a few other similar approaches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/suspend-resume Suspending and resuming workflows type/feature Feature request
Projects
None yet
Development

No branches or pull requests

4 participants