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
5 changes: 5 additions & 0 deletions flyteidl2/actions/actions_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ message Action {
// identifies the source action (source run id + action name) whose result was reused.
// never set by clients on enqueue.
flyteidl2.common.ActionIdentifier recovered_from = 10;

// set by the parent's controller when this action's inputs were overridden from
// RunSpec.recover.action_input_overrides. The server rejects an enqueue of an
// overridden action name without this flag (a runtime that cannot apply overrides).
bool input_override_applied = 11;
}

// ============================================================================
Expand Down
29 changes: 29 additions & 0 deletions flyteidl2/task/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,35 @@ message Inputs {
repeated flyteidl2.core.KeyValuePair context = 2;
}

// ActionInputOverridesData is the file referenced by ActionInputOverrides.uri. The
// controller of each overridden action's parent reads that action's override
// inputs from their path, overlays them, by input name, on the inputs it computes
// for that action, and runs that action from its replacement code bundle, if any.
// Every key of either map is also listed in ActionInputOverrides.action_names.
message ActionInputOverridesData {
// Action name in the run being recovered -> URI of a serialized Inputs in the
// data plane holding the inputs that change (partial inputs). Like an action's
// input_uri, the values stay in the data plane and are only read by the parent
// that launches the action.
map<string, string> input_uris = 1;

// Action name in the run being recovered -> the code bundle that action runs
// instead of the one its parent passes down. Only that action, and the actions
// it launches, run the replacement code; the rest of the run keeps its own.
map<string, ActionCodeBundle> code_bundles = 2;
}

// ActionCodeBundle is a code bundle archive (.tar.gz) in the data plane that one
// action of a fork runs in place of its parent's.
message ActionCodeBundle {
// URI of the archive.
string tgz = 1 [(buf.validate.field).string.min_len = 1];

// Version of the archive's contents (for example its MD5 digest), recorded as
// the action's code bundle version.
string version = 2;
}

// Declares that a named output of the producing action is a new artifact
// version. The output's literal (in Outputs.literals) is the artifact's value;
// org/project/domain come from the producing action's scope at registration.
Expand Down
28 changes: 28 additions & 0 deletions flyteidl2/task/run.proto
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,34 @@ message Recover {
// subtree). A listed condition action re-pauses and waits for a new signal.
// Unknown names are ignored.
repeated string force_rerun_actions = 1 [(buf.validate.field).repeated.items.string.min_len = 1];

// Input and code overrides for task actions of the run being recovered. Set by the
// client. Only the action names and the location of the overrides travel in the
// RunSpec; the values and code live in the data plane (see ActionInputOverridesData).
ActionInputOverrides action_input_overrides = 2;

// Ancestors of the actions named in action_input_overrides, up to (excluding) a0.
// Set by the server at run creation and ignored if sent by a client: an ancestor
// must re-execute for the overridden action to be enqueued again.
repeated string implied_rerun_actions = 3;

// Marks this recovery run as a fork: it reuses the run being recovered but runs
// changed code or inputs, rather than retrying it unchanged. Set by the client
// that creates the fork (for example a code-only fork); the server also sets it
// whenever action_input_overrides is present, and clears it on a run that is not
// a recovery. Informational: it does not change how the run is recovered.
bool fork = 4;
}

// ActionInputOverrides names the task actions whose inputs or code a recovery run
// overrides and where the overrides are stored.
message ActionInputOverrides {
// Names of task actions in the run being recovered. Must not include the root
// action a0: root input changes are carried as the run's own inputs.
repeated string action_names = 1 [(buf.validate.field).repeated.items.string.min_len = 1];

// Location of a serialized ActionInputOverridesData in the data plane.
string uri = 2;
}

// TaskSpecSource records how a run's task spec was provided at creation time, so
Expand Down
27 changes: 27 additions & 0 deletions flyteidl2/workflow/run_definition.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@ message RunDetails {

// Detailed information about the root action.
ActionDetails action = 2;

// Status of each action input override in RunSpec.recover.action_input_overrides,
// derived when read. Empty when the run has no overrides.
repeated ActionInputOverrideStatus action_input_override_status = 3;
}

// ActionInputOverrideStatus reports whether one action input override took effect.
message ActionInputOverrideStatus {
enum State {
STATE_UNSPECIFIED = 0;
// The run is active and the action has not been enqueued yet.
STATE_PENDING = 1;
// The action was enqueued with the override applied.
STATE_APPLIED = 2;
// The run is terminal and the action was never enqueued, e.g. a code change or
// an upstream override renamed it or an ancestor.
STATE_UNAPPLIED = 3;
}

// Action name the override targets.
string action_name = 1;

State state = 2;
}

message TaskAction {
Expand Down Expand Up @@ -210,6 +233,10 @@ message ActionMetadata {
// Set only when this action was recovered from a prior run instead of executed
// here: the source action (source run id + action name) whose result was reused.
common.ActionIdentifier recovered_from = 18;

// Set when this action's inputs were overridden from
// RunSpec.recover.action_input_overrides when it was enqueued.
bool input_override_applied = 19;
}

enum ActionType {
Expand Down
3 changes: 3 additions & 0 deletions flyteidl2/workflow/run_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ message CreateRunRequest {
// Response message for creating a run.
message CreateRunResponse {
Run run = 1;

// Non-fatal issues found while creating the run, for the client to show the user.
repeated string warnings = 2;
}

// Request message for aborting a run.
Expand Down
Loading
Loading