Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions flyteidl2/workflow/run_definition.proto
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,44 @@ message ActionAttempt {

// Cache metadata for this attempt, set only for cache hits.
common.CacheMetadata cache_metadata = 14;

// Information about the node instance this attempt's pod ran on. Taken from the
// last event carrying a populated instance_info; may be absent (e.g. never
// scheduled, cache hit, or multi-pod plugin actions which are not yet supported).
InstanceInfo instance_info = 15;
}

// InstanceInfo describes the cloud instance (node) an action-attempt's pod was
// scheduled on. Populated by the executor from the node's well-known labels;
// fields are best-effort and may be individually empty.
message InstanceInfo {
// Cloud instance type, from the node's "node.kubernetes.io/instance-type"
// label, e.g. "p4d.24xlarge".
string instance_type = 1;

// Cloud provider instance ID parsed from the node's spec.providerID,
// e.g. "i-0abc123def456".
string instance_id = 2;

// Accelerator device attached to the node, from the cloud accelerator label
// (e.g. "cloud.google.com/gke-accelerator" on GCP). Typically empty on AWS,
// where the instance type alone identifies the GPU.
string accelerator = 3;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Capacity type of the node, normalized to "spot" or "on-demand".
string capacity_type = 4;

// Availability zone, from the node's "topology.kubernetes.io/zone" label.
string zone = 5;

// Name of the node the pod was scheduled on (pod.spec.nodeName). Set as soon
// as scheduling is observed, even if the remaining fields are not resolved yet.
string node_name = 6;

// Escape hatch for additional executor-owned attributes. Keys are controlled
// by the executor (not user data); prefer promoting recurring keys to typed
// fields above.
map<string, string> attributes = 15;
}

message ClusterEvent {
Expand Down Expand Up @@ -442,6 +480,11 @@ message ActionEvent {

// Cache metadata for this event, set only for cache hits.
common.CacheMetadata cache_metadata = 16;

// Information about the node instance this attempt's pod is/was scheduled on.
// Attached by the executor when known; absent on events emitted before
// scheduling and for actions that run no pods.
InstanceInfo instance_info = 17;
}

message ActionSpec {
Expand Down
3 changes: 3 additions & 0 deletions flyteplugins/go/tasks/pluginmachinery/core/phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ type TaskInfo struct {
ExternalResources []*ExternalResource
// Additional reasons for this case. Note, these are not included in the phase state.
AdditionalReasons []ReasonInfo
// Name of the node the task's (primary) pod was scheduled on, when known.
// Only populated by single-pod execution paths; empty for multi-pod plugins.
NodeName string
}

func (t *TaskInfo) String() string {
Expand Down
Loading
Loading