This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
launch_plan.proto
164 lines (129 loc) · 6.07 KB
/
launch_plan.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
syntax = "proto3";
package flyteidl.admin;
option go_package = "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin";
import "flyteidl/core/execution.proto";
import "flyteidl/core/literals.proto";
import "flyteidl/core/identifier.proto";
import "flyteidl/core/interface.proto";
import "flyteidl/admin/schedule.proto";
import "flyteidl/admin/common.proto";
import "google/protobuf/timestamp.proto";
// Request to register a launch plan. A LaunchPlanSpec may include a complete or incomplete set of inputs required
// to launch a workflow execution. By default all launch plans are registered in state INACTIVE. If you wish to
// set the state to ACTIVE, you must submit a LaunchPlanUpdateRequest, after you have created a launch plan.
message LaunchPlanCreateRequest {
// Uniquely identifies a launch plan entity.
core.Identifier id = 1;
// User-provided launch plan details, including reference workflow, inputs and other metadata.
LaunchPlanSpec spec = 2;
}
message LaunchPlanCreateResponse {
// Purposefully empty, may be populated in the future.
}
// By default any launch plan regardless of state can be used to launch a workflow execution.
// However, at most one version of a launch plan
// (e.g. a NamedEntityIdentifier set of shared project, domain and name values) can be
// active at a time in regards to *schedules*. That is, at most one schedule in a NamedEntityIdentifier
// group will be observed and trigger executions at a defined cadence.
enum LaunchPlanState {
INACTIVE = 0;
ACTIVE = 1;
}
// A LaunchPlan provides the capability to templatize workflow executions.
// Launch plans simplify associating one or more schedules, inputs and notifications with your workflows.
// Launch plans can be shared and used to trigger executions with predefined inputs even when a workflow
// definition doesn't necessarily have a default value for said input.
message LaunchPlan {
core.Identifier id = 1;
LaunchPlanSpec spec = 2;
LaunchPlanClosure closure = 3;
}
// Response object for list launch plan requests.
message LaunchPlanList {
repeated LaunchPlan launch_plans = 1;
// In the case of multiple pages of results, the server-provided token can be used to fetch the next page
// in a query. If there are no more results, this value will be empty.
string token = 2;
}
// Defines permissions associated with executions created by this launch plan spec.
message Auth {
oneof method {
string assumable_iam_role = 1;
string kubernetes_service_account = 2;
}
}
// User-provided launch plan definition and configuration values.
message LaunchPlanSpec {
// Reference to the Workflow template that the launch plan references
core.Identifier workflow_id = 1;
// Metadata for the Launch Plan
LaunchPlanMetadata entity_metadata = 2;
// Input values to be passed for the execution
core.ParameterMap default_inputs = 3;
// Fixed, non-overridable inputs for the Launch Plan
core.LiteralMap fixed_inputs = 4;
// String to indicate the role to use to execute the workflow underneath
string role = 5 [deprecated=true];
// Custom labels to be applied to the execution resource.
Labels labels = 6;
// Custom annotations to be applied to the execution resource.
Annotations annotations = 7;
// Indicates the permission associated with workflow executions triggered with this launch plan.
Auth auth = 8 [deprecated=true];
AuthRole auth_role = 9;
// Indicates the runtime priority of the execution.
core.QualityOfService quality_of_service = 16;
}
// Values computed by the flyte platform after launch plan registration.
// These include expected_inputs required to be present in a CreateExecutionRequest
// to launch the reference workflow as well timestamp values associated with the launch plan.
message LaunchPlanClosure {
// Indicate the Launch plan phase
LaunchPlanState state = 1;
// Indicates the set of inputs to execute the Launch plan
core.ParameterMap expected_inputs = 2;
// Indicates the set of outputs from the Launch plan
core.VariableMap expected_outputs = 3;
// Time at which the launch plan was created.
google.protobuf.Timestamp created_at = 4;
// Time at which the launch plan was last updated.
google.protobuf.Timestamp updated_at = 5;
}
// Additional launch plan attributes included in the LaunchPlanSpec not strictly required to launch
// the reference workflow.
message LaunchPlanMetadata {
// Schedule to execute the Launch Plan
Schedule schedule = 1;
// List of notifications based on Execution status transitions
repeated Notification notifications = 2;
}
// Request to set the referenced launch plan state to the configured value.
message LaunchPlanUpdateRequest {
// Identifier of launch plan for which to change state.
core.Identifier id = 1;
// Desired state to apply to the launch plan.
LaunchPlanState state = 2;
}
// Purposefully empty, may be populated in the future.
message LaunchPlanUpdateResponse {
}
// Represents a request struct for finding an active launch plan for a given NamedEntityIdentifier
message ActiveLaunchPlanRequest {
NamedEntityIdentifier id = 1;
}
// Represents a request structure to list active launch plans within a project/domain.
message ActiveLaunchPlanListRequest {
// Name of the project that contains the identifiers.
string project = 1; // [(validate.rules).string.min_bytes = 1];
// Name of the domain the identifiers belongs to within the project.
string domain = 2; // [(validate.rules).string.min_bytes = 1];
// Indicates the number of resources to be returned.
uint32 limit = 3;
// In the case of multiple pages of results, the server-provided token can be used to fetch the next page
// in a query.
// +optional
string token = 4;
// Sort ordering.
// +optional
Sort sort_by = 5;
}