WIP: rework taskgraph generation not as a generator #887
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.
I've been looking into the possibility of downloading artifacts from decision tasks to use in place of generating tasks locally. The approach I've been looking at so far is to add the ability to prepopulate a
TaskGraphGeneratorwith those outputs, which allows me to avoid the need to adjust tools (like tryselect) to learn how to find tasks in multiple ways.One thing I discovered while prototyping, is that the current
TaskGraphGenerator._runmakes it impossible to do reasonably, because you can't call different sections of it independently (eg: you can't just have the target task logic run...you have to rerun everything before that as well).I put together a patch to rework this, and I'm interested in thoughts on it. The patch itself it mostly moving code around. The most notable part is that there is no central flow of control as there is now. This doesn't change anything for callers, but it does make it a bit less legible. This could possibly be worked around by adding an
all()method that captures the order in which everything happens, but I'm not sure it would even help that much.