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

io.kestra.plugin.core.flow.WaitFor: incorrect behaviour when using output of previous task #4092

Closed
lburja opened this issue Jun 21, 2024 · 0 comments · Fixed by #4421
Closed
Assignees
Labels
bug Something isn't working

Comments

@lburja
Copy link

lburja commented Jun 21, 2024

Describe the issue

Given the following flow:

id: waitFor-bug
namespace: playground

tasks:
  - id: loop
    type: io.kestra.plugin.core.flow.WaitFor
    condition: "{{ outputs.produce.value == '3' }}"
    tasks:
      - id: produce
        type: io.kestra.plugin.core.debug.Return
        format: "{{ outputs.loop.iterationCount  }}"
        
      - id: consume
        type: io.kestra.plugin.core.log.Log
        message: "{{ outputs.produce.value }}"

I would expect that the 'produce' task will produce 1, 2, 3 and the 'consume' task will log 1, 2 3.
In reality, the 'consume' task will log 1, 1, 2.

The practical example that I have is to invoke in a loop an API that supports pagination, and insert each page of results in the database. Due to the bug above, the first page is inserted twice and the last one is missing.

Here is a screenshot:
image

Environment

  • Kestra Version: 0.17.4
  • Operating System (OS/Docker/Kubernetes): Kubernetes
  • Java Version (if you don't run kestra in Docker): default
@lburja lburja added the bug Something isn't working label Jun 21, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Jun 21, 2024
@Skraye Skraye added this to the v0.18.0 milestone Jul 22, 2024
@Skraye Skraye moved this from Backlog to In progress in Issues Jul 22, 2024
@anna-geller anna-geller removed this from the v0.18.0 milestone Jul 23, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Issues Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants