tanujdua
tanujdua

Reputation: 1

Sequence with Parallel as a step

I have a requirement where I want to run parallel events and once all parallel events are done I want to invoke the final endpoint.

So the way I have configured is a Sequence object with first step as Parallel and the last step as final endpoint.

But I can see final endpoint is not invoked however if I move final endpoint before parallel it works. So can anyone help here please how to implement this workflow

apiVersion: flows.knative.dev/v1
kind: Sequence
metadata:
  name: sequence-with-parallel
spec:
  steps:
    - ref:
        apiVersion: flows.knative.dev/v1
        kind: Parallel
        name: parallel-step
    - ref:
        apiVersion: serving.knative.dev/v1
        kind: Service
        name: final-service
  channelTemplate:
    apiVersion: messaging.knative.dev/v1
    kind: InMemoryChannel

Tried running the above implementation but final endpoint is not being invoked however parallel branches are being invoked correctly

Upvotes: 0

Views: 44

Answers (1)

Leo6Leo
Leo6Leo

Reputation: 25

It sounds like one of your parallel branches may be failing, which could prevent the final endpoint from being invoked. When an event is sent to a channel (in-memory channel) under the hood but a subscription fails to deliver the event, the channel does not receive the necessary reply, causing the branch to hang until it times out.

To diagnose this, I recommend testing with a simpler setup where the branches are guaranteed to succeed. For instance, configure the parallel branches to forward events to basic event-display services. This will help confirm whether the issue lies within the specific branches or the overall parallel configuration.

Hope this helps!

Upvotes: 0

Related Questions