Closed kylebrandt closed 4 years ago
Looking for issues notes:
buildExecutionOrder
not using a stable sort, since this is a simple A requires B.Ah, when the data pipeline is executed it is turned into mathexp.Vars
which is a map and will not have a predictable order:
// execute runs all the command/datasource requests in the pipeline return a
// map of the refId of the of each command
func (dp *DataPipeline) execute(c context.Context) (mathexp.Vars, error) {
vars := make(mathexp.Vars)
for _, node := range *dp {
res, err := node.Execute(c, vars)
if err != nil {
return nil, err
}
vars[node.RefID()] = res
}
return vars, nil
}
And then it gets converted back to slice of dataframes in the service.
In the result, the order of the frames changes so sometimes that tests pass, and sometimes they don't. This is the output of pass vs fail (with some
spew
):Pass:
Fail:
In the failed tests, the order of frames is B then A instead of A then B (by refid).