feat: choose worker recipes by depth level #950
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In an attempt to try a more efficient process for doing bulk builds, I added an option
--subdag-depth
(int, default: None) that will only assign recipes with a certain dependency depth to the bulk workers. Only nodes of a certain depth will be built (i.e., 0: only root nodes, 1: only nodes with parents that are root nodes, etc.). The idea is to allow someone to build all recipes that have no dependencies in the DAG, then remove those from the DAG and build the new "root" recipes. The existing behavior will still work if--subdag-depth
is not included.Currently, manual intervention is needed to do the Bioconductor bulk update because the recipes are assigned unevenly to the workers and some child nodes are dependent on recipes being built on a different worker. This new approach also requires manual intervention to increment
--subdag-depth
after the previous depth level is done building, but hopefully will result in fewer failures from the chain of dependencies and less time spent with one worker building while the rest sit idle.Example of the behavior without (left) and with (right)
--subdag-depth
:Tested on https://github.com/bioconda/bioconda-recipes/tree/bulk-performance-testing branch (action: https://github.com/bioconda/bioconda-recipes/actions/workflows/Bulk.yml).