@@ -22,10 +22,10 @@ func WorkflowSendEvent(ctx context.Context, db gorp.SqlExecutor, store cache.Sto
2222 }
2323 for _ , wnr := range report .Nodes () {
2424 wr , errWR := workflow .LoadRunByID (db , wnr .WorkflowRunID , workflow.LoadRunOptions {
25- WithLightTests : true ,
25+ DisableDetailledNodeRun : true ,
2626 })
2727 if errWR != nil {
28- log .Warning (ctx , "WorkflowSendEvent > Cannot load workflow run %d: %s" , wnr .WorkflowRunID , errWR )
28+ log .Warning (ctx , "workflowSendEvent > Cannot load workflow run %d: %s" , wnr .WorkflowRunID , errWR )
2929 continue
3030 }
3131
@@ -36,11 +36,19 @@ func WorkflowSendEvent(ctx context.Context, db gorp.SqlExecutor, store cache.Sto
3636 var errN error
3737 previousNodeRun , errN = workflow .PreviousNodeRun (db , wnr , wnr .WorkflowNodeName , wr .WorkflowID )
3838 if errN != nil {
39- log .Warning (ctx , "WorkflowSendEvent > Cannot load previous node run: %s " , errN )
39+ log .Warning (ctx , "workflowSendEvent > Cannot load previous node run: %v " , errN )
4040 }
4141 }
4242
43- event .PublishWorkflowNodeRun (ctx , db , store , wnr , wr .Workflow , & previousNodeRun )
43+ nr , err := workflow .LoadNodeRunByID (db , wnr .ID , workflow.LoadRunOptions {
44+ DisableDetailledNodeRun : true ,
45+ })
46+ if err != nil {
47+ log .Warning (ctx , "workflowSendEvent > Cannot load workflow node run: %v" , err )
48+ continue
49+ }
50+
51+ event .PublishWorkflowNodeRun (ctx , db , store , * nr , wr .Workflow , & previousNodeRun )
4452 e := & workflow.VCSEventMessenger {}
4553 if err := e .SendVCSEvent (ctx , db , store , proj , * wr , wnr ); err != nil {
4654 log .Warning (ctx , "WorkflowSendEvent> Cannot send vcs notification" )
@@ -50,14 +58,14 @@ func WorkflowSendEvent(ctx context.Context, db gorp.SqlExecutor, store cache.Sto
5058 for _ , jobrun := range report .Jobs () {
5159 noderun , err := workflow .LoadNodeRunByID (db , jobrun .WorkflowNodeRunID , workflow.LoadRunOptions {})
5260 if err != nil {
53- log .Warning (ctx , "WorkflowSendEvent > Cannot load workflow node run %d: %s" , jobrun .WorkflowNodeRunID , err )
61+ log .Warning (ctx , "workflowSendEvent > Cannot load workflow node run %d: %s" , jobrun .WorkflowNodeRunID , err )
5462 continue
5563 }
5664 wr , errWR := workflow .LoadRunByID (db , noderun .WorkflowRunID , workflow.LoadRunOptions {
5765 WithLightTests : true ,
5866 })
5967 if errWR != nil {
60- log .Warning (ctx , "WorkflowSendEvent > Cannot load workflow run %d: %s" , noderun .WorkflowRunID , errWR )
68+ log .Warning (ctx , "workflowSendEvent > Cannot load workflow run %d: %s" , noderun .WorkflowRunID , errWR )
6169 continue
6270 }
6371 event .PublishWorkflowNodeJobRun (ctx , db , proj .Key , * wr , jobrun )
0 commit comments