Skip to content

Commit

Permalink
fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Oct 26, 2023
1 parent 0a4289d commit 979144a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pipeline/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ func BuildRequestDetails(
return nil, nil, err
}

graph, err := manifest.NewModuleGraph(request.Modules.Modules)
if err != nil {
return nil, nil, status.Errorf(grpccodes.InvalidArgument, "invalid modules: %s", err.Error())
}
moduleHasStatefulDependencies := true
if req.Modules != nil { // because of tests which do not define modules in the request. too annoying to add this to tests for now. (TODO)
graph, err := manifest.NewModuleGraph(request.Modules.Modules)
if err != nil {
return nil, nil, status.Errorf(grpccodes.InvalidArgument, "invalid modules: %s", err.Error())
}

moduleHasStatefulDependencies, err := graph.HasStatefulDependencies(request.OutputModule)
if err != nil {
return nil, nil, status.Errorf(grpccodes.InvalidArgument, "invalid output module: %s", err.Error())
moduleHasStatefulDependencies, err = graph.HasStatefulDependencies(request.OutputModule)
if err != nil {
return nil, nil, status.Errorf(grpccodes.InvalidArgument, "invalid output module: %s", err.Error())
}
}

linearHandoff, err := computeLinearHandoffBlockNum(request.ProductionMode, req.ResolvedStartBlockNum, request.StopBlockNum, getRecentFinalBlock, moduleHasStatefulDependencies)
Expand Down

0 comments on commit 979144a

Please sign in to comment.