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

fix: Fix infinite loop when running Pipeline #8123

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Conversation

silvanocerza
Copy link
Contributor

Related Issues

Proposed Changes:

This changes a bit the internal run logic in two ways:

Components that have variadic input and not greedy will be put in the waiting_queue when outputs are distributed, previously they would have been put in the run_queue. This will prevent them from running before they're supposed to.

It also changes which Components we remove from the run_queue and waiting_queue when a Component produces only parts of its output, like the ConditionalRouter. Now we remove from the queues Components that directly would have received that output, but also their descendants. This prevents the Pipeline to get stuck in a loop waiting for inputs for Components that will never receive it.

How did you test it?

I added a new Pipeline in the behavioural tests similar to the one reported in the above issue and updated another test.

Notes for the reviewer

N/A

Checklist

@silvanocerza silvanocerza self-assigned this Jul 30, 2024
@silvanocerza silvanocerza requested a review from a team as a code owner July 30, 2024 10:14
@silvanocerza silvanocerza requested review from julian-risch and removed request for a team and julian-risch July 30, 2024 10:14
@silvanocerza silvanocerza requested a review from a team as a code owner July 30, 2024 10:14
@silvanocerza silvanocerza requested review from dfokina and removed request for a team July 30, 2024 10:14
@coveralls
Copy link
Collaborator

coveralls commented Jul 30, 2024

Pull Request Test Coverage Report for Build 10160706977

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.007%) to 90.052%

Files with Coverage Reduction New Missed Lines %
core/pipeline/base.py 3 92.46%
Totals Coverage Status
Change from base Build 10159517084: -0.007%
Covered Lines: 6816
Relevant Lines: 7569

💛 - Coveralls

@HAODONG717
Copy link

I encountered the same problem, and your solution resolved my issue. Thank you very much!

@silvanocerza silvanocerza merged commit c7e29a8 into main Jul 30, 2024
17 checks passed
@silvanocerza silvanocerza deleted the fix-run-loop branch July 30, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eternal loop when optionally branching with join component
4 participants