Skip to content

Commit

Permalink
Pass CustomInfo metadata through ArrayNode ExternalResourceInfo (#591) (
Browse files Browse the repository at this point in the history
#6116)

* Pass Actor metadata through ArrayNode ExternalResourceInfo (#591)

* pass CustomInfo through ArrayNode event recorder

Signed-off-by: Daniel Rammer <[email protected]>

* actually doing it

Signed-off-by: Daniel Rammer <[email protected]>

* correctly passing custom

Signed-off-by: Daniel Rammer <[email protected]>

---------

Signed-off-by: Daniel Rammer <[email protected]>

* events -> event

Signed-off-by: Daniel Rammer <[email protected]>

* Run make -C flytepropelelr lint-fix

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
hamersaw and eapolinario authored Dec 19, 2024
1 parent b981363 commit b0062e4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions flytepropeller/pkg/controller/nodes/array/event_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,21 @@ func (e *externalResourcesEventRecorder) process(ctx context.Context, nCtx inter
log.Name = fmt.Sprintf("%s-%d", log.GetName(), index)
}

e.externalResources = append(e.externalResources, &event.ExternalResourceInfo{
externalResourceInfo := event.ExternalResourceInfo{
ExternalId: externalResourceID,
Index: uint32(index), // #nosec G115
Logs: taskExecutionEvent.GetLogs(),
RetryAttempt: retryAttempt,
Phase: taskExecutionEvent.GetPhase(),
CacheStatus: cacheStatus,
})
CustomInfo: taskExecutionEvent.GetCustomInfo(),
}

if taskExecutionEvent.GetMetadata() != nil && len(taskExecutionEvent.GetMetadata().GetExternalResources()) == 1 {
externalResourceInfo.CustomInfo = taskExecutionEvent.GetMetadata().GetExternalResources()[0].GetCustomInfo()
}

e.externalResources = append(e.externalResources, &externalResourceInfo)
}

// clear nodeEvents and taskEvents
Expand Down

0 comments on commit b0062e4

Please sign in to comment.