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

Introduce v2 for sub-plans #428

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Conversation

adamruzicka
Copy link
Contributor

@adamruzicka adamruzicka commented Jul 21, 2023

The previous implementation of sub plans API comprised of several modules which could be layered on top of each other. This made the code somewhat hard to follow, not all of the modules worked in all scenarios as some relied on an executor being a single process.

The v2 flattens all the modules into a single one and drastically reduces the amount of possible combinations. Sub plans are spawned in batches and then the parent polls until the sub plans finish.

It also includes support for limitting the number of sub-plans that may be running at a given time, without relying on the throttle limitter and thus should be safe in multi-process environments. Under the hood it dynamically alters the batch size to honor the concurrency limit.

TODO:

  • deprecate the old modules? It is probably still too early for this, let's not be hasty

The previous implementation of sub plans API comprised of several
modules which could be layered on top of each other. This made the code
somewhat hard to follow, not all of the modules worked in all scenarios
as some relied on an executor being a single process.

The v2 flattens all the modules into a single one and drastically
reduces the amount of possible combinations. Sub plans are spawned in
batches and then the parent polls until the sub plans finish.

It also includes support for limitting the number of sub-plans that may
be running at a given time, without relying on the throttle limitter and
thus should be safe in multi-process environments. Under the hood it
dynamically alters the batch size to honor the concurrency limit.
Copy link

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @adamruzicka, let's get this in.

@adamruzicka adamruzicka merged commit 9717656 into Dynflow:master Aug 24, 2023
6 of 7 checks passed
@adamruzicka
Copy link
Contributor Author

Thank you @ofedoren !

@adamruzicka adamruzicka deleted the sub-plans-v2 branch August 24, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants