@flyteorg/flyteidl 1.16.0 → 2.0.0-alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/package.json +6 -9
  2. package/LICENSE +0 -202
  3. package/NOTICE +0 -4
  4. package/README.md +0 -14
  5. package/gen/pb-js/flyteidl.d.ts +0 -28307
  6. package/gen/pb-js/flyteidl.js +0 -66636
  7. package/protos/buf.lock +0 -18
  8. package/protos/buf.yaml +0 -12
  9. package/protos/docs/admin/admin.rst +0 -4623
  10. package/protos/docs/admin/index.rst +0 -13
  11. package/protos/docs/contributing.md +0 -68
  12. package/protos/docs/core/core.rst +0 -3952
  13. package/protos/docs/core/index.rst +0 -15
  14. package/protos/docs/datacatalog/datacatalog.rst +0 -1313
  15. package/protos/docs/datacatalog/index.rst +0 -16
  16. package/protos/docs/event/event.rst +0 -726
  17. package/protos/docs/event/index.rst +0 -27
  18. package/protos/docs/plugins/index.rst +0 -14
  19. package/protos/docs/plugins/plugins.rst +0 -780
  20. package/protos/docs/restructuredtext.tmpl +0 -129
  21. package/protos/docs/service/index.rst +0 -13
  22. package/protos/docs/service/service.rst +0 -543
  23. package/protos/docs/withoutscalar_restructuredtext.tmpl +0 -105
  24. package/protos/docs_index.rst +0 -19
  25. package/protos/flyteidl/admin/agent.proto +0 -309
  26. package/protos/flyteidl/admin/cluster_assignment.proto +0 -11
  27. package/protos/flyteidl/admin/common.proto +0 -337
  28. package/protos/flyteidl/admin/description_entity.proto +0 -95
  29. package/protos/flyteidl/admin/event.proto +0 -70
  30. package/protos/flyteidl/admin/execution.proto +0 -436
  31. package/protos/flyteidl/admin/launch_plan.proto +0 -231
  32. package/protos/flyteidl/admin/matchable_resource.proto +0 -194
  33. package/protos/flyteidl/admin/node_execution.proto +0 -248
  34. package/protos/flyteidl/admin/notification.proto +0 -27
  35. package/protos/flyteidl/admin/project.proto +0 -132
  36. package/protos/flyteidl/admin/project_attributes.proto +0 -69
  37. package/protos/flyteidl/admin/project_domain_attributes.proto +0 -80
  38. package/protos/flyteidl/admin/schedule.proto +0 -43
  39. package/protos/flyteidl/admin/signal.proto +0 -86
  40. package/protos/flyteidl/admin/task.proto +0 -71
  41. package/protos/flyteidl/admin/task_execution.proto +0 -171
  42. package/protos/flyteidl/admin/version.proto +0 -27
  43. package/protos/flyteidl/admin/workflow.proto +0 -92
  44. package/protos/flyteidl/admin/workflow_attributes.proto +0 -89
  45. package/protos/flyteidl/cacheservice/cacheservice.proto +0 -143
  46. package/protos/flyteidl/core/artifact_id.proto +0 -112
  47. package/protos/flyteidl/core/catalog.proto +0 -63
  48. package/protos/flyteidl/core/compiler.proto +0 -64
  49. package/protos/flyteidl/core/condition.proto +0 -63
  50. package/protos/flyteidl/core/dynamic_job.proto +0 -32
  51. package/protos/flyteidl/core/errors.proto +0 -42
  52. package/protos/flyteidl/core/execution.proto +0 -156
  53. package/protos/flyteidl/core/execution_envs.proto +0 -45
  54. package/protos/flyteidl/core/identifier.proto +0 -80
  55. package/protos/flyteidl/core/interface.proto +0 -64
  56. package/protos/flyteidl/core/literals.proto +0 -205
  57. package/protos/flyteidl/core/metrics.proto +0 -50
  58. package/protos/flyteidl/core/security.proto +0 -135
  59. package/protos/flyteidl/core/tasks.proto +0 -392
  60. package/protos/flyteidl/core/types.proto +0 -208
  61. package/protos/flyteidl/core/workflow.proto +0 -361
  62. package/protos/flyteidl/core/workflow_closure.proto +0 -18
  63. package/protos/flyteidl/datacatalog/datacatalog.proto +0 -420
  64. package/protos/flyteidl/event/cloudevents.proto +0 -81
  65. package/protos/flyteidl/event/event.proto +0 -347
  66. package/protos/flyteidl/plugins/array_job.proto +0 -30
  67. package/protos/flyteidl/plugins/common.proto +0 -27
  68. package/protos/flyteidl/plugins/dask.proto +0 -41
  69. package/protos/flyteidl/plugins/kubeflow/common.proto +0 -28
  70. package/protos/flyteidl/plugins/kubeflow/mpi.proto +0 -47
  71. package/protos/flyteidl/plugins/kubeflow/pytorch.proto +0 -53
  72. package/protos/flyteidl/plugins/kubeflow/tensorflow.proto +0 -46
  73. package/protos/flyteidl/plugins/mpi.proto +0 -20
  74. package/protos/flyteidl/plugins/presto.proto +0 -14
  75. package/protos/flyteidl/plugins/pytorch.proto +0 -25
  76. package/protos/flyteidl/plugins/qubole.proto +0 -26
  77. package/protos/flyteidl/plugins/ray.proto +0 -59
  78. package/protos/flyteidl/plugins/spark.proto +0 -42
  79. package/protos/flyteidl/plugins/tensorflow.proto +0 -18
  80. package/protos/flyteidl/plugins/waitable.proto +0 -15
  81. package/protos/flyteidl/service/admin.proto +0 -668
  82. package/protos/flyteidl/service/agent.proto +0 -79
  83. package/protos/flyteidl/service/auth.proto +0 -94
  84. package/protos/flyteidl/service/dataproxy.proto +0 -205
  85. package/protos/flyteidl/service/external_plugin_service.proto +0 -79
  86. package/protos/flyteidl/service/identity.proto +0 -51
  87. package/protos/flyteidl/service/signal.proto +0 -55
