Skip to content

Commit b0062e4

Browse files
Pass CustomInfo metadata through ArrayNode ExternalResourceInfo (#591) (#6116)
* Pass Actor metadata through ArrayNode ExternalResourceInfo (#591) * pass CustomInfo through ArrayNode event recorder Signed-off-by: Daniel Rammer <hamersaw@protonmail.com> * actually doing it Signed-off-by: Daniel Rammer <hamersaw@protonmail.com> * correctly passing custom Signed-off-by: Daniel Rammer <hamersaw@protonmail.com> --------- Signed-off-by: Daniel Rammer <hamersaw@protonmail.com> * events -> event Signed-off-by: Daniel Rammer <hamersaw@protonmail.com> * Run make -C flytepropelelr lint-fix Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> --------- Signed-off-by: Daniel Rammer <hamersaw@protonmail.com> Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> Co-authored-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
1 parent b981363 commit b0062e4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

flytepropeller/pkg/controller/nodes/array/event_recorder.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,21 @@ func (e *externalResourcesEventRecorder) process(ctx context.Context, nCtx inter
136136
log.Name = fmt.Sprintf("%s-%d", log.GetName(), index)
137137
}
138138

139-
e.externalResources = append(e.externalResources, &event.ExternalResourceInfo{
139+
externalResourceInfo := event.ExternalResourceInfo{
140140
ExternalId: externalResourceID,
141141
Index: uint32(index), // #nosec G115
142142
Logs: taskExecutionEvent.GetLogs(),
143143
RetryAttempt: retryAttempt,
144144
Phase: taskExecutionEvent.GetPhase(),
145145
CacheStatus: cacheStatus,
146-
})
146+
CustomInfo: taskExecutionEvent.GetCustomInfo(),
147+
}
148+
149+
if taskExecutionEvent.GetMetadata() != nil && len(taskExecutionEvent.GetMetadata().GetExternalResources()) == 1 {
150+
externalResourceInfo.CustomInfo = taskExecutionEvent.GetMetadata().GetExternalResources()[0].GetCustomInfo()
151+
}
152+
153+
e.externalResources = append(e.externalResources, &externalResourceInfo)
147154
}
148155

149156
// clear nodeEvents and taskEvents

0 commit comments

Comments
 (0)