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

[BUG] Nested Dynamic Block Reduced Output Downstream Block Executed Multiple Times #5058

Open
FaisalDoowii opened this issue May 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FaisalDoowii
Copy link

FaisalDoowii commented May 11, 2024

Mage version

0.9.70

Describe the bug

when I set dynamic child as a dynamic block (let's call it nested dynamic block), then I set the downstream block of this nested dynamic block to reduced output, the next downstream block were executed multiple times, I think the number of execution is the same as the max number of child of the nested dynamic block. To avoid this, I create an intermediary dummy block that only accept the reduced output and return it immediately. After that, I set the actual downstream block as the downstream block of the intermediary dummy block. This way the intermediary block is executed multiple times while the actual downstream blocks are only executed once.

To reproduce

  1. Create new pipeline
  2. Create a new block A on the pipeline, set it as dynamic block and make sure the output is more than one element to ensure the bug reproduced.
  3. Create a new block B as the child of block A, set it as dynamic block and make sure the output is more than one element to ensure the bug reproduced.
  4. Create a new block C as the child of block B, set it as reduced output and make sure it has an output
  5. Create a new block D as the child of block C. This block will be executed depends on the number of max child of block B

A (Dynamic) --> B (Dynamic, Dynamic Child) --> C (Reduced Output, Dynamic Child) --> D (this is executed multiple times)

Expected behavior

Block D should only be executed once.

Screenshots

No response

Operating system

No response

Additional context

Slack Thread

@FaisalDoowii FaisalDoowii added the bug Something isn't working label May 11, 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
None yet
Development

No branches or pull requests

1 participant