@@ -1,135 +0,0 @@
1
- syntax = "proto3";
2
-
3
- package flyteidl.core;
4
-
5
- option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core";
6
-
7
- // Secret encapsulates information about the secret a task needs to proceed. An environment variable
8
- // FLYTE_SECRETS_ENV_PREFIX will be passed to indicate the prefix of the environment variables that will be present if
9
- // secrets are passed through environment variables.
10
- // FLYTE_SECRETS_DEFAULT_DIR will be passed to indicate the prefix of the path where secrets will be mounted if secrets
11
- // are passed through file mounts.
12
- message Secret {
13
- enum MountType {
14
- // Default case, indicates the client can tolerate either mounting options.
15
- ANY = 0;
16
-
17
- // ENV_VAR indicates the secret needs to be mounted as an environment variable.
18
- ENV_VAR = 1;
19
-
20
- // FILE indicates the secret needs to be mounted as a file.
21
- FILE = 2;
22
- }
23
-
24
- // The name of the secret group where to find the key referenced below. For K8s secrets, this should be the name of
25
- // the v1/secret object. For Confidant, this should be the Credential name. For Vault, this should be the secret name.
26
- // For AWS Secret Manager, this should be the name of the secret.
27
- // +required
28
- string group = 1;
29
-
30
- // The group version to fetch. This is not supported in all secret management systems. It'll be ignored for the ones
31
- // that do not support it.
32
- // +optional
33
- string group_version = 2;
34
-
35
- // The name of the secret to mount. This has to match an existing secret in the system. It's up to the implementation
36
- // of the secret management system to require case sensitivity. For K8s secrets, Confidant and Vault, this should
37
- // match one of the keys inside the secret. For AWS Secret Manager, it's ignored.
38
- // +optional
39
- string key = 3;
40
-
41
- // mount_requirement is optional. Indicates where the secret has to be mounted. If provided, the execution will fail
42
- // if the underlying key management system cannot satisfy that requirement. If not provided, the default location
43
- // will depend on the key management system.
44
- // +optional
45
- MountType mount_requirement = 4;
46
-
47
- // env_var is optional. Custom environment variable to set the value of the secret. If mount_requirement is ENV_VAR,
48
- // then the value is the secret itself. If mount_requirement is FILE, then the value is the path to the secret file.
49
- // +optional
50
- string env_var = 5;
51
- }
52
-
53
- // OAuth2Client encapsulates OAuth2 Client Credentials to be used when making calls on behalf of that task.
54
- message OAuth2Client {
55
- // client_id is the public id for the client to use. The system will not perform any pre-auth validation that the
56
- // secret requested matches the client_id indicated here.
57
- // +required
58
- string client_id = 1;
59
-
60
- // client_secret is a reference to the secret used to authenticate the OAuth2 client.
61
- // +required
62
- Secret client_secret = 2;
63
- }
64
-
65
- // Identity encapsulates the various security identities a task can run as. It's up to the underlying plugin to pick the
66
- // right identity for the execution environment.
67
- message Identity {
68
- // iam_role references the fully qualified name of Identity & Access Management role to impersonate.
69
- string iam_role = 1;
70
-
71
- // k8s_service_account references a kubernetes service account to impersonate.
72
- string k8s_service_account = 2;
73
-
74
- // oauth2_client references an oauth2 client. Backend plugins can use this information to impersonate the client when
75
- // making external calls.
76
- OAuth2Client oauth2_client = 3;
77
-
78
- // execution_identity references the subject who makes the execution
79
- string execution_identity = 4;
80
- }
81
-
82
- // OAuth2TokenRequest encapsulates information needed to request an OAuth2 token.
83
- // FLYTE_TOKENS_ENV_PREFIX will be passed to indicate the prefix of the environment variables that will be present if
84
- // tokens are passed through environment variables.
85
- // FLYTE_TOKENS_PATH_PREFIX will be passed to indicate the prefix of the path where secrets will be mounted if tokens
86
- // are passed through file mounts.
87
- message OAuth2TokenRequest {
88
- // Type of the token requested.
89
- enum Type {
90
- // CLIENT_CREDENTIALS indicates a 2-legged OAuth token requested using client credentials.
91
- CLIENT_CREDENTIALS = 0;
92
- }
93
-
94
- // name indicates a unique id for the token request within this task token requests. It'll be used as a suffix for
95
- // environment variables and as a filename for mounting tokens as files.
96
- // +required
97
- string name = 1;
98
-
99
- // type indicates the type of the request to make. Defaults to CLIENT_CREDENTIALS.
100
- // +required
101
- Type type = 2;
102
-
103
- // client references the client_id/secret to use to request the OAuth2 token.
104
- // +required
105
- OAuth2Client client = 3;
106
-
107
- // idp_discovery_endpoint references the discovery endpoint used to retrieve token endpoint and other related
108
- // information.
109
- // +optional
110
- string idp_discovery_endpoint = 4;
111
-
112
- // token_endpoint references the token issuance endpoint. If idp_discovery_endpoint is not provided, this parameter is
113
- // mandatory.
114
- // +optional
115
- string token_endpoint = 5;
116
- }
117
-
118
- // SecurityContext holds security attributes that apply to tasks.
119
- message SecurityContext {
120
- // run_as encapsulates the identity a pod should run as. If the task fills in multiple fields here, it'll be up to the
121
- // backend plugin to choose the appropriate identity for the execution engine the task will run on.
122
- Identity run_as = 1;
123
-
124
- // secrets indicate the list of secrets the task needs in order to proceed. Secrets will be mounted/passed to the
125
- // pod as it starts. If the plugin responsible for kicking of the task will not run it on a flyte cluster (e.g. AWS
126
- // Batch), it's the responsibility of the plugin to fetch the secret (which means propeller identity will need access
127
- // to the secret) and to pass it to the remote execution engine.
128
- repeated Secret secrets = 2;
129
-
130
- // tokens indicate the list of token requests the task needs in order to proceed. Tokens will be mounted/passed to the
131
- // pod as it starts. If the plugin responsible for kicking of the task will not run it on a flyte cluster (e.g. AWS
132
- // Batch), it's the responsibility of the plugin to fetch the secret (which means propeller identity will need access
133
- // to the secret) and to pass it to the remote execution engine.
134
- repeated OAuth2TokenRequest tokens = 3;
135
- }
@@ -1,392 +0,0 @@
1
- syntax = "proto3";
2
-
3
- import "flyteidl/core/identifier.proto";
4
- import "flyteidl/core/interface.proto";
5
- import "flyteidl/core/literals.proto";
6
- import "flyteidl/core/security.proto";
7
- import "google/protobuf/duration.proto";
8
- import "google/protobuf/struct.proto";
9
- import "google/protobuf/wrappers.proto";
10
-
11
- package flyteidl.core;
12
-
13
- option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core";
14
-
15
- // A customizable interface to convey resources requested for a container. This can be interpreted differently for different
16
- // container engines.
17
- message Resources {
18
- // Known resource names.
19
- enum ResourceName {
20
- UNKNOWN = 0;
21
- CPU = 1;
22
- GPU = 2;
23
- MEMORY = 3;
24
- STORAGE = 4;
25
- // For Kubernetes-based deployments, pods use ephemeral local storage for scratch space, caching, and for logs.
26
- EPHEMERAL_STORAGE = 5;
27
- }
28
-
29
- // Encapsulates a resource name and value.
30
- message ResourceEntry {
31
- // Resource name.
32
- ResourceName name = 1;
33
-
34
- // Value must be a valid k8s quantity. See
35
- // https://github.com/kubernetes/apimachinery/blob/master/pkg/api/resource/quantity.go#L30-L80
36
- string value = 2;
37
- }
38
-
39
- // The desired set of resources requested. ResourceNames must be unique within the list.
40
- repeated ResourceEntry requests = 1;
41
-
42
- // Defines a set of bounds (e.g. min/max) within which the task can reliably run. ResourceNames must be unique
43
- // within the list.
44
- repeated ResourceEntry limits = 2;
45
- }
46
-
47
- // Metadata associated with the GPU accelerator to allocate to a task. Contains
48
- // information about device type, and for multi-instance GPUs, the partition size to
49
- // use.
50
- message GPUAccelerator {
51
- // This can be any arbitrary string, and should be informed by the labels or taints
52
- // associated with the nodes in question. Default cloud provider labels typically
53
- // use the following values: `nvidia-tesla-t4`, `nvidia-tesla-a100`, etc.
54
- string device = 1;
55
- oneof partition_size_value {
56
- bool unpartitioned = 2;
57
- // Like `device`, this can be any arbitrary string, and should be informed by
58
- // the labels or taints associated with the nodes in question. Default cloud
59
- // provider labels typically use the following values: `1g.5gb`, `2g.10gb`, etc.
60
- string partition_size = 3;
61
- }
62
- }
63
-
64
- // Metadata associated with configuring a shared memory volume for a task.
65
- message SharedMemory {
66
- // Mount path to place in container
67
- string mount_path = 1;
68
- // Name for volume
69
- string mount_name = 2;
70
- // Size limit for shared memory. If not set, then the shared memory is equal
71
- // to the allocated memory.
72
- // +optional
73
- string size_limit = 3;
74
- }
75
-
76
- // Encapsulates all non-standard resources, not captured by v1.ResourceRequirements, to
77
- // allocate to a task.
78
- message ExtendedResources {
79
- // GPU accelerator to select for task. Contains information about device type, and
80
- // for multi-instance GPUs, the partition size to use.
81
- GPUAccelerator gpu_accelerator = 1;
82
- SharedMemory shared_memory = 2;
83
- }
84
-
85
- // Runtime information. This is loosely defined to allow for extensibility.
86
- message RuntimeMetadata {
87
- enum RuntimeType {
88
- OTHER = 0;
89
- FLYTE_SDK = 1;
90
- }
91
-
92
- // Type of runtime.
93
- RuntimeType type = 1;
94
-
95
- // Version of the runtime. All versions should be backward compatible. However, certain cases call for version
96
- // checks to ensure tighter validation or setting expectations.
97
- string version = 2;
98
-
99
- //+optional It can be used to provide extra information about the runtime (e.g. python, golang... etc.).
100
- string flavor = 3;
101
- }
102
-
103
- // Task Metadata
104
- message TaskMetadata {
105
- // Field number 10 is reserved because we are reusing the name generates_deck for field number 15,
106
- // but with a different type.
107
- reserved 10;
108
-
109
- // Indicates whether the system should attempt to lookup this task's output to avoid duplication of work.
110
- bool discoverable = 1;
111
-
112
- // Runtime information about the task.
113
- RuntimeMetadata runtime = 2;
114
-
115
- // The overall timeout of a task including user-triggered retries.
116
- google.protobuf.Duration timeout = 4;
117
-
118
- // Number of retries per task.
119
- RetryStrategy retries = 5;
120
-
121
- // Indicates a logical version to apply to this task for the purpose of discovery.
122
- string discovery_version = 6;
123
-
124
- // If set, this indicates that this task is deprecated. This will enable owners of tasks to notify consumers
125
- // of the ending of support for a given task.
126
- string deprecated_error_message = 7;
127
-
128
- // For interruptible we will populate it at the node level but require it be part of TaskMetadata
129
- // for a user to set the value.
130
- // We are using oneof instead of bool because otherwise we would be unable to distinguish between value being
131
- // set by the user or defaulting to false.
132
- // The logic of handling precedence will be done as part of flytepropeller.
133
-
134
- // Identify whether task is interruptible
135
- oneof interruptible_value {
136
- bool interruptible = 8;
137
- };
138
-
139
- // Indicates whether the system should attempt to execute discoverable instances in serial to avoid duplicate work
140
- bool cache_serializable = 9;
141
-
142
- // Arbitrary tags that allow users and the platform to store small but arbitrary labels
143
- map<string, string> tags = 11;
144
-
145
- // pod_template_name is the unique name of a PodTemplate k8s resource to be used as the base configuration if this
146
- // task creates a k8s Pod. If this value is set, the specified PodTemplate will be used instead of, but applied
147
- // identically as, the default PodTemplate configured in FlytePropeller.
148
- string pod_template_name = 12;
149
-
150
- // cache_ignore_input_vars is the input variables that should not be included when calculating hash for cache.
151
- repeated string cache_ignore_input_vars = 13;
152
- // is_eager indicates whether the task is eager or not.
153
- // This would be used by CreateTask endpoint.
154
- bool is_eager = 14;
155
-
156
- // Indicates whether the task will generate a deck when it finishes executing.
157
- // The BoolValue can have three states:
158
- // - nil: The value is not set.
159
- // - true: The task will generate a deck.
160
- // - false: The task will not generate a deck.
161
- google.protobuf.BoolValue generates_deck = 15;
162
-
163
- // Metadata applied to task pods or task CR objects.
164
- // In flytekit, labels and annotations resulting in this metadata field
165
- // are provided via `@task(labels=..., annotations=...)`.
166
- // For tasks backed by pods like PythonFunctionTask, these take precedence
167
- // over the metadata provided via `@task(pod_template=PodTemplate(labels=...))` which are transported
168
- // in the K8sPod message. For tasks backed by CRDs, this metadata is applied to
169
- // the CR object itself while the metadata in the pod template/K8sPod is applied
170
- // to the pod template spec of the CR object.
171
- K8sObjectMetadata metadata = 16;
172
- }
173
-
174
- // A Task structure that uniquely identifies a task in the system
175
- // Tasks are registered as a first step in the system.
176
- message TaskTemplate {
177
- // Auto generated taskId by the system. Task Id uniquely identifies this task globally.
178
- Identifier id = 1;
179
-
180
- // A predefined yet extensible Task type identifier. This can be used to customize any of the components. If no
181
- // extensions are provided in the system, Flyte will resolve the this task to its TaskCategory and default the
182
- // implementation registered for the TaskCategory.
183
- string type = 2;
184
-
185
- // Extra metadata about the task.
186
- TaskMetadata metadata = 3;
187
-
188
- // A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
189
- // compile-time validation of the workflow to avoid costly runtime failures.
190
- TypedInterface interface = 4;
191
-
192
- // Custom data about the task. This is extensible to allow various plugins in the system.
193
- google.protobuf.Struct custom = 5;
194
-
195
- // Known target types that the system will guarantee plugins for. Custom SDK plugins are allowed to set these if needed.
196
- // If no corresponding execution-layer plugins are found, the system will default to handling these using built-in
197
- // handlers.
198
- oneof target {
199
- Container container = 6;
200
- K8sPod k8s_pod = 17;
201
- Sql sql = 18;
202
- }
203
-
204
- // This can be used to customize task handling at execution time for the same task type.
205
- int32 task_type_version = 7;
206
-
207
- // security_context encapsulates security attributes requested to run this task.
208
- SecurityContext security_context = 8;
209
-
210
- // Encapsulates all non-standard resources, not captured by
211
- // v1.ResourceRequirements, to allocate to a task.
212
- ExtendedResources extended_resources = 9;
213
-
214
- // Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
215
- // to use as required.
216
- // reserve the field numbers 1 through 15 for very frequently occurring message elements
217
- map<string, string> config = 16;
218
- }
219
-
220
- // ----------------- First class Plugins
221
-
222
- // Defines port properties for a container.
223
- message ContainerPort {
224
- // Number of port to expose on the pod's IP address.
225
- // This must be a valid port number, 0 < x < 65536.
226
- uint32 container_port = 1;
227
- // Name of the port to expose on the pod's IP address.
228
- string name = 2;
229
- }
230
-
231
- message Container {
232
- // Container image url. Eg: docker/redis:latest
233
- string image = 1;
234
-
235
- // Command to be executed, if not provided, the default entrypoint in the container image will be used.
236
- repeated string command = 2;
237
-
238
- // These will default to Flyte given paths. If provided, the system will not append known paths. If the task still
239
- // needs flyte's inputs and outputs path, add $(FLYTE_INPUT_FILE), $(FLYTE_OUTPUT_FILE) wherever makes sense and the
240
- // system will populate these before executing the container.
241
- repeated string args = 3;
242
-
243
- // Container resources requirement as specified by the container engine.
244
- Resources resources = 4;
245
-
246
- // Environment variables will be set as the container is starting up.
247
- repeated KeyValuePair env = 5;
248
-
249
- // Allows extra configs to be available for the container.
250
- // TODO: elaborate on how configs will become available.
251
- // Deprecated, please use TaskTemplate.config instead.
252
- repeated KeyValuePair config = 6 [deprecated = true];
253
-
254
- // Ports to open in the container. This feature is not supported by all execution engines. (e.g. supported on K8s but
255
- // not supported on AWS Batch)
256
- // Only K8s
257
- repeated ContainerPort ports = 7;
258
-
259
- // BETA: Optional configuration for DataLoading. If not specified, then default values are used.
260
- // This makes it possible to to run a completely portable container, that uses inputs and outputs
261
- // only from the local file-system and without having any reference to flyteidl. This is supported only on K8s at the moment.
262
- // If data loading is enabled, then data will be mounted in accompanying directories specified in the DataLoadingConfig. If the directories
263
- // are not specified, inputs will be mounted onto and outputs will be uploaded from a pre-determined file-system path. Refer to the documentation
264
- // to understand the default paths.
265
- // Only K8s
266
- DataLoadingConfig data_config = 9;
267
-
268
- // Architecture-type the container image supports.
269
- enum Architecture {
270
- UNKNOWN = 0;
271
- AMD64 = 1;
272
- ARM64 = 2;
273
- ARM_V6 = 3;
274
- ARM_V7 = 4;
275
- }
276
- Architecture architecture = 10;
277
- }
278
-
279
- // Strategy to use when dealing with Blob, Schema, or multipart blob data (large datasets)
280
- message IOStrategy {
281
- // Mode to use for downloading
282
- enum DownloadMode {
283
- // All data will be downloaded before the main container is executed
284
- DOWNLOAD_EAGER = 0;
285
- // Data will be downloaded as a stream and an End-Of-Stream marker will be written to indicate all data has been downloaded. Refer to protocol for details
286
- DOWNLOAD_STREAM = 1;
287
- // Large objects (offloaded) will not be downloaded
288
- DO_NOT_DOWNLOAD = 2;
289
- }
290
- // Mode to use for uploading
291
- enum UploadMode {
292
- // All data will be uploaded after the main container exits
293
- UPLOAD_ON_EXIT = 0;
294
- // Data will be uploaded as it appears. Refer to protocol specification for details
295
- UPLOAD_EAGER = 1;
296
- // Data will not be uploaded, only references will be written
297
- DO_NOT_UPLOAD = 2;
298
- }
299
- // Mode to use to manage downloads
300
- DownloadMode download_mode = 1;
301
- // Mode to use to manage uploads
302
- UploadMode upload_mode = 2;
303
- }
304
-
305
- // This configuration allows executing raw containers in Flyte using the Flyte CoPilot system.
306
- // Flyte CoPilot, eliminates the needs of flytekit or sdk inside the container. Any inputs required by the users container are side-loaded in the input_path
307
- // Any outputs generated by the user container - within output_path are automatically uploaded.
308
- message DataLoadingConfig {
309
- // LiteralMapFormat decides the encoding format in which the input metadata should be made available to the containers.
310
- // If the user has access to the protocol buffer definitions, it is recommended to use the PROTO format.
311
- // JSON and YAML do not need any protobuf definitions to read it
312
- // All remote references in core.LiteralMap are replaced with local filesystem references (the data is downloaded to local filesystem)
313
- enum LiteralMapFormat {
314
- // JSON / YAML for the metadata (which contains inlined primitive values). The representation is inline with the standard json specification as specified - https://www.json.org/json-en.html
315
- JSON = 0;
316
- YAML = 1;
317
- // Proto is a serialized binary of `core.LiteralMap` defined in flyteidl/core
318
- PROTO = 2;
319
- }
320
- // Flag enables DataLoading Config. If this is not set, data loading will not be used!
321
- bool enabled = 1;
322
- // File system path (start at root). This folder will contain all the inputs exploded to a separate file.
323
- // Example, if the input interface needs (x: int, y: blob, z: multipart_blob) and the input path is '/var/flyte/inputs', then the file system will look like
324
- // /var/flyte/inputs/inputs.<metadata format dependent -> .pb .json .yaml> -> Format as defined previously. The Blob and Multipart blob will reference local filesystem instead of remote locations
325
- // /var/flyte/inputs/x -> X is a file that contains the value of x (integer) in string format
326
- // /var/flyte/inputs/y -> Y is a file in Binary format
327
- // /var/flyte/inputs/z/... -> Note Z itself is a directory
328
- // More information about the protocol - refer to docs #TODO reference docs here
329
- string input_path = 2;
330
- // File system path (start at root). This folder should contain all the outputs for the task as individual files and/or an error text file
331
- string output_path = 3;
332
- // In the inputs folder, there will be an additional summary/metadata file that contains references to all files or inlined primitive values.
333
- // This format decides the actual encoding for the data. Refer to the encoding to understand the specifics of the contents and the encoding
334
- LiteralMapFormat format = 4;
335
- IOStrategy io_strategy = 5;
336
- }
337
-
338
- // Defines a pod spec and additional pod metadata that is created when a task is executed.
339
- message K8sPod {
340
- // Contains additional metadata for building a kubernetes pod.
341
- K8sObjectMetadata metadata = 1;
342
-
343
- // Defines the primary pod spec created when a task is executed.
344
- // This should be a JSON-marshalled pod spec, which can be defined in
345
- // - go, using: https://github.com/kubernetes/api/blob/release-1.21/core/v1/types.go#L2936
346
- // - python: using https://github.com/kubernetes-client/python/blob/release-19.0/kubernetes/client/models/v1_pod_spec.py
347
- google.protobuf.Struct pod_spec = 2;
348
-
349
- // BETA: Optional configuration for DataLoading. If not specified, then default values are used.
350
- // This makes it possible to to run a completely portable container, that uses inputs and outputs
351
- // only from the local file-system and without having any reference to flytekit. This is supported only on K8s at the moment.
352
- // If data loading is enabled, then data will be mounted in accompanying directories specified in the DataLoadingConfig. If the directories
353
- // are not specified, inputs will be mounted onto and outputs will be uploaded from a pre-determined file-system path. Refer to the documentation
354
- // to understand the default paths.
355
- // Only K8s
356
- DataLoadingConfig data_config = 3;
357
-
358
-
359
- // Defines the primary container name when pod template override is executed.
360
- string primary_container_name = 4;
361
- }
362
-
363
- // Metadata for building a kubernetes object when a task is executed.
364
- message K8sObjectMetadata {
365
- // Optional labels to add to the pod definition.
366
- map<string, string> labels = 1;
367
-
368
- // Optional annotations to add to the pod definition.
369
- map<string, string> annotations = 2;
370
- }
371
-
372
- // Sql represents a generic sql workload with a statement and dialect.
373
- message Sql {
374
- // The actual query to run, the query can have templated parameters.
375
- // We use Flyte's Golang templating format for Query templating.
376
- // For example,
377
- // insert overwrite directory '{{ .rawOutputDataPrefix }}' stored as parquet
378
- // select *
379
- // from my_table
380
- // where ds = '{{ .Inputs.ds }}'
381
- string statement = 1;
382
- // The dialect of the SQL statement. This is used to validate and parse SQL statements at compilation time to avoid
383
- // expensive runtime operations. If set to an unsupported dialect, no validation will be done on the statement.
384
- // We support the following dialect: ansi, hive.
385
- enum Dialect {
386
- UNDEFINED = 0;
387
- ANSI = 1;
388
- HIVE = 2;
389
- OTHER = 3;
390
- }
391
- Dialect dialect = 2;
392
- }