Skip to content

Commit

Permalink
Pass Actor metadata through ArrayNode ExternalResourceInfo (#591)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
hamersaw committed Dec 18, 2024
1 parent 3c03cff commit 56c3771
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 := events.ExternalResourceInfo{

Check failure on line 139 in flytepropeller/pkg/controller/nodes/array/event_recorder.go

View workflow job for this annotation

GitHub Actions / compile

undefined: events
ExternalId: externalResourceID,
Index: uint32(index), // #nosec G115
Logs: taskExecutionEvent.GetLogs(),
RetryAttempt: retryAttempt,
Phase: taskExecutionEvent.GetPhase(),
CacheStatus: cacheStatus,
})
CustomInfo: taskExecutionEvent.CustomInfo,
}

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

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

// clear nodeEvents and taskEvents
Expand Down

0 comments on commit 56c3771

Please sign in to comment.