Skip to content

Commit

Permalink
plumbing through deckURI
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rammer <[email protected]>
  • Loading branch information
hamersaw committed Nov 28, 2024
1 parent 5b29bbe commit 5964cc1
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 5 deletions.
3 changes: 3 additions & 0 deletions flyteadmin/pkg/repositories/transformers/task_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ func mergeExternalResource(existing, latest *event.ExternalResourceInfo) *event.
existing.CacheStatus = latest.GetCacheStatus()
}
existing.Logs = mergeLogs(existing.GetLogs(), latest.GetLogs())
if latest.GetDeckUri() != "" && existing.GetDeckUri() != latest.GetDeckUri() {
existing.DeckUri = latest.GetDeckUri()
}

Check warning on line 314 in flyteadmin/pkg/repositories/transformers/task_execution.go

View check run for this annotation

Codecov / codecov/patch

flyteadmin/pkg/repositories/transformers/task_execution.go#L313-L314

Added lines #L313 - L314 were not covered by tests

return existing
}
Expand Down
3 changes: 2 additions & 1 deletion flyteidl/gen/pb-es/flyteidl/event/event_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flyteidl/gen/pb-go/flyteidl/event/event.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flyteidl/gen/pb_rust/flyteidl.event.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flyteidl/protos/flyteidl/event/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ message ExternalResourceInfo {
// log information for the external resource execution
repeated core.TaskLog logs = 6;

// TODO @hamersaw - docs
// String location uniquely identifying where the deck HTML file is
// NativeUrl specifies the url in the format of the configured storage provider (e.g. s3://my-bucket/randomstring/suffix.tar)
string deck_uri = 7;
}

Expand Down
7 changes: 7 additions & 0 deletions flytepropeller/pkg/controller/nodes/array/event_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,18 @@ func (e *externalResourcesEventRecorder) process(ctx context.Context, nCtx inter

// process events
cacheStatus := idlcore.CatalogCacheStatus_CACHE_DISABLED
var deckURI string
for _, nodeExecutionEvent := range e.nodeEvents {
switch target := nodeExecutionEvent.GetTargetMetadata().(type) {
case *event.NodeExecutionEvent_TaskNodeMetadata:
if target.TaskNodeMetadata != nil {
cacheStatus = target.TaskNodeMetadata.GetCacheStatus()
}
}

if len(nodeExecutionEvent.DeckUri) > 0 {
deckURI = nodeExecutionEvent.DeckUri
}

Check warning on line 106 in flytepropeller/pkg/controller/nodes/array/event_recorder.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/nodes/array/event_recorder.go#L105-L106

Added lines #L105 - L106 were not covered by tests
}

// fastcache will not emit task events for cache hits. we need to manually detect a
Expand All @@ -110,6 +115,7 @@ func (e *externalResourcesEventRecorder) process(ctx context.Context, nCtx inter
RetryAttempt: retryAttempt,
Phase: idlcore.TaskExecution_SUCCEEDED,
CacheStatus: cacheStatus,
DeckUri: deckURI,

Check warning on line 118 in flytepropeller/pkg/controller/nodes/array/event_recorder.go

View check run for this annotation

Codecov / codecov/patch

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

Added line #L118 was not covered by tests
})
}

Expand Down Expand Up @@ -143,6 +149,7 @@ func (e *externalResourcesEventRecorder) process(ctx context.Context, nCtx inter
RetryAttempt: retryAttempt,
Phase: taskExecutionEvent.GetPhase(),
CacheStatus: cacheStatus,
DeckUri: deckURI,
})
}

Expand Down

0 comments on commit 5964cc1

Please sign in to comment.