You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set up concurrent execution for the steps of a stage, I find that program always execute the last step.
Looking at the source code, I found closure functions used for concurrent execution, which I guess is where the bug came from.
// file stage.go
for _, step := range st.Steps {
step.Status("begin")
g.run(func() *Result {
defer step.Status("end")
//disables strict mode. g.run will wait for all steps to finish
if st.DisableStrictMode {
return step.Exec(request)
}
fmt.Println(step.getCtx().index, step.getCtx().name)
resultChan := make(chan *Result, 1)