In order to successfully replay an analysis, we must order Actions such that all dependencies of an Action are satisfied before that Action may be run - beginning with nodes of in-degree 0, and ending with nodes of out-degree 0.
Topological sorts are not by definition unique, so we may get varying sort results as things change. (e.g this python version change -> sort order change). lexical_topological_sort will let us impose a more nuanced ordering, at the cost of a little bit of complexity. This commit from the same issue is the best example I've found to date of what a key function might look like.
How does topological_sort handle disconnected graphs?
Is this implementation working from optimal starting nodes (all nodes with no in-edges)? (If not, we may be running multiple searches, and cost might merit a DIY solution at some point)
In order to successfully replay an analysis, we must order Actions such that all dependencies of an Action are satisfied before that Action may be run - beginning with nodes of in-degree 0, and ending with nodes of out-degree 0.
I think a topological sort will do this for us.
Topological sorts are not by definition unique, so we may get varying sort results as things change. (e.g this python version change -> sort order change).
lexical_topological_sort
will let us impose a more nuanced ordering, at the cost of a little bit of complexity. This commit from the same issue is the best example I've found to date of what a key function might look like.