From 1e61f4e98ef6125c82e668ac0933479976407fe8 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Fri, 31 May 2024 15:23:39 -0700 Subject: [PATCH 01/30] Update Flyte components (#5441) * Update Flyte Components Signed-off-by: Flyte-Bot * Add changelog and bump version in docs/conf.py Signed-off-by: Eduardo Apolinario --------- Signed-off-by: Flyte-Bot Signed-off-by: Eduardo Apolinario Co-authored-by: eapolinario --- CHANGELOG/CHANGELOG-v1.12.1-rc0.md | 37 +++++++++++++++++++ charts/flyte-binary/README.md | 2 +- charts/flyte-binary/values.yaml | 2 +- charts/flyte-core/README.md | 14 +++---- charts/flyte-core/values.yaml | 12 +++--- charts/flyte/README.md | 18 ++++----- charts/flyte/values.yaml | 12 +++--- charts/flyteagent/README.md | 2 +- charts/flyteagent/values.yaml | 2 +- .../agent/flyte_agent_helm_generated.yaml | 2 +- .../flyte_aws_scheduler_helm_generated.yaml | 32 ++++++++-------- .../flyte_helm_controlplane_generated.yaml | 22 +++++------ .../eks/flyte_helm_dataplane_generated.yaml | 14 +++---- deployment/eks/flyte_helm_generated.yaml | 36 +++++++++--------- .../flyte_helm_controlplane_generated.yaml | 22 +++++------ .../gcp/flyte_helm_dataplane_generated.yaml | 14 +++---- deployment/gcp/flyte_helm_generated.yaml | 36 +++++++++--------- .../flyte_sandbox_binary_helm_generated.yaml | 4 +- deployment/sandbox/flyte_helm_generated.yaml | 36 +++++++++--------- .../manifests/complete-agent.yaml | 10 ++--- .../sandbox-bundled/manifests/complete.yaml | 8 ++-- docker/sandbox-bundled/manifests/dev.yaml | 4 +- docs/conf.py | 2 +- 23 files changed, 190 insertions(+), 153 deletions(-) create mode 100644 CHANGELOG/CHANGELOG-v1.12.1-rc0.md diff --git a/CHANGELOG/CHANGELOG-v1.12.1-rc0.md b/CHANGELOG/CHANGELOG-v1.12.1-rc0.md new file mode 100644 index 0000000000..9e89c25ddb --- /dev/null +++ b/CHANGELOG/CHANGELOG-v1.12.1-rc0.md @@ -0,0 +1,37 @@ +# Flyte 1.12.1-rc0 Release Notes + +Flyte 1.12.1-rc0 is a release candidate that focuses on documentation enhancements, bug fixes, and improvements to the core infrastructure. This release also includes contributions from a new member of the Flyte community. Below are the highlights of this release. + +## 🚀 New Features & Improvements + +1. **Documentation Improvements** + - [Removed the source code renderer section from the Decks article](https://github.com/flyteorg/flyte/pull/5397). + - Added [documentation for OpenAI batch agent backend setup](https://github.com/flyteorg/flyte/pull/5291). + - [Updated the example Flyte agent Dockerfile](https://github.com/flyteorg/flyte/pull/5412). + - Fixed [documentation link to testing agent on local cluster](https://github.com/flyteorg/flyte/pull/5398). + - [Fixed Kubeflow webhook error](https://github.com/flyteorg/flyte/pull/5410) in the documentation. + - [Updated Flytekit version to 1.12.1b2](https://github.com/flyteorg/flyte/pull/5411) in monodocs requirements. + - [Updated Flytefile.md](https://github.com/flyteorg/flyte/pull/5428) and replaced [SHA instead of master in RLI links](https://github.com/flyteorg/flyte/pull/5434). + +2. **Infrastructure and Configuration** + - [Reverted "Ensure token is refreshed on Unauthenticated"](https://github.com/flyteorg/flyte/pull/5404). + - [Updated core Helm chart for propeller configuration of agent service](https://github.com/flyteorg/flyte/pull/5402). + - [Fixed Flytectl install script](https://github.com/flyteorg/flyte/pull/5405) in the monorepo. + - [Moved to upstream mockery](https://github.com/flyteorg/flyte/pull/4937). + - [Used a different git command to match the Flyteidl tags](https://github.com/flyteorg/flyte/pull/5419). + +3. **Bug Fixes** + - [Handled auto-refresh cache race condition](https://github.com/flyteorg/flyte/pull/5406). + - [Fixed typos using codespell CI job](https://github.com/flyteorg/flyte/pull/5418). + - [Fixed build failure](https://github.com/flyteorg/flyte/pull/5425) in monodocs. + - [Replaced Azure AD OIDC URL with the correct one](https://github.com/flyteorg/flyte/pull/4075). + +4. **Miscellaneous** + - [Updated the lock file](https://github.com/flyteorg/flyte/pull/5416). + - [Added executionClusterLabel](https://github.com/flyteorg/flyte/pull/5394) for better execution cluster management. + +## 🆕 New Contributors + +- **@EraYaN** for [replacing Azure AD OIDC URL with the correct one](https://github.com/flyteorg/flyte/pull/4075). + +**[Full Changelog](https://github.com/flyteorg/flyte/compare/flytectl/v0.8.21...v1.12.1-rc0)** diff --git a/charts/flyte-binary/README.md b/charts/flyte-binary/README.md index 629b3a31d4..27c831b396 100644 --- a/charts/flyte-binary/README.md +++ b/charts/flyte-binary/README.md @@ -42,7 +42,7 @@ Chart for basic single Flyte executable deployment | configuration.auth.oidc.clientId | string | `""` | | | configuration.auth.oidc.clientSecret | string | `""` | | | configuration.co-pilot.image.repository | string | `"cr.flyte.org/flyteorg/flytecopilot"` | | -| configuration.co-pilot.image.tag | string | `"v1.12.0"` | | +| configuration.co-pilot.image.tag | string | `"v1.12.1-rc0"` | | | configuration.database.dbname | string | `"flyte"` | | | configuration.database.host | string | `"127.0.0.1"` | | | configuration.database.options | string | `"sslmode=disable"` | | diff --git a/charts/flyte-binary/values.yaml b/charts/flyte-binary/values.yaml index 6c9cb9d3f5..528f8eec84 100644 --- a/charts/flyte-binary/values.yaml +++ b/charts/flyte-binary/values.yaml @@ -159,7 +159,7 @@ configuration: # repository CoPilot sidecar image repository repository: cr.flyte.org/flyteorg/flytecopilot # FLYTECOPILOT_IMAGE # tag CoPilot sidecar image tag - tag: v1.12.0 # FLYTECOPILOT_TAG + tag: v1.12.1-rc0 # FLYTECOPILOT_TAG # agentService Flyte Agent configuration agentService: defaultAgent: diff --git a/charts/flyte-core/README.md b/charts/flyte-core/README.md index f2e0dbff1c..4662eeef66 100644 --- a/charts/flyte-core/README.md +++ b/charts/flyte-core/README.md @@ -95,8 +95,8 @@ helm install gateway bitnami/contour -n flyte | configmap.clusters.clusterConfigs | list | `[]` | | | configmap.clusters.labelClusterMap | object | `{}` | | | configmap.console | object | `{"BASE_URL":"/console","CONFIG_DIR":"/etc/flyte/config"}` | Configuration for Flyte console UI | -| configmap.copilot | object | `{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.0","name":"flyte-copilot-","start-timeout":"30s"}}}}` | Copilot configuration | -| configmap.copilot.plugins.k8s.co-pilot | object | `{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.0","name":"flyte-copilot-","start-timeout":"30s"}` | Structure documented [here](https://pkg.go.dev/github.com/lyft/flyteplugins@v0.5.28/go/tasks/pluginmachinery/flytek8s/config#FlyteCoPilotConfig) | +| configmap.copilot | object | `{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0","name":"flyte-copilot-","start-timeout":"30s"}}}}` | Copilot configuration | +| configmap.copilot.plugins.k8s.co-pilot | object | `{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0","name":"flyte-copilot-","start-timeout":"30s"}` | Structure documented [here](https://pkg.go.dev/github.com/lyft/flyteplugins@v0.5.28/go/tasks/pluginmachinery/flytek8s/config#FlyteCoPilotConfig) | | configmap.core | object | `{"manager":{"pod-application":"flytepropeller","pod-template-container-name":"flytepropeller","pod-template-name":"flytepropeller-template"},"propeller":{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"},"webhook":{"certDir":"/etc/webhook/certs","serviceName":"flyte-pod-webhook"}}` | Core propeller configuration | | configmap.core.manager | object | `{"pod-application":"flytepropeller","pod-template-container-name":"flytepropeller","pod-template-name":"flytepropeller-template"}` | follows the structure specified [here](https://pkg.go.dev/github.com/flyteorg/flytepropeller/manager/config#Config). | | configmap.core.propeller | object | `{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"}` | follows the structure specified [here](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/config). | @@ -130,7 +130,7 @@ helm install gateway bitnami/contour -n flyte | datacatalog.extraArgs | object | `{}` | Appends extra command line arguments to the main command | | datacatalog.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | datacatalog.image.repository | string | `"cr.flyte.org/flyteorg/datacatalog"` | Docker image for Datacatalog deployment | -| datacatalog.image.tag | string | `"v1.12.0"` | Docker image tag | +| datacatalog.image.tag | string | `"v1.12.1-rc0"` | Docker image tag | | datacatalog.nodeSelector | object | `{}` | nodeSelector for Datacatalog deployment | | datacatalog.podAnnotations | object | `{}` | Annotations for Datacatalog pods | | datacatalog.podEnv | object | `{}` | Additional Datacatalog container environment variables | @@ -166,7 +166,7 @@ helm install gateway bitnami/contour -n flyte | flyteadmin.extraArgs | object | `{}` | Appends extra command line arguments to the serve command | | flyteadmin.image.pullPolicy | string | `"IfNotPresent"` | | | flyteadmin.image.repository | string | `"cr.flyte.org/flyteorg/flyteadmin"` | Docker image for Flyteadmin deployment | -| flyteadmin.image.tag | string | `"v1.12.0"` | | +| flyteadmin.image.tag | string | `"v1.12.1-rc0"` | | | flyteadmin.initialProjects | list | `["flytesnacks","flytetester","flyteexamples"]` | Initial projects to create | | flyteadmin.nodeSelector | object | `{}` | nodeSelector for Flyteadmin deployment | | flyteadmin.podAnnotations | object | `{}` | Annotations for Flyteadmin pods | @@ -207,7 +207,7 @@ helm install gateway bitnami/contour -n flyte | flyteconsole.ga.tracking_id | string | `"G-0QW4DJWJ20"` | | | flyteconsole.image.pullPolicy | string | `"IfNotPresent"` | | | flyteconsole.image.repository | string | `"cr.flyte.org/flyteorg/flyteconsole"` | Docker image for Flyteconsole deployment | -| flyteconsole.image.tag | string | `"v1.12.2"` | | +| flyteconsole.image.tag | string | `"v1.14.0"` | | | flyteconsole.imagePullSecrets | list | `[]` | ImagePullSecrets to assign to the Flyteconsole deployment | | flyteconsole.nodeSelector | object | `{}` | nodeSelector for Flyteconsole deployment | | flyteconsole.podAnnotations | object | `{}` | Annotations for Flyteconsole pods | @@ -231,7 +231,7 @@ helm install gateway bitnami/contour -n flyte | flytepropeller.extraArgs | object | `{}` | Appends extra command line arguments to the main command | | flytepropeller.image.pullPolicy | string | `"IfNotPresent"` | | | flytepropeller.image.repository | string | `"cr.flyte.org/flyteorg/flytepropeller"` | Docker image for Flytepropeller deployment | -| flytepropeller.image.tag | string | `"v1.12.0"` | | +| flytepropeller.image.tag | string | `"v1.12.1-rc0"` | | | flytepropeller.manager | bool | `false` | | | flytepropeller.nodeSelector | object | `{}` | nodeSelector for Flytepropeller deployment | | flytepropeller.podAnnotations | object | `{}` | Annotations for Flytepropeller pods | @@ -262,7 +262,7 @@ helm install gateway bitnami/contour -n flyte | flytescheduler.configPath | string | `"/etc/flyte/config/*.yaml"` | Default regex string for searching configuration files | | flytescheduler.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | flytescheduler.image.repository | string | `"cr.flyte.org/flyteorg/flytescheduler"` | Docker image for Flytescheduler deployment | -| flytescheduler.image.tag | string | `"v1.12.0"` | Docker image tag | +| flytescheduler.image.tag | string | `"v1.12.1-rc0"` | Docker image tag | | flytescheduler.nodeSelector | object | `{}` | nodeSelector for Flytescheduler deployment | | flytescheduler.podAnnotations | object | `{}` | Annotations for Flytescheduler pods | | flytescheduler.podEnv | object | `{}` | Additional Flytescheduler container environment variables | diff --git a/charts/flyte-core/values.yaml b/charts/flyte-core/values.yaml index 4dd0fdf615..b7f390a45e 100755 --- a/charts/flyte-core/values.yaml +++ b/charts/flyte-core/values.yaml @@ -16,7 +16,7 @@ flyteadmin: image: # -- Docker image for Flyteadmin deployment repository: cr.flyte.org/flyteorg/flyteadmin # FLYTEADMIN_IMAGE - tag: v1.12.0 # FLYTEADMIN_TAG + tag: v1.12.1-rc0 # FLYTEADMIN_TAG pullPolicy: IfNotPresent # -- Additional flyteadmin container environment variables # @@ -144,7 +144,7 @@ flytescheduler: # -- Docker image for Flytescheduler deployment repository: cr.flyte.org/flyteorg/flytescheduler # FLYTESCHEDULER_IMAGE # -- Docker image tag - tag: v1.12.0 # FLYTESCHEDULER_TAG + tag: v1.12.1-rc0 # FLYTESCHEDULER_TAG # -- Docker image pull policy pullPolicy: IfNotPresent # -- Default resources requests and limits for Flytescheduler deployment @@ -210,7 +210,7 @@ datacatalog: # -- Docker image for Datacatalog deployment repository: cr.flyte.org/flyteorg/datacatalog # DATACATALOG_IMAGE # -- Docker image tag - tag: v1.12.0 # DATACATALOG_TAG + tag: v1.12.1-rc0 # DATACATALOG_TAG # -- Docker image pull policy pullPolicy: IfNotPresent # -- Default resources requests and limits for Datacatalog deployment @@ -309,7 +309,7 @@ flytepropeller: image: # -- Docker image for Flytepropeller deployment repository: cr.flyte.org/flyteorg/flytepropeller # FLYTEPROPELLER_IMAGE - tag: v1.12.0 # FLYTEPROPELLER_TAG + tag: v1.12.1-rc0 # FLYTEPROPELLER_TAG pullPolicy: IfNotPresent # -- Default resources requests and limits for Flytepropeller deployment resources: @@ -394,7 +394,7 @@ flyteconsole: image: # -- Docker image for Flyteconsole deployment repository: cr.flyte.org/flyteorg/flyteconsole # FLYTECONSOLE_IMAGE - tag: v1.12.2 # FLYTECONSOLE_TAG + tag: v1.14.0 # FLYTECONSOLE_TAG pullPolicy: IfNotPresent # -- Default resources requests and limits for Flyteconsole deployment resources: @@ -752,7 +752,7 @@ configmap: # -- Structure documented [here](https://pkg.go.dev/github.com/lyft/flyteplugins@v0.5.28/go/tasks/pluginmachinery/flytek8s/config#FlyteCoPilotConfig) co-pilot: name: flyte-copilot- - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 # FLYTECOPILOT_IMAGE + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 # FLYTECOPILOT_IMAGE start-timeout: 30s # -- Core propeller configuration diff --git a/charts/flyte/README.md b/charts/flyte/README.md index 73b72caf09..30c060babb 100644 --- a/charts/flyte/README.md +++ b/charts/flyte/README.md @@ -71,7 +71,7 @@ helm upgrade -f values-sandbox.yaml flyte . | contour.tolerations | list | `[]` | tolerations for Contour deployment | | daskoperator | object | `{"enabled":false}` | Optional: Dask Plugin using the Dask Operator | | daskoperator.enabled | bool | `false` | - enable or disable the dask operator deployment installation | -| flyte | object | `{"cluster_resource_manager":{"config":{"cluster_resources":{"customData":[{"production":[{"projectQuotaCpu":{"value":"5"}},{"projectQuotaMemory":{"value":"4000Mi"}}]},{"staging":[{"projectQuotaCpu":{"value":"2"}},{"projectQuotaMemory":{"value":"3000Mi"}}]},{"development":[{"projectQuotaCpu":{"value":"4"}},{"projectQuotaMemory":{"value":"3000Mi"}}]}],"refresh":"5m","refreshInterval":"5m","standaloneDeployment":false,"templatePath":"/etc/flyte/clusterresource/templates"}},"enabled":true,"service_account_name":"flyteadmin","templates":[{"key":"aa_namespace","value":"apiVersion: v1\nkind: Namespace\nmetadata:\n name: {{ namespace }}\nspec:\n finalizers:\n - kubernetes\n"},{"key":"ab_project_resource_quota","value":"apiVersion: v1\nkind: ResourceQuota\nmetadata:\n name: project-quota\n namespace: {{ namespace }}\nspec:\n hard:\n limits.cpu: {{ projectQuotaCpu }}\n limits.memory: {{ projectQuotaMemory }}\n"}]},"common":{"databaseSecret":{"name":"","secretManifest":{}},"flyteNamespaceTemplate":{"enabled":false},"ingress":{"albSSLRedirect":false,"annotations":{"nginx.ingress.kubernetes.io/app-root":"/console"},"enabled":true,"host":"","separateGrpcIngress":false,"separateGrpcIngressAnnotations":{"nginx.ingress.kubernetes.io/backend-protocol":"GRPC"},"tls":{"enabled":false},"webpackHMR":true}},"configmap":{"adminServer":{"auth":{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}},"flyteadmin":{"eventVersion":2,"metadataStoragePrefix":["metadata","admin"],"metricsScope":"flyte:","profilerPort":10254,"roleNameKey":"iam.amazonaws.com/role","testing":{"host":"http://flyteadmin"}},"server":{"grpc":{"port":8089},"httpPort":8088,"security":{"allowCors":true,"allowedHeaders":["Content-Type","flyte-authorization"],"allowedOrigins":["*"],"secure":false,"useAuth":false}}},"catalog":{"catalog-cache":{"endpoint":"datacatalog:89","insecure":true,"type":"datacatalog"}},"console":{"BASE_URL":"/console","CONFIG_DIR":"/etc/flyte/config"},"copilot":{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.0","name":"flyte-copilot-","start-timeout":"30s"}}}},"core":{"propeller":{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"},"webhook":{"certDir":"/etc/webhook/certs","serviceName":"flyte-pod-webhook"}},"datacatalogServer":{"application":{"grpcPort":8089,"grpcServerReflection":true,"httpPort":8080},"datacatalog":{"metrics-scope":"datacatalog","profiler-port":10254,"storage-prefix":"metadata/datacatalog"}},"domain":{"domains":[{"id":"development","name":"development"},{"id":"staging","name":"staging"},{"id":"production","name":"production"}]},"enabled_plugins":{"tasks":{"task-plugins":{"default-for-task-types":{"container":"container","container_array":"k8s-array","sensor":"agent-service","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service"]}}},"k8s":{"plugins":{"k8s":{"default-cpus":"100m","default-env-from-configmaps":[],"default-env-from-secrets":[],"default-env-vars":[{"FLYTE_AWS_ENDPOINT":"http://minio.flyte:9000"},{"FLYTE_AWS_ACCESS_KEY_ID":"minio"},{"FLYTE_AWS_SECRET_ACCESS_KEY":"miniostorage"}],"default-memory":"200Mi"}}},"logger":{"logger":{"level":5,"show-source":true}},"remoteData":{"remoteData":{"region":"us-east-1","scheme":"local","signedUrls":{"durationMinutes":3}}},"resource_manager":{"propeller":{"resourcemanager":{"redis":null,"type":"noop"}}},"task_logs":{"plugins":{"logs":{"cloudwatch-enabled":false,"kubernetes-enabled":true,"kubernetes-template-uri":"http://localhost:30082/#/log/{{ \"{{\" }} .namespace {{ \"}}\" }}/{{ \"{{\" }} .podName {{ \"}}\" }}/pod?namespace={{ \"{{\" }} .namespace {{ \"}}\" }}"}}},"task_resource_defaults":{"task_resources":{"defaults":{"cpu":"100m","memory":"200Mi","storage":"5Mi"},"limits":{"cpu":2,"gpu":1,"memory":"1Gi","storage":"20Mi"}}}},"datacatalog":{"affinity":{},"configPath":"/etc/datacatalog/config/*.yaml","image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/datacatalog","tag":"v1.12.0"},"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"500m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"service":{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"type":"NodePort"},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"db":{"admin":{"database":{"dbname":"flyteadmin","host":"postgres","port":5432,"username":"postgres"}},"datacatalog":{"database":{"dbname":"datacatalog","host":"postgres","port":5432,"username":"postgres"}}},"deployRedoc":true,"flyteadmin":{"additionalVolumeMounts":[],"additionalVolumes":[],"affinity":{},"configPath":"/etc/flyte/config/*.yaml","env":[],"image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flyteadmin","tag":"v1.12.0"},"initialProjects":["flytesnacks","flytetester","flyteexamples"],"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"250m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"secrets":{},"service":{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"loadBalancerSourceRanges":[],"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"flyteconsole":{"affinity":{},"ga":{"enabled":true,"tracking_id":"G-0QW4DJWJ20"},"image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flyteconsole","tag":"v1.12.2"},"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"500m","memory":"275Mi"},"requests":{"cpu":"10m","memory":"250Mi"}},"service":{"annotations":{},"type":"ClusterIP"},"tolerations":[]},"flytepropeller":{"affinity":{},"cacheSizeMbs":0,"configPath":"/etc/flyte/config/*.yaml","image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flytepropeller","tag":"v1.12.0"},"manager":false,"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"200m","ephemeral-storage":"100Mi","memory":"200Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"flytescheduler":{"affinity":{},"configPath":"/etc/flyte/config/*.yaml","image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flytescheduler","tag":"v1.12.0"},"nodeSelector":{},"podAnnotations":{},"resources":{"limits":{"cpu":"250m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"secrets":{},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"storage":{"bucketName":"my-s3-bucket","custom":{},"gcs":null,"s3":{"region":"us-east-1"},"type":"sandbox"},"webhook":{"enabled":true,"service":{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]}},"workflow_notifications":{"config":{},"enabled":false},"workflow_scheduler":{"enabled":true,"type":"native"}}` | ------------------------------------------------------------------- Core System settings This section consists of Core components of Flyte and their deployment settings. This includes FlyteAdmin service, Datacatalog, FlytePropeller and Flyteconsole | +| flyte | object | `{"cluster_resource_manager":{"config":{"cluster_resources":{"customData":[{"production":[{"projectQuotaCpu":{"value":"5"}},{"projectQuotaMemory":{"value":"4000Mi"}}]},{"staging":[{"projectQuotaCpu":{"value":"2"}},{"projectQuotaMemory":{"value":"3000Mi"}}]},{"development":[{"projectQuotaCpu":{"value":"4"}},{"projectQuotaMemory":{"value":"3000Mi"}}]}],"refresh":"5m","refreshInterval":"5m","standaloneDeployment":false,"templatePath":"/etc/flyte/clusterresource/templates"}},"enabled":true,"service_account_name":"flyteadmin","templates":[{"key":"aa_namespace","value":"apiVersion: v1\nkind: Namespace\nmetadata:\n name: {{ namespace }}\nspec:\n finalizers:\n - kubernetes\n"},{"key":"ab_project_resource_quota","value":"apiVersion: v1\nkind: ResourceQuota\nmetadata:\n name: project-quota\n namespace: {{ namespace }}\nspec:\n hard:\n limits.cpu: {{ projectQuotaCpu }}\n limits.memory: {{ projectQuotaMemory }}\n"}]},"common":{"databaseSecret":{"name":"","secretManifest":{}},"flyteNamespaceTemplate":{"enabled":false},"ingress":{"albSSLRedirect":false,"annotations":{"nginx.ingress.kubernetes.io/app-root":"/console"},"enabled":true,"host":"","separateGrpcIngress":false,"separateGrpcIngressAnnotations":{"nginx.ingress.kubernetes.io/backend-protocol":"GRPC"},"tls":{"enabled":false},"webpackHMR":true}},"configmap":{"adminServer":{"auth":{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}},"flyteadmin":{"eventVersion":2,"metadataStoragePrefix":["metadata","admin"],"metricsScope":"flyte:","profilerPort":10254,"roleNameKey":"iam.amazonaws.com/role","testing":{"host":"http://flyteadmin"}},"server":{"grpc":{"port":8089},"httpPort":8088,"security":{"allowCors":true,"allowedHeaders":["Content-Type","flyte-authorization"],"allowedOrigins":["*"],"secure":false,"useAuth":false}}},"catalog":{"catalog-cache":{"endpoint":"datacatalog:89","insecure":true,"type":"datacatalog"}},"console":{"BASE_URL":"/console","CONFIG_DIR":"/etc/flyte/config"},"copilot":{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0","name":"flyte-copilot-","start-timeout":"30s"}}}},"core":{"propeller":{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"},"webhook":{"certDir":"/etc/webhook/certs","serviceName":"flyte-pod-webhook"}},"datacatalogServer":{"application":{"grpcPort":8089,"grpcServerReflection":true,"httpPort":8080},"datacatalog":{"metrics-scope":"datacatalog","profiler-port":10254,"storage-prefix":"metadata/datacatalog"}},"domain":{"domains":[{"id":"development","name":"development"},{"id":"staging","name":"staging"},{"id":"production","name":"production"}]},"enabled_plugins":{"tasks":{"task-plugins":{"default-for-task-types":{"container":"container","container_array":"k8s-array","sensor":"agent-service","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service"]}}},"k8s":{"plugins":{"k8s":{"default-cpus":"100m","default-env-from-configmaps":[],"default-env-from-secrets":[],"default-env-vars":[{"FLYTE_AWS_ENDPOINT":"http://minio.flyte:9000"},{"FLYTE_AWS_ACCESS_KEY_ID":"minio"},{"FLYTE_AWS_SECRET_ACCESS_KEY":"miniostorage"}],"default-memory":"200Mi"}}},"logger":{"logger":{"level":5,"show-source":true}},"remoteData":{"remoteData":{"region":"us-east-1","scheme":"local","signedUrls":{"durationMinutes":3}}},"resource_manager":{"propeller":{"resourcemanager":{"redis":null,"type":"noop"}}},"task_logs":{"plugins":{"logs":{"cloudwatch-enabled":false,"kubernetes-enabled":true,"kubernetes-template-uri":"http://localhost:30082/#/log/{{ \"{{\" }} .namespace {{ \"}}\" }}/{{ \"{{\" }} .podName {{ \"}}\" }}/pod?namespace={{ \"{{\" }} .namespace {{ \"}}\" }}"}}},"task_resource_defaults":{"task_resources":{"defaults":{"cpu":"100m","memory":"200Mi","storage":"5Mi"},"limits":{"cpu":2,"gpu":1,"memory":"1Gi","storage":"20Mi"}}}},"datacatalog":{"affinity":{},"configPath":"/etc/datacatalog/config/*.yaml","image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/datacatalog","tag":"v1.12.1-rc0"},"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"500m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"service":{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"type":"NodePort"},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"db":{"admin":{"database":{"dbname":"flyteadmin","host":"postgres","port":5432,"username":"postgres"}},"datacatalog":{"database":{"dbname":"datacatalog","host":"postgres","port":5432,"username":"postgres"}}},"deployRedoc":true,"flyteadmin":{"additionalVolumeMounts":[],"additionalVolumes":[],"affinity":{},"configPath":"/etc/flyte/config/*.yaml","env":[],"image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flyteadmin","tag":"v1.12.1-rc0"},"initialProjects":["flytesnacks","flytetester","flyteexamples"],"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"250m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"secrets":{},"service":{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"loadBalancerSourceRanges":[],"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"flyteconsole":{"affinity":{},"ga":{"enabled":true,"tracking_id":"G-0QW4DJWJ20"},"image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flyteconsole","tag":"v1.14.0"},"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"500m","memory":"275Mi"},"requests":{"cpu":"10m","memory":"250Mi"}},"service":{"annotations":{},"type":"ClusterIP"},"tolerations":[]},"flytepropeller":{"affinity":{},"cacheSizeMbs":0,"configPath":"/etc/flyte/config/*.yaml","image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flytepropeller","tag":"v1.12.1-rc0"},"manager":false,"nodeSelector":{},"podAnnotations":{},"replicaCount":1,"resources":{"limits":{"cpu":"200m","ephemeral-storage":"100Mi","memory":"200Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"flytescheduler":{"affinity":{},"configPath":"/etc/flyte/config/*.yaml","image":{"pullPolicy":"IfNotPresent","repository":"cr.flyte.org/flyteorg/flytescheduler","tag":"v1.12.1-rc0"},"nodeSelector":{},"podAnnotations":{},"resources":{"limits":{"cpu":"250m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}},"secrets":{},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]},"tolerations":[]},"storage":{"bucketName":"my-s3-bucket","custom":{},"gcs":null,"s3":{"region":"us-east-1"},"type":"sandbox"},"webhook":{"enabled":true,"service":{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"imagePullSecrets":[]}},"workflow_notifications":{"config":{},"enabled":false},"workflow_scheduler":{"enabled":true,"type":"native"}}` | ------------------------------------------------------------------- Core System settings This section consists of Core components of Flyte and their deployment settings. This includes FlyteAdmin service, Datacatalog, FlytePropeller and Flyteconsole | | flyte.cluster_resource_manager | object | `{"config":{"cluster_resources":{"customData":[{"production":[{"projectQuotaCpu":{"value":"5"}},{"projectQuotaMemory":{"value":"4000Mi"}}]},{"staging":[{"projectQuotaCpu":{"value":"2"}},{"projectQuotaMemory":{"value":"3000Mi"}}]},{"development":[{"projectQuotaCpu":{"value":"4"}},{"projectQuotaMemory":{"value":"3000Mi"}}]}],"refresh":"5m","refreshInterval":"5m","standaloneDeployment":false,"templatePath":"/etc/flyte/clusterresource/templates"}},"enabled":true,"service_account_name":"flyteadmin","templates":[{"key":"aa_namespace","value":"apiVersion: v1\nkind: Namespace\nmetadata:\n name: {{ namespace }}\nspec:\n finalizers:\n - kubernetes\n"},{"key":"ab_project_resource_quota","value":"apiVersion: v1\nkind: ResourceQuota\nmetadata:\n name: project-quota\n namespace: {{ namespace }}\nspec:\n hard:\n limits.cpu: {{ projectQuotaCpu }}\n limits.memory: {{ projectQuotaMemory }}\n"}]}` | Configuration for the Cluster resource manager component. This is an optional component, that enables automatic cluster configuration. This is useful to set default quotas, manage namespaces etc that map to a project/domain | | flyte.cluster_resource_manager.config.cluster_resources | object | `{"customData":[{"production":[{"projectQuotaCpu":{"value":"5"}},{"projectQuotaMemory":{"value":"4000Mi"}}]},{"staging":[{"projectQuotaCpu":{"value":"2"}},{"projectQuotaMemory":{"value":"3000Mi"}}]},{"development":[{"projectQuotaCpu":{"value":"4"}},{"projectQuotaMemory":{"value":"3000Mi"}}]}],"refresh":"5m","refreshInterval":"5m","standaloneDeployment":false,"templatePath":"/etc/flyte/clusterresource/templates"}` | ClusterResource parameters Refer to the [structure](https://pkg.go.dev/github.com/lyft/flyteadmin@v0.3.37/pkg/runtime/interfaces#ClusterResourceConfig) to customize. | | flyte.cluster_resource_manager.config.cluster_resources.standaloneDeployment | bool | `false` | Starts the cluster resource manager in standalone mode with requisite auth credentials to call flyteadmin service endpoints | @@ -91,15 +91,15 @@ helm upgrade -f values-sandbox.yaml flyte . | flyte.common.ingress.separateGrpcIngressAnnotations | object | `{"nginx.ingress.kubernetes.io/backend-protocol":"GRPC"}` | - Extra Ingress annotations applied only to the GRPC ingress. Only makes sense if `separateGrpcIngress` is enabled. | | flyte.common.ingress.tls | object | `{"enabled":false}` | - TLS Settings | | flyte.common.ingress.webpackHMR | bool | `true` | - Enable or disable HMR route to flyteconsole. This is useful only for frontend development. | -| flyte.configmap | object | `{"adminServer":{"auth":{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}},"flyteadmin":{"eventVersion":2,"metadataStoragePrefix":["metadata","admin"],"metricsScope":"flyte:","profilerPort":10254,"roleNameKey":"iam.amazonaws.com/role","testing":{"host":"http://flyteadmin"}},"server":{"grpc":{"port":8089},"httpPort":8088,"security":{"allowCors":true,"allowedHeaders":["Content-Type","flyte-authorization"],"allowedOrigins":["*"],"secure":false,"useAuth":false}}},"catalog":{"catalog-cache":{"endpoint":"datacatalog:89","insecure":true,"type":"datacatalog"}},"console":{"BASE_URL":"/console","CONFIG_DIR":"/etc/flyte/config"},"copilot":{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.0","name":"flyte-copilot-","start-timeout":"30s"}}}},"core":{"propeller":{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"},"webhook":{"certDir":"/etc/webhook/certs","serviceName":"flyte-pod-webhook"}},"datacatalogServer":{"application":{"grpcPort":8089,"grpcServerReflection":true,"httpPort":8080},"datacatalog":{"metrics-scope":"datacatalog","profiler-port":10254,"storage-prefix":"metadata/datacatalog"}},"domain":{"domains":[{"id":"development","name":"development"},{"id":"staging","name":"staging"},{"id":"production","name":"production"}]},"enabled_plugins":{"tasks":{"task-plugins":{"default-for-task-types":{"container":"container","container_array":"k8s-array","sensor":"agent-service","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service"]}}},"k8s":{"plugins":{"k8s":{"default-cpus":"100m","default-env-from-configmaps":[],"default-env-from-secrets":[],"default-env-vars":[{"FLYTE_AWS_ENDPOINT":"http://minio.flyte:9000"},{"FLYTE_AWS_ACCESS_KEY_ID":"minio"},{"FLYTE_AWS_SECRET_ACCESS_KEY":"miniostorage"}],"default-memory":"200Mi"}}},"logger":{"logger":{"level":5,"show-source":true}},"remoteData":{"remoteData":{"region":"us-east-1","scheme":"local","signedUrls":{"durationMinutes":3}}},"resource_manager":{"propeller":{"resourcemanager":{"redis":null,"type":"noop"}}},"task_logs":{"plugins":{"logs":{"cloudwatch-enabled":false,"kubernetes-enabled":true,"kubernetes-template-uri":"http://localhost:30082/#/log/{{ \"{{\" }} .namespace {{ \"}}\" }}/{{ \"{{\" }} .podName {{ \"}}\" }}/pod?namespace={{ \"{{\" }} .namespace {{ \"}}\" }}"}}},"task_resource_defaults":{"task_resources":{"defaults":{"cpu":"100m","memory":"200Mi","storage":"5Mi"},"limits":{"cpu":2,"gpu":1,"memory":"1Gi","storage":"20Mi"}}}}` | ----------------------------------------------------------------- CONFIGMAPS SETTINGS | +| flyte.configmap | object | `{"adminServer":{"auth":{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}},"flyteadmin":{"eventVersion":2,"metadataStoragePrefix":["metadata","admin"],"metricsScope":"flyte:","profilerPort":10254,"roleNameKey":"iam.amazonaws.com/role","testing":{"host":"http://flyteadmin"}},"server":{"grpc":{"port":8089},"httpPort":8088,"security":{"allowCors":true,"allowedHeaders":["Content-Type","flyte-authorization"],"allowedOrigins":["*"],"secure":false,"useAuth":false}}},"catalog":{"catalog-cache":{"endpoint":"datacatalog:89","insecure":true,"type":"datacatalog"}},"console":{"BASE_URL":"/console","CONFIG_DIR":"/etc/flyte/config"},"copilot":{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0","name":"flyte-copilot-","start-timeout":"30s"}}}},"core":{"propeller":{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"},"webhook":{"certDir":"/etc/webhook/certs","serviceName":"flyte-pod-webhook"}},"datacatalogServer":{"application":{"grpcPort":8089,"grpcServerReflection":true,"httpPort":8080},"datacatalog":{"metrics-scope":"datacatalog","profiler-port":10254,"storage-prefix":"metadata/datacatalog"}},"domain":{"domains":[{"id":"development","name":"development"},{"id":"staging","name":"staging"},{"id":"production","name":"production"}]},"enabled_plugins":{"tasks":{"task-plugins":{"default-for-task-types":{"container":"container","container_array":"k8s-array","sensor":"agent-service","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service"]}}},"k8s":{"plugins":{"k8s":{"default-cpus":"100m","default-env-from-configmaps":[],"default-env-from-secrets":[],"default-env-vars":[{"FLYTE_AWS_ENDPOINT":"http://minio.flyte:9000"},{"FLYTE_AWS_ACCESS_KEY_ID":"minio"},{"FLYTE_AWS_SECRET_ACCESS_KEY":"miniostorage"}],"default-memory":"200Mi"}}},"logger":{"logger":{"level":5,"show-source":true}},"remoteData":{"remoteData":{"region":"us-east-1","scheme":"local","signedUrls":{"durationMinutes":3}}},"resource_manager":{"propeller":{"resourcemanager":{"redis":null,"type":"noop"}}},"task_logs":{"plugins":{"logs":{"cloudwatch-enabled":false,"kubernetes-enabled":true,"kubernetes-template-uri":"http://localhost:30082/#/log/{{ \"{{\" }} .namespace {{ \"}}\" }}/{{ \"{{\" }} .podName {{ \"}}\" }}/pod?namespace={{ \"{{\" }} .namespace {{ \"}}\" }}"}}},"task_resource_defaults":{"task_resources":{"defaults":{"cpu":"100m","memory":"200Mi","storage":"5Mi"},"limits":{"cpu":2,"gpu":1,"memory":"1Gi","storage":"20Mi"}}}}` | ----------------------------------------------------------------- CONFIGMAPS SETTINGS | | flyte.configmap.adminServer | object | `{"auth":{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}},"flyteadmin":{"eventVersion":2,"metadataStoragePrefix":["metadata","admin"],"metricsScope":"flyte:","profilerPort":10254,"roleNameKey":"iam.amazonaws.com/role","testing":{"host":"http://flyteadmin"}},"server":{"grpc":{"port":8089},"httpPort":8088,"security":{"allowCors":true,"allowedHeaders":["Content-Type","flyte-authorization"],"allowedOrigins":["*"],"secure":false,"useAuth":false}}}` | FlyteAdmin server configuration | | flyte.configmap.adminServer.auth | object | `{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}}` | Authentication configuration | | flyte.configmap.adminServer.server.security.secure | bool | `false` | Controls whether to serve requests over SSL/TLS. | | flyte.configmap.adminServer.server.security.useAuth | bool | `false` | Controls whether to enforce authentication. Follow the guide in https://docs.flyte.org/ on how to setup authentication. | | flyte.configmap.catalog | object | `{"catalog-cache":{"endpoint":"datacatalog:89","insecure":true,"type":"datacatalog"}}` | Catalog Client configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/catalog#Config) Additional advanced Catalog configuration [here](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/pluginmachinery/catalog#Config) | | flyte.configmap.console | object | `{"BASE_URL":"/console","CONFIG_DIR":"/etc/flyte/config"}` | Configuration for Flyte console UI | -| flyte.configmap.copilot | object | `{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.0","name":"flyte-copilot-","start-timeout":"30s"}}}}` | Copilot configuration | -| flyte.configmap.copilot.plugins.k8s.co-pilot | object | `{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.0","name":"flyte-copilot-","start-timeout":"30s"}` | Structure documented [here](https://pkg.go.dev/github.com/lyft/flyteplugins@v0.5.28/go/tasks/pluginmachinery/flytek8s/config#FlyteCoPilotConfig) | +| flyte.configmap.copilot | object | `{"plugins":{"k8s":{"co-pilot":{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0","name":"flyte-copilot-","start-timeout":"30s"}}}}` | Copilot configuration | +| flyte.configmap.copilot.plugins.k8s.co-pilot | object | `{"image":"cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0","name":"flyte-copilot-","start-timeout":"30s"}` | Structure documented [here](https://pkg.go.dev/github.com/lyft/flyteplugins@v0.5.28/go/tasks/pluginmachinery/flytek8s/config#FlyteCoPilotConfig) | | flyte.configmap.core | object | `{"propeller":{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"},"webhook":{"certDir":"/etc/webhook/certs","serviceName":"flyte-pod-webhook"}}` | Core propeller configuration | | flyte.configmap.core.propeller | object | `{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"}` | follows the structure specified [here](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/config). | | flyte.configmap.datacatalogServer | object | `{"application":{"grpcPort":8089,"grpcServerReflection":true,"httpPort":8080},"datacatalog":{"metrics-scope":"datacatalog","profiler-port":10254,"storage-prefix":"metadata/datacatalog"}}` | Datacatalog server config | @@ -120,7 +120,7 @@ helm upgrade -f values-sandbox.yaml flyte . | flyte.datacatalog.configPath | string | `"/etc/datacatalog/config/*.yaml"` | Default regex string for searching configuration files | | flyte.datacatalog.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | flyte.datacatalog.image.repository | string | `"cr.flyte.org/flyteorg/datacatalog"` | Docker image for Datacatalog deployment | -| flyte.datacatalog.image.tag | string | `"v1.12.0"` | Docker image tag | +| flyte.datacatalog.image.tag | string | `"v1.12.1-rc0"` | Docker image tag | | flyte.datacatalog.nodeSelector | object | `{}` | nodeSelector for Datacatalog deployment | | flyte.datacatalog.podAnnotations | object | `{}` | Annotations for Datacatalog pods | | flyte.datacatalog.replicaCount | int | `1` | Replicas count for Datacatalog deployment | @@ -136,7 +136,7 @@ helm upgrade -f values-sandbox.yaml flyte . | flyte.flyteadmin.env | list | `[]` | Additional flyteadmin container environment variables e.g. SendGrid's API key - name: SENDGRID_API_KEY value: "" e.g. secret environment variable (you can combine it with .additionalVolumes): - name: SENDGRID_API_KEY valueFrom: secretKeyRef: name: sendgrid-secret key: api_key | | flyte.flyteadmin.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | flyte.flyteadmin.image.repository | string | `"cr.flyte.org/flyteorg/flyteadmin"` | Docker image for Flyteadmin deployment | -| flyte.flyteadmin.image.tag | string | `"v1.12.0"` | Docker image tag | +| flyte.flyteadmin.image.tag | string | `"v1.12.1-rc0"` | Docker image tag | | flyte.flyteadmin.initialProjects | list | `["flytesnacks","flytetester","flyteexamples"]` | Initial projects to create | | flyte.flyteadmin.nodeSelector | object | `{}` | nodeSelector for Flyteadmin deployment | | flyte.flyteadmin.podAnnotations | object | `{}` | Annotations for Flyteadmin pods | @@ -151,7 +151,7 @@ helm upgrade -f values-sandbox.yaml flyte . | flyte.flyteconsole.affinity | object | `{}` | affinity for Flyteconsole deployment | | flyte.flyteconsole.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | flyte.flyteconsole.image.repository | string | `"cr.flyte.org/flyteorg/flyteconsole"` | Docker image for Flyteconsole deployment | -| flyte.flyteconsole.image.tag | string | `"v1.12.2"` | Docker image tag | +| flyte.flyteconsole.image.tag | string | `"v1.14.0"` | Docker image tag | | flyte.flyteconsole.nodeSelector | object | `{}` | nodeSelector for Flyteconsole deployment | | flyte.flyteconsole.podAnnotations | object | `{}` | Annotations for Flyteconsole pods | | flyte.flyteconsole.replicaCount | int | `1` | Replicas count for Flyteconsole deployment | @@ -162,7 +162,7 @@ helm upgrade -f values-sandbox.yaml flyte . | flyte.flytepropeller.configPath | string | `"/etc/flyte/config/*.yaml"` | Default regex string for searching configuration files | | flyte.flytepropeller.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | flyte.flytepropeller.image.repository | string | `"cr.flyte.org/flyteorg/flytepropeller"` | Docker image for Flytepropeller deployment | -| flyte.flytepropeller.image.tag | string | `"v1.12.0"` | Docker image tag | +| flyte.flytepropeller.image.tag | string | `"v1.12.1-rc0"` | Docker image tag | | flyte.flytepropeller.nodeSelector | object | `{}` | nodeSelector for Flytepropeller deployment | | flyte.flytepropeller.podAnnotations | object | `{}` | Annotations for Flytepropeller pods | | flyte.flytepropeller.replicaCount | int | `1` | Replicas count for Flytepropeller deployment | @@ -176,7 +176,7 @@ helm upgrade -f values-sandbox.yaml flyte . | flyte.flytescheduler.configPath | string | `"/etc/flyte/config/*.yaml"` | Default regex string for searching configuration files | | flyte.flytescheduler.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | flyte.flytescheduler.image.repository | string | `"cr.flyte.org/flyteorg/flytescheduler"` | Docker image for Flytescheduler deployment | -| flyte.flytescheduler.image.tag | string | `"v1.12.0"` | Docker image tag | +| flyte.flytescheduler.image.tag | string | `"v1.12.1-rc0"` | Docker image tag | | flyte.flytescheduler.nodeSelector | object | `{}` | nodeSelector for Flytescheduler deployment | | flyte.flytescheduler.podAnnotations | object | `{}` | Annotations for Flytescheduler pods | | flyte.flytescheduler.resources | object | `{"limits":{"cpu":"250m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}}` | Default resources requests and limits for Flytescheduler deployment | diff --git a/charts/flyte/values.yaml b/charts/flyte/values.yaml index 9a18be56f6..8a28735828 100755 --- a/charts/flyte/values.yaml +++ b/charts/flyte/values.yaml @@ -15,7 +15,7 @@ flyte: # -- Docker image for Flyteadmin deployment repository: cr.flyte.org/flyteorg/flyteadmin # FLYTEADMIN_IMAGE # -- Docker image tag - tag: v1.12.0 # FLYTEADMIN_TAG + tag: v1.12.1-rc0 # FLYTEADMIN_TAG # -- Docker image pull policy pullPolicy: IfNotPresent # -- Additional flyteadmin container environment variables @@ -83,7 +83,7 @@ flyte: # -- Docker image for Flytescheduler deployment repository: cr.flyte.org/flyteorg/flytescheduler # FLYTESCHEDULER_IMAGE # -- Docker image tag - tag: v1.12.0 # FLYTESCHEDULER_TAG + tag: v1.12.1-rc0 # FLYTESCHEDULER_TAG # -- Docker image pull policy pullPolicy: IfNotPresent # -- Default resources requests and limits for Flytescheduler deployment @@ -128,7 +128,7 @@ flyte: # -- Docker image for Datacatalog deployment repository: cr.flyte.org/flyteorg/datacatalog # DATACATALOG_IMAGE # -- Docker image tag - tag: v1.12.0 # DATACATALOG_TAG + tag: v1.12.1-rc0 # DATACATALOG_TAG # -- Docker image pull policy pullPolicy: IfNotPresent # -- Default resources requests and limits for Datacatalog deployment @@ -177,7 +177,7 @@ flyte: # -- Docker image for Flytepropeller deployment repository: cr.flyte.org/flyteorg/flytepropeller # FLYTEPROPELLER_IMAGE # -- Docker image tag - tag: v1.12.0 # FLYTEPROPELLER_TAG + tag: v1.12.1-rc0 # FLYTEPROPELLER_TAG # -- Docker image pull policy pullPolicy: IfNotPresent # -- Default resources requests and limits for Flytepropeller deployment @@ -222,7 +222,7 @@ flyte: # -- Docker image for Flyteconsole deployment repository: cr.flyte.org/flyteorg/flyteconsole # FLYTECONSOLE_IMAGE # -- Docker image tag - tag: v1.12.2 # FLYTECONSOLE_TAG + tag: v1.14.0 # FLYTECONSOLE_TAG # -- Docker image pull policy pullPolicy: IfNotPresent # -- Default resources requests and limits for Flyteconsole deployment @@ -471,7 +471,7 @@ flyte: # -- Structure documented [here](https://pkg.go.dev/github.com/lyft/flyteplugins@v0.5.28/go/tasks/pluginmachinery/flytek8s/config#FlyteCoPilotConfig) co-pilot: name: flyte-copilot- - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 # FLYTECOPILOT_IMAGE + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 # FLYTECOPILOT_IMAGE start-timeout: 30s # -- Core propeller configuration diff --git a/charts/flyteagent/README.md b/charts/flyteagent/README.md index 18cc0a9ef9..c9619c8403 100644 --- a/charts/flyteagent/README.md +++ b/charts/flyteagent/README.md @@ -20,7 +20,7 @@ A Helm chart for Flyte agent | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | image.repository | string | `"ghcr.io/flyteorg/flyteagent"` | Docker image for flyteagent deployment | -| image.tag | string | `"1.11.0"` | Docker image tag | +| image.tag | string | `"1.12.1-rc0"` | Docker image tag | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | nodeSelector for flyteagent deployment | | podAnnotations | object | `{}` | Annotations for flyteagent pods | diff --git a/charts/flyteagent/values.yaml b/charts/flyteagent/values.yaml index ecfc08e40a..4d02d59454 100755 --- a/charts/flyteagent/values.yaml +++ b/charts/flyteagent/values.yaml @@ -23,7 +23,7 @@ image: # -- Docker image for flyteagent deployment repository: ghcr.io/flyteorg/flyteagent # -- Docker image tag - tag: 1.11.0 # FLYTEAGENT_TAG + tag: 1.12.1-rc0 # FLYTEAGENT_TAG # -- Docker image pull policy pullPolicy: IfNotPresent ports: diff --git a/deployment/agent/flyte_agent_helm_generated.yaml b/deployment/agent/flyte_agent_helm_generated.yaml index 01f6f4fa86..565ac70464 100644 --- a/deployment/agent/flyte_agent_helm_generated.yaml +++ b/deployment/agent/flyte_agent_helm_generated.yaml @@ -78,7 +78,7 @@ spec: - pyflyte - serve - agent - image: "ghcr.io/flyteorg/flyteagent:1.11.0" + image: "ghcr.io/flyteorg/flyteagent:1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteagent volumeMounts: diff --git a/deployment/eks/flyte_aws_scheduler_helm_generated.yaml b/deployment/eks/flyte_aws_scheduler_helm_generated.yaml index ed1aca0b94..fadb80927f 100644 --- a/deployment/eks/flyte_aws_scheduler_helm_generated.yaml +++ b/deployment/eks/flyte_aws_scheduler_helm_generated.yaml @@ -430,7 +430,7 @@ data: plugins: k8s: co-pilot: - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 name: flyte-copilot- start-timeout: 30s core.yaml: | @@ -870,7 +870,7 @@ spec: - /etc/flyte/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations securityContext: @@ -891,7 +891,7 @@ spec: - flytesnacks - flytetester - flyteexamples - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: seed-projects securityContext: @@ -909,7 +909,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - sync - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources securityContext: @@ -926,7 +926,7 @@ spec: - mountPath: /etc/secrets/ name: admin-secrets - name: generate-secrets - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: ["/bin/sh", "-c"] args: @@ -953,7 +953,7 @@ spec: - --config - /etc/flyte/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteadmin ports: @@ -1058,7 +1058,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources volumeMounts: @@ -1114,7 +1114,7 @@ spec: seLinuxOptions: type: spc_t containers: - - image: "cr.flyte.org/flyteorg/flyteconsole:v1.12.2" + - image: "cr.flyte.org/flyteorg/flyteconsole:v1.14.0" imagePullPolicy: "IfNotPresent" name: flyteconsole envFrom: @@ -1188,7 +1188,7 @@ spec: - /etc/datacatalog/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations volumeMounts: @@ -1206,7 +1206,7 @@ spec: - --config - /etc/datacatalog/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: datacatalog ports: @@ -1269,7 +1269,7 @@ spec: template: metadata: annotations: - configChecksum: "30754d520f947609ef5d5093123c673af1437e3fedd2e55f9cb58ed457e8b79" + configChecksum: "045a4308f47bb9665d221d5d83667a7c9e05ca761134dc79fa8295dd8b611dd" labels: app.kubernetes.io/name: flytepropeller app.kubernetes.io/instance: flyte @@ -1295,7 +1295,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytepropeller ports: @@ -1349,9 +1349,9 @@ spec: labels: app: flyte-pod-webhook app.kubernetes.io/name: flyte-pod-webhook - app.kubernetes.io/version: v1.12.0 + app.kubernetes.io/version: v1.12.1-rc0 annotations: - configChecksum: "30754d520f947609ef5d5093123c673af1437e3fedd2e55f9cb58ed457e8b79" + configChecksum: "045a4308f47bb9665d221d5d83667a7c9e05ca761134dc79fa8295dd8b611dd" spec: securityContext: fsGroup: 65534 @@ -1363,7 +1363,7 @@ spec: serviceAccountName: flyte-pod-webhook initContainers: - name: generate-secrets - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller @@ -1390,7 +1390,7 @@ spec: mountPath: /etc/flyte/config containers: - name: webhook - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller diff --git a/deployment/eks/flyte_helm_controlplane_generated.yaml b/deployment/eks/flyte_helm_controlplane_generated.yaml index 133238300d..f110eda151 100644 --- a/deployment/eks/flyte_helm_controlplane_generated.yaml +++ b/deployment/eks/flyte_helm_controlplane_generated.yaml @@ -575,7 +575,7 @@ spec: - /etc/flyte/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations securityContext: @@ -596,7 +596,7 @@ spec: - flytesnacks - flytetester - flyteexamples - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: seed-projects securityContext: @@ -614,7 +614,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - sync - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources securityContext: @@ -631,7 +631,7 @@ spec: - mountPath: /etc/secrets/ name: admin-secrets - name: generate-secrets - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: ["/bin/sh", "-c"] args: @@ -658,7 +658,7 @@ spec: - --config - /etc/flyte/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteadmin ports: @@ -763,7 +763,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources volumeMounts: @@ -819,7 +819,7 @@ spec: seLinuxOptions: type: spc_t containers: - - image: "cr.flyte.org/flyteorg/flyteconsole:v1.12.2" + - image: "cr.flyte.org/flyteorg/flyteconsole:v1.14.0" imagePullPolicy: "IfNotPresent" name: flyteconsole envFrom: @@ -893,7 +893,7 @@ spec: - /etc/datacatalog/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations volumeMounts: @@ -911,7 +911,7 @@ spec: - --config - /etc/datacatalog/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: datacatalog ports: @@ -994,7 +994,7 @@ spec: - precheck - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler-check securityContext: @@ -1014,7 +1014,7 @@ spec: - run - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler ports: diff --git a/deployment/eks/flyte_helm_dataplane_generated.yaml b/deployment/eks/flyte_helm_dataplane_generated.yaml index 5ae4dee3f6..f7b146dd9f 100644 --- a/deployment/eks/flyte_helm_dataplane_generated.yaml +++ b/deployment/eks/flyte_helm_dataplane_generated.yaml @@ -94,7 +94,7 @@ data: plugins: k8s: co-pilot: - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 name: flyte-copilot- start-timeout: 30s core.yaml: | @@ -428,7 +428,7 @@ spec: template: metadata: annotations: - configChecksum: "30754d520f947609ef5d5093123c673af1437e3fedd2e55f9cb58ed457e8b79" + configChecksum: "045a4308f47bb9665d221d5d83667a7c9e05ca761134dc79fa8295dd8b611dd" labels: app.kubernetes.io/name: flytepropeller app.kubernetes.io/instance: flyte @@ -454,7 +454,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytepropeller ports: @@ -508,9 +508,9 @@ spec: labels: app: flyte-pod-webhook app.kubernetes.io/name: flyte-pod-webhook - app.kubernetes.io/version: v1.12.0 + app.kubernetes.io/version: v1.12.1-rc0 annotations: - configChecksum: "30754d520f947609ef5d5093123c673af1437e3fedd2e55f9cb58ed457e8b79" + configChecksum: "045a4308f47bb9665d221d5d83667a7c9e05ca761134dc79fa8295dd8b611dd" spec: securityContext: fsGroup: 65534 @@ -522,7 +522,7 @@ spec: serviceAccountName: flyte-pod-webhook initContainers: - name: generate-secrets - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller @@ -549,7 +549,7 @@ spec: mountPath: /etc/flyte/config containers: - name: webhook - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller diff --git a/deployment/eks/flyte_helm_generated.yaml b/deployment/eks/flyte_helm_generated.yaml index fc3cf6fe68..4aba6e7f3d 100644 --- a/deployment/eks/flyte_helm_generated.yaml +++ b/deployment/eks/flyte_helm_generated.yaml @@ -461,7 +461,7 @@ data: plugins: k8s: co-pilot: - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 name: flyte-copilot- start-timeout: 30s core.yaml: | @@ -901,7 +901,7 @@ spec: - /etc/flyte/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations securityContext: @@ -922,7 +922,7 @@ spec: - flytesnacks - flytetester - flyteexamples - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: seed-projects securityContext: @@ -940,7 +940,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - sync - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources securityContext: @@ -957,7 +957,7 @@ spec: - mountPath: /etc/secrets/ name: admin-secrets - name: generate-secrets - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: ["/bin/sh", "-c"] args: @@ -984,7 +984,7 @@ spec: - --config - /etc/flyte/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteadmin ports: @@ -1089,7 +1089,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources volumeMounts: @@ -1145,7 +1145,7 @@ spec: seLinuxOptions: type: spc_t containers: - - image: "cr.flyte.org/flyteorg/flyteconsole:v1.12.2" + - image: "cr.flyte.org/flyteorg/flyteconsole:v1.14.0" imagePullPolicy: "IfNotPresent" name: flyteconsole envFrom: @@ -1219,7 +1219,7 @@ spec: - /etc/datacatalog/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations volumeMounts: @@ -1237,7 +1237,7 @@ spec: - --config - /etc/datacatalog/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: datacatalog ports: @@ -1320,7 +1320,7 @@ spec: - precheck - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler-check securityContext: @@ -1340,7 +1340,7 @@ spec: - run - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler ports: @@ -1399,7 +1399,7 @@ spec: template: metadata: annotations: - configChecksum: "30754d520f947609ef5d5093123c673af1437e3fedd2e55f9cb58ed457e8b79" + configChecksum: "045a4308f47bb9665d221d5d83667a7c9e05ca761134dc79fa8295dd8b611dd" labels: app.kubernetes.io/name: flytepropeller app.kubernetes.io/instance: flyte @@ -1425,7 +1425,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytepropeller ports: @@ -1479,9 +1479,9 @@ spec: labels: app: flyte-pod-webhook app.kubernetes.io/name: flyte-pod-webhook - app.kubernetes.io/version: v1.12.0 + app.kubernetes.io/version: v1.12.1-rc0 annotations: - configChecksum: "30754d520f947609ef5d5093123c673af1437e3fedd2e55f9cb58ed457e8b79" + configChecksum: "045a4308f47bb9665d221d5d83667a7c9e05ca761134dc79fa8295dd8b611dd" spec: securityContext: fsGroup: 65534 @@ -1493,7 +1493,7 @@ spec: serviceAccountName: flyte-pod-webhook initContainers: - name: generate-secrets - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller @@ -1520,7 +1520,7 @@ spec: mountPath: /etc/flyte/config containers: - name: webhook - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller diff --git a/deployment/gcp/flyte_helm_controlplane_generated.yaml b/deployment/gcp/flyte_helm_controlplane_generated.yaml index 4d83f1c096..b227a9c0d0 100644 --- a/deployment/gcp/flyte_helm_controlplane_generated.yaml +++ b/deployment/gcp/flyte_helm_controlplane_generated.yaml @@ -590,7 +590,7 @@ spec: - /etc/flyte/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations securityContext: @@ -611,7 +611,7 @@ spec: - flytesnacks - flytetester - flyteexamples - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: seed-projects securityContext: @@ -629,7 +629,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - sync - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources securityContext: @@ -646,7 +646,7 @@ spec: - mountPath: /etc/secrets/ name: admin-secrets - name: generate-secrets - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: ["/bin/sh", "-c"] args: @@ -673,7 +673,7 @@ spec: - --config - /etc/flyte/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteadmin ports: @@ -778,7 +778,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources volumeMounts: @@ -834,7 +834,7 @@ spec: seLinuxOptions: type: spc_t containers: - - image: "cr.flyte.org/flyteorg/flyteconsole:v1.12.2" + - image: "cr.flyte.org/flyteorg/flyteconsole:v1.14.0" imagePullPolicy: "IfNotPresent" name: flyteconsole envFrom: @@ -908,7 +908,7 @@ spec: - /etc/datacatalog/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations volumeMounts: @@ -926,7 +926,7 @@ spec: - --config - /etc/datacatalog/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: datacatalog ports: @@ -1009,7 +1009,7 @@ spec: - precheck - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler-check securityContext: @@ -1029,7 +1029,7 @@ spec: - run - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler ports: diff --git a/deployment/gcp/flyte_helm_dataplane_generated.yaml b/deployment/gcp/flyte_helm_dataplane_generated.yaml index 8ef9a6b91a..0da528443f 100644 --- a/deployment/gcp/flyte_helm_dataplane_generated.yaml +++ b/deployment/gcp/flyte_helm_dataplane_generated.yaml @@ -94,7 +94,7 @@ data: plugins: k8s: co-pilot: - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 name: flyte-copilot- start-timeout: 30s core.yaml: | @@ -436,7 +436,7 @@ spec: template: metadata: annotations: - configChecksum: "8f59276def38db45b0f6b8fac2d1fb9218a92d3be145c11f431cb553f7c9b5d" + configChecksum: "2a962c9fcb8a58e835ea829883300ae11e9124b9972c5e1fe29e1cc283dd2f9" labels: app.kubernetes.io/name: flytepropeller app.kubernetes.io/instance: flyte @@ -461,7 +461,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytepropeller ports: @@ -515,9 +515,9 @@ spec: labels: app: flyte-pod-webhook app.kubernetes.io/name: flyte-pod-webhook - app.kubernetes.io/version: v1.12.0 + app.kubernetes.io/version: v1.12.1-rc0 annotations: - configChecksum: "8f59276def38db45b0f6b8fac2d1fb9218a92d3be145c11f431cb553f7c9b5d" + configChecksum: "2a962c9fcb8a58e835ea829883300ae11e9124b9972c5e1fe29e1cc283dd2f9" spec: securityContext: fsGroup: 65534 @@ -529,7 +529,7 @@ spec: serviceAccountName: flyte-pod-webhook initContainers: - name: generate-secrets - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller @@ -556,7 +556,7 @@ spec: mountPath: /etc/flyte/config containers: - name: webhook - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller diff --git a/deployment/gcp/flyte_helm_generated.yaml b/deployment/gcp/flyte_helm_generated.yaml index 0f24d0f3bc..6df3f31225 100644 --- a/deployment/gcp/flyte_helm_generated.yaml +++ b/deployment/gcp/flyte_helm_generated.yaml @@ -474,7 +474,7 @@ data: plugins: k8s: co-pilot: - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 name: flyte-copilot- start-timeout: 30s core.yaml: | @@ -924,7 +924,7 @@ spec: - /etc/flyte/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations securityContext: @@ -945,7 +945,7 @@ spec: - flytesnacks - flytetester - flyteexamples - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: seed-projects securityContext: @@ -963,7 +963,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - sync - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources securityContext: @@ -980,7 +980,7 @@ spec: - mountPath: /etc/secrets/ name: admin-secrets - name: generate-secrets - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: ["/bin/sh", "-c"] args: @@ -1007,7 +1007,7 @@ spec: - --config - /etc/flyte/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteadmin ports: @@ -1112,7 +1112,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources volumeMounts: @@ -1168,7 +1168,7 @@ spec: seLinuxOptions: type: spc_t containers: - - image: "cr.flyte.org/flyteorg/flyteconsole:v1.12.2" + - image: "cr.flyte.org/flyteorg/flyteconsole:v1.14.0" imagePullPolicy: "IfNotPresent" name: flyteconsole envFrom: @@ -1242,7 +1242,7 @@ spec: - /etc/datacatalog/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations volumeMounts: @@ -1260,7 +1260,7 @@ spec: - --config - /etc/datacatalog/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: datacatalog ports: @@ -1343,7 +1343,7 @@ spec: - precheck - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler-check securityContext: @@ -1363,7 +1363,7 @@ spec: - run - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler ports: @@ -1422,7 +1422,7 @@ spec: template: metadata: annotations: - configChecksum: "8f59276def38db45b0f6b8fac2d1fb9218a92d3be145c11f431cb553f7c9b5d" + configChecksum: "2a962c9fcb8a58e835ea829883300ae11e9124b9972c5e1fe29e1cc283dd2f9" labels: app.kubernetes.io/name: flytepropeller app.kubernetes.io/instance: flyte @@ -1447,7 +1447,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytepropeller ports: @@ -1501,9 +1501,9 @@ spec: labels: app: flyte-pod-webhook app.kubernetes.io/name: flyte-pod-webhook - app.kubernetes.io/version: v1.12.0 + app.kubernetes.io/version: v1.12.1-rc0 annotations: - configChecksum: "8f59276def38db45b0f6b8fac2d1fb9218a92d3be145c11f431cb553f7c9b5d" + configChecksum: "2a962c9fcb8a58e835ea829883300ae11e9124b9972c5e1fe29e1cc283dd2f9" spec: securityContext: fsGroup: 65534 @@ -1515,7 +1515,7 @@ spec: serviceAccountName: flyte-pod-webhook initContainers: - name: generate-secrets - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller @@ -1542,7 +1542,7 @@ spec: mountPath: /etc/flyte/config containers: - name: webhook - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller diff --git a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml index 10952e78a8..5c1cd52f08 100644 --- a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml +++ b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml @@ -116,7 +116,7 @@ data: stackdriver-enabled: false k8s: co-pilot: - image: "cr.flyte.org/flyteorg/flytecopilot:v1.12.0" + image: "cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0" k8s-array: logs: config: @@ -358,7 +358,7 @@ spec: app.kubernetes.io/instance: flyte app.kubernetes.io/component: flyte-binary annotations: - checksum/configuration: 919d991652132aef9cb5a3fe53ada07420023ddb6fc77f70332a36fe3a350f14 + checksum/configuration: 7a09cfb8462408d773931b8f8fcf2e3c352c7cdcdfa5909bc04c9661041cf4af checksum/configuration-secret: d5d93f4e67780b21593dc3799f0f6682aab0765e708e4020939975d14d44f929 checksum/cluster-resource-templates: 7dfa59f3d447e9c099b8f8ffad3af466fecbc9cf9f8c97295d9634254a55d4ae spec: diff --git a/deployment/sandbox/flyte_helm_generated.yaml b/deployment/sandbox/flyte_helm_generated.yaml index d5bff37291..f10c4cfdb3 100644 --- a/deployment/sandbox/flyte_helm_generated.yaml +++ b/deployment/sandbox/flyte_helm_generated.yaml @@ -586,7 +586,7 @@ data: plugins: k8s: co-pilot: - image: cr.flyte.org/flyteorg/flytecopilot:v1.12.0 + image: cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0 name: flyte-copilot- start-timeout: 30s core.yaml: | @@ -6708,7 +6708,7 @@ spec: - /etc/flyte/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations securityContext: @@ -6728,7 +6728,7 @@ spec: - flytesnacks - flytetester - flyteexamples - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: seed-projects securityContext: @@ -6745,7 +6745,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - sync - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources securityContext: @@ -6761,7 +6761,7 @@ spec: - mountPath: /etc/secrets/ name: admin-secrets - name: generate-secrets - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: ["/bin/sh", "-c"] args: @@ -6788,7 +6788,7 @@ spec: - --config - /etc/flyte/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteadmin ports: @@ -6883,7 +6883,7 @@ spec: - /etc/flyte/config/*.yaml - clusterresource - run - image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.0" + image: "cr.flyte.org/flyteorg/flyteadmin:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: sync-cluster-resources volumeMounts: @@ -6936,7 +6936,7 @@ spec: seLinuxOptions: type: spc_t containers: - - image: "cr.flyte.org/flyteorg/flyteconsole:v1.12.2" + - image: "cr.flyte.org/flyteorg/flyteconsole:v1.14.0" imagePullPolicy: "IfNotPresent" name: flyteconsole envFrom: @@ -7008,7 +7008,7 @@ spec: - /etc/datacatalog/config/*.yaml - migrate - run - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: run-migrations volumeMounts: @@ -7025,7 +7025,7 @@ spec: - --config - /etc/datacatalog/config/*.yaml - serve - image: "cr.flyte.org/flyteorg/datacatalog:v1.12.0" + image: "cr.flyte.org/flyteorg/datacatalog:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: datacatalog ports: @@ -7098,7 +7098,7 @@ spec: - precheck - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler-check securityContext: @@ -7117,7 +7117,7 @@ spec: - run - --config - /etc/flyte/config/*.yaml - image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.0" + image: "cr.flyte.org/flyteorg/flytescheduler:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytescheduler ports: @@ -7173,7 +7173,7 @@ spec: template: metadata: annotations: - configChecksum: "719c1f0c99eec05910ee274c2025e9349807fd0352c5b4027eaea5eb93b4123" + configChecksum: "f892b909c52752746c1b17c780ae5733f70d8c731acc9a89c31361c5690c8a5" labels: app.kubernetes.io/name: flytepropeller app.kubernetes.io/instance: flyte @@ -7198,7 +7198,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flytepropeller ports: @@ -7245,9 +7245,9 @@ spec: labels: app: flyte-pod-webhook app.kubernetes.io/name: flyte-pod-webhook - app.kubernetes.io/version: v1.12.0 + app.kubernetes.io/version: v1.12.1-rc0 annotations: - configChecksum: "719c1f0c99eec05910ee274c2025e9349807fd0352c5b4027eaea5eb93b4123" + configChecksum: "f892b909c52752746c1b17c780ae5733f70d8c731acc9a89c31361c5690c8a5" spec: securityContext: fsGroup: 65534 @@ -7259,7 +7259,7 @@ spec: serviceAccountName: flyte-pod-webhook initContainers: - name: generate-secrets - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller @@ -7286,7 +7286,7 @@ spec: mountPath: /etc/flyte/config containers: - name: webhook - image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.0" + image: "cr.flyte.org/flyteorg/flytepropeller:v1.12.1-rc0" imagePullPolicy: "IfNotPresent" command: - flytepropeller diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index 1a51b6c936..0a18e42b33 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -468,7 +468,7 @@ data: stackdriver-enabled: false k8s: co-pilot: - image: "cr.flyte.org/flyteorg/flytecopilot:v1.12.0" + image: "cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0" k8s-array: logs: config: @@ -816,7 +816,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: ckFCVGU3Y0M3Z0NWeVJhbw== + haSharedSecret: eHMzc0p4bTZoSVVFb1V0Uw== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1246,7 +1246,7 @@ spec: metadata: annotations: checksum/cluster-resource-templates: 6fd9b172465e3089fcc59f738b92b8dc4d8939360c19de8ee65f68b0e7422035 - checksum/configuration: 7a203bc250735c74447690b0ebd40c6d87c08f9c9ca55852ce2ee5bfa63c61b0 + checksum/configuration: 4ec8f20f526b359ef8be6c10658d504fa51856abbee25b3d854d4ea20e8f5472 checksum/configuration-secret: 09216ffaa3d29e14f88b1f30af580d02a2a5e014de4d750b7f275cc07ed4e914 labels: app.kubernetes.io/component: flyte-binary @@ -1412,7 +1412,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: d563e28ff21175650cb1ea90edc1dd85af7b789c802d6ff1a5b47aed4ef5bbb7 + checksum/secret: 174761d8b2609550a723b808cf0807c0b29cd4d3e1050ee85178a46fbca1a61c labels: app: docker-registry release: flyte-sandbox @@ -1755,7 +1755,7 @@ spec: value: minio - name: FLYTE_AWS_SECRET_ACCESS_KEY value: miniostorage - image: ghcr.io/flyteorg/flyteagent:1.11.0 + image: ghcr.io/flyteorg/flyteagent:1.12.1-rc0 imagePullPolicy: IfNotPresent name: flyteagent ports: diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index 9f630adad7..2bdaa4bb4a 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -457,7 +457,7 @@ data: stackdriver-enabled: false k8s: co-pilot: - image: "cr.flyte.org/flyteorg/flytecopilot:v1.12.0" + image: "cr.flyte.org/flyteorg/flytecopilot:v1.12.1-rc0" k8s-array: logs: config: @@ -796,7 +796,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: cnEwdENTUm90bnRoUnhzRQ== + haSharedSecret: OFdhR0JObmY4TkFWd1JaMg== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1194,7 +1194,7 @@ spec: metadata: annotations: checksum/cluster-resource-templates: 6fd9b172465e3089fcc59f738b92b8dc4d8939360c19de8ee65f68b0e7422035 - checksum/configuration: b032d29b66f3f7a0bf2d60c66deead17d7f5c990743ada4ac02679f8416f48d5 + checksum/configuration: 01e8d82391b2e7e95b238126f3ac4a7580164d7cf3c9ee711412fe2a2f0aa7cd checksum/configuration-secret: 09216ffaa3d29e14f88b1f30af580d02a2a5e014de4d750b7f275cc07ed4e914 labels: app.kubernetes.io/component: flyte-binary @@ -1360,7 +1360,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 623b2f28f1a032701661182d8abe2689d92cfb9cc1a0f914a0c5795a2e36b26a + checksum/secret: 71ade407a1350a0e7ee684b637e0a0d15cf511e83431b5466448e1a79da1d275 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index 87799de014..0ea904cd28 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: WW9ab3EzN0sycjZrYmYxaw== + haSharedSecret: b1k1Q0xLa2hkR3doaG9NMg== proxyPassword: "" proxyUsername: "" kind: Secret @@ -934,7 +934,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 9d9bc246a2339e714b527427e4357b28dc7ebb9e4cccb0fba84577bb6a0a4333 + checksum/secret: 7d2c67983dc470228224d912a242b2abcc695e391dc54f755e95dd5b820c7215 labels: app: docker-registry release: flyte-sandbox diff --git a/docs/conf.py b/docs/conf.py index 3cacb52f2b..c7c1bcd75a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,7 +36,7 @@ # The short X.Y version version = "" # The full version, including alpha/beta/rc tags -release = "1.12.0" +release = "1.12.1-rc0" # -- General configuration --------------------------------------------------- From f08eb4734c9dcccfcfdc3835354c587c3a64c60f Mon Sep 17 00:00:00 2001 From: Prafulla Mahindrakar Date: Fri, 31 May 2024 16:52:06 -0700 Subject: [PATCH 02/30] Upstream revert revert auth token fix (#5407) * Revert "Revert "Ensure token is refreshed on Unauthenticated (#5388)" (#5404)" This reverts commit 7d2f0d00ce14a56fe734b90b07f6aef78396351f. Signed-off-by: pmahindrakar-oss * Using same mutex for condition variable Signed-off-by: pmahindrakar-oss * Lock the locker in the wait to adher to cond.Wait() semantics Signed-off-by: pmahindrakar-oss * comments Signed-off-by: pmahindrakar-oss * using noop locker as waitlist add is atomic operation Signed-off-by: pmahindrakar-oss * Replace Azure AD OIDC URL with correct one (#4075) Signed-off-by: Erwin de Haan Signed-off-by: pmahindrakar-oss * Update the example Dockerfile to run on k8s (#5412) Signed-off-by: Jason Parraga Signed-off-by: pmahindrakar-oss * docs(kubeflow): Fix kubeflow webhook error (#5410) Signed-off-by: Chi-Sheng Liu Signed-off-by: pmahindrakar-oss * update flytekit version to 1.12.1b2 in monodocs requirements (#5411) Signed-off-by: Samhita Alla Signed-off-by: pmahindrakar-oss * Add supported task types to agent service config and rename (#5402) Signed-off-by: Jason Parraga Signed-off-by: pmahindrakar-oss * update lock file (#5416) Signed-off-by: Samhita Alla Signed-off-by: pmahindrakar-oss * [monorepo] Fix flytectl install script (#5405) Signed-off-by: pmahindrakar-oss * bring in changes for flytecl keyring from PR flytectl/pull/488 Signed-off-by: pmahindrakar-oss * typo fix Signed-off-by: pmahindrakar-oss --------- Signed-off-by: pmahindrakar-oss Signed-off-by: Erwin de Haan Signed-off-by: Jason Parraga Signed-off-by: Chi-Sheng Liu Signed-off-by: Samhita Alla Co-authored-by: Erwin de Haan <1627021+EraYaN@users.noreply.github.com> Co-authored-by: Jason Parraga Co-authored-by: Chi-Sheng Liu Co-authored-by: Samhita Alla Co-authored-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> --- flytectl/cmd/core/cmd.go | 8 +- flytectl/pkg/pkce/token_cache_keyring.go | 86 ++++++++++- flyteidl/clients/go/admin/auth_interceptor.go | 52 ++++++- .../clients/go/admin/auth_interceptor_test.go | 146 ++++++++++++------ .../go/admin/cache/mocks/token_cache.go | 91 +++++++++++ .../clients/go/admin/cache/token_cache.go | 30 +++- .../go/admin/cache/token_cache_inmemory.go | 80 +++++++++- flyteidl/clients/go/admin/client_builder.go | 2 +- .../clients/go/admin/client_builder_test.go | 4 +- flyteidl/clients/go/admin/client_test.go | 4 +- .../deviceflow/token_orchestrator_test.go | 4 +- .../admin/pkce/auth_flow_orchestrator_test.go | 2 +- .../clients/go/admin/token_source_provider.go | 6 +- .../go/admin/token_source_provider_test.go | 4 +- .../base_token_orchestrator.go | 20 ++- .../base_token_orchestrator_test.go | 8 +- 16 files changed, 455 insertions(+), 92 deletions(-) diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 989f4b7ebb..b2bd77c317 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -73,10 +73,10 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] cmdCtx := NewCommandContextNoClient(cmd.OutOrStdout()) if !cmdEntry.DisableFlyteClient { clientSet, err := admin.ClientSetBuilder().WithConfig(admin.GetConfig(ctx)). - WithTokenCache(pkce.TokenCacheKeyringProvider{ - ServiceUser: fmt.Sprintf("%s:%s", adminCfg.Endpoint.String(), pkce.KeyRingServiceUser), - ServiceName: pkce.KeyRingServiceName, - }).Build(ctx) + WithTokenCache(pkce.NewTokenCacheKeyringProvider( + pkce.KeyRingServiceName, + fmt.Sprintf("%s:%s", adminCfg.Endpoint.String(), pkce.KeyRingServiceUser), + )).Build(ctx) if err != nil { return err } diff --git a/flytectl/pkg/pkce/token_cache_keyring.go b/flytectl/pkg/pkce/token_cache_keyring.go index 119fea5033..afcfa74db5 100644 --- a/flytectl/pkg/pkce/token_cache_keyring.go +++ b/flytectl/pkg/pkce/token_cache_keyring.go @@ -1,25 +1,88 @@ package pkce import ( + "context" "encoding/json" "fmt" + "sync" + + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/cache" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/zalando/go-keyring" "golang.org/x/oauth2" ) +const ( + KeyRingServiceUser = "flytectl-user" + KeyRingServiceName = "flytectl" +) + // TokenCacheKeyringProvider wraps the logic to save and retrieve tokens from the OS's keyring implementation. type TokenCacheKeyringProvider struct { ServiceName string ServiceUser string + mu *sync.Mutex + condLocker *cache.NoopLocker + cond *sync.Cond } -const ( - KeyRingServiceUser = "flytectl-user" - KeyRingServiceName = "flytectl" -) +func (t *TokenCacheKeyringProvider) PurgeIfEquals(existing *oauth2.Token) (bool, error) { + if existingBytes, err := json.Marshal(existing); err != nil { + return false, fmt.Errorf("unable to marshal token to save in cache due to %w", err) + } else if tokenJSON, err := keyring.Get(t.ServiceName, t.ServiceUser); err != nil { + logger.Warnf(context.Background(), "unable to read token from cache but not failing the purge as the token might not have been saved at all. Error: %v", err) + return true, nil + } else if tokenJSON != string(existingBytes) { + return false, nil + } + + _ = keyring.Delete(t.ServiceName, t.ServiceUser) + return true, nil +} -func (t TokenCacheKeyringProvider) SaveToken(token *oauth2.Token) error { +func (t *TokenCacheKeyringProvider) Lock() { + t.mu.Lock() +} + +func (t *TokenCacheKeyringProvider) Unlock() { + t.mu.Unlock() +} + +// TryLock the cache. +func (t *TokenCacheKeyringProvider) TryLock() bool { + return t.mu.TryLock() +} + +// CondWait adds the current go routine to the condition waitlist and waits for another go routine to notify using CondBroadcast +// The current usage is that one who was able to acquire the lock using TryLock is the one who gets a valid token and notifies all the waitlist requesters so that they can use the new valid token. +// It also locks the Locker in the condition variable as the semantics of Wait is that it unlocks the Locker after adding +// the consumer to the waitlist and before blocking on notification. +// We use the condLocker which is noOp locker to get added to waitlist for notifications. +// The underlying notifcationList doesn't need to be guarded as it implementation is atomic and is thread safe +// Refer https://go.dev/src/runtime/sema.go +// Following is the function and its comments +// notifyListAdd adds the caller to a notify list such that it can receive +// notifications. The caller must eventually call notifyListWait to wait for +// such a notification, passing the returned ticket number. +// +// func notifyListAdd(l *notifyList) uint32 { +// // This may be called concurrently, for example, when called from +// // sync.Cond.Wait while holding a RWMutex in read mode. +// return l.wait.Add(1) - 1 +// } +func (t *TokenCacheKeyringProvider) CondWait() { + t.condLocker.Lock() + t.cond.Wait() + t.condLocker.Unlock() +} + +// CondBroadcast broadcasts the condition. +func (t *TokenCacheKeyringProvider) CondBroadcast() { + t.cond.Broadcast() +} + +func (t *TokenCacheKeyringProvider) SaveToken(token *oauth2.Token) error { var tokenBytes []byte if token.AccessToken == "" { return fmt.Errorf("cannot save empty token with expiration %v", token.Expiry) @@ -38,7 +101,7 @@ func (t TokenCacheKeyringProvider) SaveToken(token *oauth2.Token) error { return nil } -func (t TokenCacheKeyringProvider) GetToken() (*oauth2.Token, error) { +func (t *TokenCacheKeyringProvider) GetToken() (*oauth2.Token, error) { // get saved token tokenJSON, err := keyring.Get(t.ServiceName, t.ServiceUser) if len(tokenJSON) == 0 { @@ -56,3 +119,14 @@ func (t TokenCacheKeyringProvider) GetToken() (*oauth2.Token, error) { return &token, nil } + +func NewTokenCacheKeyringProvider(serviceName, serviceUser string) *TokenCacheKeyringProvider { + condLocker := &cache.NoopLocker{} + return &TokenCacheKeyringProvider{ + mu: &sync.Mutex{}, + condLocker: condLocker, + cond: sync.NewCond(condLocker), + ServiceName: serviceName, + ServiceUser: serviceUser, + } +} diff --git a/flyteidl/clients/go/admin/auth_interceptor.go b/flyteidl/clients/go/admin/auth_interceptor.go index 8a0024b319..4cebf6440f 100644 --- a/flyteidl/clients/go/admin/auth_interceptor.go +++ b/flyteidl/clients/go/admin/auth_interceptor.go @@ -20,7 +20,8 @@ const ProxyAuthorizationHeader = "proxy-authorization" // MaterializeCredentials will attempt to build a TokenSource given the anonymously available information exposed by the server. // Once established, it'll invoke PerRPCCredentialsFuture.Store() on perRPCCredentials to populate it with the appropriate values. -func MaterializeCredentials(ctx context.Context, cfg *Config, tokenCache cache.TokenCache, perRPCCredentials *PerRPCCredentialsFuture, proxyCredentialsFuture *PerRPCCredentialsFuture) error { +func MaterializeCredentials(ctx context.Context, cfg *Config, tokenCache cache.TokenCache, + perRPCCredentials *PerRPCCredentialsFuture, proxyCredentialsFuture *PerRPCCredentialsFuture) error { authMetadataClient, err := InitializeAuthMetadataClient(ctx, cfg, proxyCredentialsFuture) if err != nil { return fmt.Errorf("failed to initialized Auth Metadata Client. Error: %w", err) @@ -42,11 +43,17 @@ func MaterializeCredentials(ctx context.Context, cfg *Config, tokenCache cache.T tokenSource, err := tokenSourceProvider.GetTokenSource(ctx) if err != nil { - return err + return fmt.Errorf("failed to get token source. Error: %w", err) + } + + _, err = tokenSource.Token() + if err != nil { + return fmt.Errorf("failed to issue token. Error: %w", err) } wrappedTokenSource := NewCustomHeaderTokenSource(tokenSource, cfg.UseInsecureConnection, authorizationMetadataKey) perRPCCredentials.Store(wrappedTokenSource) + return nil } @@ -134,6 +141,15 @@ func NewAuthInterceptor(cfg *Config, tokenCache cache.TokenCache, credentialsFut return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { ctx = setHTTPClientContext(ctx, cfg, proxyCredentialsFuture) + // If there is already a token in the cache (e.g. key-ring), we should use it immediately... + t, _ := tokenCache.GetToken() + if t != nil { + err := MaterializeCredentials(ctx, cfg, tokenCache, credentialsFuture, proxyCredentialsFuture) + if err != nil { + return fmt.Errorf("failed to materialize credentials. Error: %v", err) + } + } + err := invoker(ctx, method, req, reply, cc, opts...) if err != nil { logger.Debugf(ctx, "Request failed due to [%v]. If it's an unauthenticated error, we will attempt to establish an authenticated context.", err) @@ -141,12 +157,34 @@ func NewAuthInterceptor(cfg *Config, tokenCache cache.TokenCache, credentialsFut if st, ok := status.FromError(err); ok { // If the error we receive from executing the request expects if shouldAttemptToAuthenticate(st.Code()) { - logger.Debugf(ctx, "Request failed due to [%v]. Attempting to establish an authenticated connection and trying again.", st.Code()) - newErr := MaterializeCredentials(ctx, cfg, tokenCache, credentialsFuture, proxyCredentialsFuture) - if newErr != nil { - return fmt.Errorf("authentication error! Original Error: %v, Auth Error: %w", err, newErr) + err = func() error { + if !tokenCache.TryLock() { + tokenCache.CondWait() + return nil + } + + defer tokenCache.Unlock() + _, err := tokenCache.PurgeIfEquals(t) + if err != nil && !errors.Is(err, cache.ErrNotFound) { + logger.Errorf(ctx, "Failed to purge cache. Error [%v]", err) + return fmt.Errorf("failed to purge cache. Error: %w", err) + } + + logger.Debugf(ctx, "Request failed due to [%v]. Attempting to establish an authenticated connection and trying again.", st.Code()) + newErr := MaterializeCredentials(ctx, cfg, tokenCache, credentialsFuture, proxyCredentialsFuture) + if newErr != nil { + errString := fmt.Sprintf("authentication error! Original Error: %v, Auth Error: %v", err, newErr) + logger.Errorf(ctx, errString) + return fmt.Errorf(errString) + } + + tokenCache.CondBroadcast() + return nil + }() + + if err != nil { + return err } - return invoker(ctx, method, req, reply, cc, opts...) } } diff --git a/flyteidl/clients/go/admin/auth_interceptor_test.go b/flyteidl/clients/go/admin/auth_interceptor_test.go index ce99c99270..10c96625b7 100644 --- a/flyteidl/clients/go/admin/auth_interceptor_test.go +++ b/flyteidl/clients/go/admin/auth_interceptor_test.go @@ -2,13 +2,14 @@ package admin import ( "context" + "encoding/json" "errors" "fmt" "io" "net" "net/http" - "net/http/httptest" "net/url" + "os" "strings" "sync" "testing" @@ -31,10 +32,11 @@ import ( // authMetadataServer is a fake AuthMetadataServer that takes in an AuthMetadataServer implementation (usually one // initialized through mockery) and starts a local server that uses it to respond to grpc requests. type authMetadataServer struct { - s *httptest.Server t testing.TB - port int + grpcPort int + httpPort int grpcServer *grpc.Server + httpServer *http.Server netListener net.Listener impl service.AuthMetadataServiceServer lck *sync.RWMutex @@ -70,27 +72,49 @@ func (s authMetadataServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.NotFound(w, r) } +func (s *authMetadataServer) tokenHandler(w http.ResponseWriter, r *http.Request) { + tokenJSON := []byte(`{"access_token": "exampletoken", "token_type": "bearer"}`) + w.Header().Set("Content-Type", "application/json") + _, err := w.Write(tokenJSON) + assert.NoError(s.t, err) +} + func (s *authMetadataServer) Start(_ context.Context) error { s.lck.Lock() defer s.lck.Unlock() /***** Set up the server serving channelz service. *****/ - lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", s.port)) + + lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", s.grpcPort)) if err != nil { - return fmt.Errorf("failed to listen on port [%v]: %w", s.port, err) + return fmt.Errorf("failed to listen on port [%v]: %w", s.grpcPort, err) } + s.netListener = lis grpcS := grpc.NewServer() service.RegisterAuthMetadataServiceServer(grpcS, s) go func() { + defer grpcS.Stop() _ = grpcS.Serve(lis) - //assert.NoError(s.t, err) }() - s.grpcServer = grpcS - s.netListener = lis + mux := http.NewServeMux() + // Attach the handler to the /oauth2/token path + mux.HandleFunc("/oauth2/token", s.tokenHandler) + + //nolint:gosec + s.httpServer = &http.Server{ + Addr: fmt.Sprintf("localhost:%d", s.httpPort), + Handler: mux, + } - s.s = httptest.NewServer(s) + go func() { + defer s.httpServer.Close() + err := s.httpServer.ListenAndServe() + if err != nil { + panic(err) + } + }() return nil } @@ -98,25 +122,30 @@ func (s *authMetadataServer) Start(_ context.Context) error { func (s *authMetadataServer) Close() { s.lck.RLock() defer s.lck.RUnlock() - s.grpcServer.Stop() - s.s.Close() } -func newAuthMetadataServer(t testing.TB, port int, impl service.AuthMetadataServiceServer) *authMetadataServer { +func newAuthMetadataServer(t testing.TB, grpcPort int, httpPort int, impl service.AuthMetadataServiceServer) *authMetadataServer { return &authMetadataServer{ - port: port, - t: t, - impl: impl, - lck: &sync.RWMutex{}, + grpcPort: grpcPort, + httpPort: httpPort, + t: t, + impl: impl, + lck: &sync.RWMutex{}, } } func Test_newAuthInterceptor(t *testing.T) { + plan, _ := os.ReadFile("tokenorchestrator/testdata/token.json") + var tokenData oauth2.Token + err := json.Unmarshal(plan, &tokenData) + assert.NoError(t, err) t.Run("Other Error", func(t *testing.T) { f := NewPerRPCCredentialsFuture() p := NewPerRPCCredentialsFuture() - interceptor := NewAuthInterceptor(&Config{}, &mocks.TokenCache{}, f, p) + mockTokenCache := &mocks.TokenCache{} + mockTokenCache.OnGetTokenMatch().Return(&tokenData, nil) + interceptor := NewAuthInterceptor(&Config{}, mockTokenCache, f, p) otherError := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error { return status.New(codes.Canceled, "").Err() } @@ -129,35 +158,43 @@ func Test_newAuthInterceptor(t *testing.T) { Level: logger.DebugLevel, })) - port := rand.IntnRange(10000, 60000) + httpPort := rand.IntnRange(10000, 60000) + grpcPort := rand.IntnRange(10000, 60000) m := &adminMocks.AuthMetadataServiceServer{} m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(&service.OAuth2MetadataResponse{ - AuthorizationEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/authorize", port), - TokenEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/token", port), - JwksUri: fmt.Sprintf("http://localhost:%d/oauth2/jwks", port), + AuthorizationEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/authorize", httpPort), + TokenEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/token", httpPort), + JwksUri: fmt.Sprintf("http://localhost:%d/oauth2/jwks", httpPort), }, nil) + m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(&service.PublicClientAuthConfigResponse{ Scopes: []string{"all"}, }, nil) - s := newAuthMetadataServer(t, port, m) + s := newAuthMetadataServer(t, grpcPort, httpPort, m) ctx := context.Background() assert.NoError(t, s.Start(ctx)) defer s.Close() - u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port)) + u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", grpcPort)) assert.NoError(t, err) f := NewPerRPCCredentialsFuture() p := NewPerRPCCredentialsFuture() + c := &mocks.TokenCache{} + c.OnGetTokenMatch().Return(nil, nil) + c.OnTryLockMatch().Return(true) + c.OnSaveTokenMatch(mock.Anything).Return(nil) + c.On("CondBroadcast").Return() + c.On("Unlock").Return() + c.OnPurgeIfEqualsMatch(mock.Anything).Return(true, nil) interceptor := NewAuthInterceptor(&Config{ Endpoint: config.URL{URL: *u}, UseInsecureConnection: true, AuthType: AuthTypeClientSecret, - }, &mocks.TokenCache{}, f, p) + }, c, f, p) unauthenticated := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error { return status.New(codes.Unauthenticated, "").Err() } - err = interceptor(ctx, "POST", nil, nil, nil, unauthenticated) assert.Error(t, err) assert.Truef(t, f.IsInitialized(), "PerRPCCredentialFuture should be initialized") @@ -169,24 +206,26 @@ func Test_newAuthInterceptor(t *testing.T) { Level: logger.DebugLevel, })) - port := rand.IntnRange(10000, 60000) + httpPort := rand.IntnRange(10000, 60000) + grpcPort := rand.IntnRange(10000, 60000) m := &adminMocks.AuthMetadataServiceServer{} - s := newAuthMetadataServer(t, port, m) + s := newAuthMetadataServer(t, grpcPort, httpPort, m) ctx := context.Background() assert.NoError(t, s.Start(ctx)) defer s.Close() - u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port)) + u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", grpcPort)) assert.NoError(t, err) f := NewPerRPCCredentialsFuture() p := NewPerRPCCredentialsFuture() - + c := &mocks.TokenCache{} + c.OnGetTokenMatch().Return(nil, nil) interceptor := NewAuthInterceptor(&Config{ Endpoint: config.URL{URL: *u}, UseInsecureConnection: true, AuthType: AuthTypeClientSecret, - }, &mocks.TokenCache{}, f, p) + }, c, f, p) authenticated := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error { return nil } @@ -201,33 +240,39 @@ func Test_newAuthInterceptor(t *testing.T) { Level: logger.DebugLevel, })) - port := rand.IntnRange(10000, 60000) + httpPort := rand.IntnRange(10000, 60000) + grpcPort := rand.IntnRange(10000, 60000) m := &adminMocks.AuthMetadataServiceServer{} m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(&service.OAuth2MetadataResponse{ - AuthorizationEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/authorize", port), - TokenEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/token", port), - JwksUri: fmt.Sprintf("http://localhost:%d/oauth2/jwks", port), + AuthorizationEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/authorize", httpPort), + TokenEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/token", httpPort), + JwksUri: fmt.Sprintf("http://localhost:%d/oauth2/jwks", httpPort), }, nil) m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(&service.PublicClientAuthConfigResponse{ Scopes: []string{"all"}, }, nil) - s := newAuthMetadataServer(t, port, m) + s := newAuthMetadataServer(t, grpcPort, httpPort, m) ctx := context.Background() assert.NoError(t, s.Start(ctx)) defer s.Close() - u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port)) + u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", grpcPort)) assert.NoError(t, err) f := NewPerRPCCredentialsFuture() p := NewPerRPCCredentialsFuture() + c := &mocks.TokenCache{} + c.OnGetTokenMatch().Return(nil, nil) + c.OnTryLockMatch().Return(true) + c.OnSaveTokenMatch(mock.Anything).Return(nil) + c.OnPurgeIfEqualsMatch(mock.Anything).Return(true, nil) interceptor := NewAuthInterceptor(&Config{ Endpoint: config.URL{URL: *u}, UseInsecureConnection: true, AuthType: AuthTypeClientSecret, - }, &mocks.TokenCache{}, f, p) + }, c, f, p) unauthenticated := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error { return status.New(codes.Aborted, "").Err() } @@ -239,17 +284,21 @@ func Test_newAuthInterceptor(t *testing.T) { } func TestMaterializeCredentials(t *testing.T) { - port := rand.IntnRange(10000, 60000) t.Run("No oauth2 metadata endpoint or Public client config lookup", func(t *testing.T) { + httpPort := rand.IntnRange(10000, 60000) + grpcPort := rand.IntnRange(10000, 60000) + c := &mocks.TokenCache{} + c.OnGetTokenMatch().Return(nil, nil) + c.OnSaveTokenMatch(mock.Anything).Return(nil) m := &adminMocks.AuthMetadataServiceServer{} m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get oauth2 metadata")) m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get public client config")) - s := newAuthMetadataServer(t, port, m) + s := newAuthMetadataServer(t, grpcPort, httpPort, m) ctx := context.Background() assert.NoError(t, s.Start(ctx)) defer s.Close() - u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port)) + u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", grpcPort)) assert.NoError(t, err) f := NewPerRPCCredentialsFuture() @@ -259,24 +308,29 @@ func TestMaterializeCredentials(t *testing.T) { Endpoint: config.URL{URL: *u}, UseInsecureConnection: true, AuthType: AuthTypeClientSecret, - TokenURL: fmt.Sprintf("http://localhost:%d/api/v1/token", port), + TokenURL: fmt.Sprintf("http://localhost:%d/oauth2/token", httpPort), Scopes: []string{"all"}, Audience: "http://localhost:30081", AuthorizationHeader: "authorization", - }, &mocks.TokenCache{}, f, p) + }, c, f, p) assert.NoError(t, err) }) t.Run("Failed to fetch client metadata", func(t *testing.T) { + httpPort := rand.IntnRange(10000, 60000) + grpcPort := rand.IntnRange(10000, 60000) + c := &mocks.TokenCache{} + c.OnGetTokenMatch().Return(nil, nil) + c.OnSaveTokenMatch(mock.Anything).Return(nil) m := &adminMocks.AuthMetadataServiceServer{} m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get oauth2 metadata")) failedPublicClientConfigLookup := errors.New("expected err") m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(nil, failedPublicClientConfigLookup) - s := newAuthMetadataServer(t, port, m) + s := newAuthMetadataServer(t, grpcPort, httpPort, m) ctx := context.Background() assert.NoError(t, s.Start(ctx)) defer s.Close() - u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port)) + u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", grpcPort)) assert.NoError(t, err) f := NewPerRPCCredentialsFuture() @@ -286,9 +340,9 @@ func TestMaterializeCredentials(t *testing.T) { Endpoint: config.URL{URL: *u}, UseInsecureConnection: true, AuthType: AuthTypeClientSecret, - TokenURL: fmt.Sprintf("http://localhost:%d/api/v1/token", port), + TokenURL: fmt.Sprintf("http://localhost:%d/api/v1/token", httpPort), Scopes: []string{"all"}, - }, &mocks.TokenCache{}, f, p) + }, c, f, p) assert.EqualError(t, err, "failed to fetch client metadata. Error: rpc error: code = Unknown desc = expected err") }) } diff --git a/flyteidl/clients/go/admin/cache/mocks/token_cache.go b/flyteidl/clients/go/admin/cache/mocks/token_cache.go index 0af58b381f..88a1bef81c 100644 --- a/flyteidl/clients/go/admin/cache/mocks/token_cache.go +++ b/flyteidl/clients/go/admin/cache/mocks/token_cache.go @@ -12,6 +12,16 @@ type TokenCache struct { mock.Mock } +// CondBroadcast provides a mock function with given fields: +func (_m *TokenCache) CondBroadcast() { + _m.Called() +} + +// CondWait provides a mock function with given fields: +func (_m *TokenCache) CondWait() { + _m.Called() +} + type TokenCache_GetToken struct { *mock.Call } @@ -53,6 +63,50 @@ func (_m *TokenCache) GetToken() (*oauth2.Token, error) { return r0, r1 } +// Lock provides a mock function with given fields: +func (_m *TokenCache) Lock() { + _m.Called() +} + +type TokenCache_PurgeIfEquals struct { + *mock.Call +} + +func (_m TokenCache_PurgeIfEquals) Return(_a0 bool, _a1 error) *TokenCache_PurgeIfEquals { + return &TokenCache_PurgeIfEquals{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *TokenCache) OnPurgeIfEquals(t *oauth2.Token) *TokenCache_PurgeIfEquals { + c_call := _m.On("PurgeIfEquals", t) + return &TokenCache_PurgeIfEquals{Call: c_call} +} + +func (_m *TokenCache) OnPurgeIfEqualsMatch(matchers ...interface{}) *TokenCache_PurgeIfEquals { + c_call := _m.On("PurgeIfEquals", matchers...) + return &TokenCache_PurgeIfEquals{Call: c_call} +} + +// PurgeIfEquals provides a mock function with given fields: t +func (_m *TokenCache) PurgeIfEquals(t *oauth2.Token) (bool, error) { + ret := _m.Called(t) + + var r0 bool + if rf, ok := ret.Get(0).(func(*oauth2.Token) bool); ok { + r0 = rf(t) + } else { + r0 = ret.Get(0).(bool) + } + + var r1 error + if rf, ok := ret.Get(1).(func(*oauth2.Token) error); ok { + r1 = rf(t) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type TokenCache_SaveToken struct { *mock.Call } @@ -84,3 +138,40 @@ func (_m *TokenCache) SaveToken(token *oauth2.Token) error { return r0 } + +type TokenCache_TryLock struct { + *mock.Call +} + +func (_m TokenCache_TryLock) Return(_a0 bool) *TokenCache_TryLock { + return &TokenCache_TryLock{Call: _m.Call.Return(_a0)} +} + +func (_m *TokenCache) OnTryLock() *TokenCache_TryLock { + c_call := _m.On("TryLock") + return &TokenCache_TryLock{Call: c_call} +} + +func (_m *TokenCache) OnTryLockMatch(matchers ...interface{}) *TokenCache_TryLock { + c_call := _m.On("TryLock", matchers...) + return &TokenCache_TryLock{Call: c_call} +} + +// TryLock provides a mock function with given fields: +func (_m *TokenCache) TryLock() bool { + ret := _m.Called() + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Unlock provides a mock function with given fields: +func (_m *TokenCache) Unlock() { + _m.Called() +} diff --git a/flyteidl/clients/go/admin/cache/token_cache.go b/flyteidl/clients/go/admin/cache/token_cache.go index e4e2b7e17f..f2d55fc0dd 100644 --- a/flyteidl/clients/go/admin/cache/token_cache.go +++ b/flyteidl/clients/go/admin/cache/token_cache.go @@ -1,14 +1,40 @@ package cache -import "golang.org/x/oauth2" +import ( + "fmt" + + "golang.org/x/oauth2" +) //go:generate mockery -all -case=underscore +var ( + ErrNotFound = fmt.Errorf("secret not found in keyring") +) + // TokenCache defines the interface needed to cache and retrieve oauth tokens. type TokenCache interface { // SaveToken saves the token securely to cache. SaveToken(token *oauth2.Token) error - // Retrieves the token from the cache. + // GetToken retrieves the token from the cache. GetToken() (*oauth2.Token, error) + + // PurgeIfEquals purges the token from the cache. + PurgeIfEquals(t *oauth2.Token) (bool, error) + + // Lock the cache. + Lock() + + // TryLock tries to lock the cache. + TryLock() bool + + // Unlock the cache. + Unlock() + + // CondWait waits for the condition to be true. + CondWait() + + // CondSignalCondBroadcast signals the condition. + CondBroadcast() } diff --git a/flyteidl/clients/go/admin/cache/token_cache_inmemory.go b/flyteidl/clients/go/admin/cache/token_cache_inmemory.go index 9c6223fc06..ca832ded1f 100644 --- a/flyteidl/clients/go/admin/cache/token_cache_inmemory.go +++ b/flyteidl/clients/go/admin/cache/token_cache_inmemory.go @@ -2,23 +2,93 @@ package cache import ( "fmt" + "sync" + "sync/atomic" "golang.org/x/oauth2" ) type TokenCacheInMemoryProvider struct { - token *oauth2.Token + token atomic.Value + mu *sync.Mutex + condLocker *NoopLocker + cond *sync.Cond } func (t *TokenCacheInMemoryProvider) SaveToken(token *oauth2.Token) error { - t.token = token + t.token.Store(token) return nil } -func (t TokenCacheInMemoryProvider) GetToken() (*oauth2.Token, error) { - if t.token == nil { +func (t *TokenCacheInMemoryProvider) GetToken() (*oauth2.Token, error) { + tkn := t.token.Load() + if tkn == nil { return nil, fmt.Errorf("cannot find token in cache") } + return tkn.(*oauth2.Token), nil +} + +func (t *TokenCacheInMemoryProvider) PurgeIfEquals(existing *oauth2.Token) (bool, error) { + // Add an empty token since we can't mark it nil using Compare and swap + return t.token.CompareAndSwap(existing, &oauth2.Token{}), nil +} + +func (t *TokenCacheInMemoryProvider) Lock() { + t.mu.Lock() +} + +func (t *TokenCacheInMemoryProvider) TryLock() bool { + return t.mu.TryLock() +} + +func (t *TokenCacheInMemoryProvider) Unlock() { + t.mu.Unlock() +} + +// CondWait adds the current go routine to the condition waitlist and waits for another go routine to notify using CondBroadcast +// The current usage is that one who was able to acquire the lock using TryLock is the one who gets a valid token and notifies all the waitlist requesters so that they can use the new valid token. +// It also locks the Locker in the condition variable as the semantics of Wait is that it unlocks the Locker after adding +// the consumer to the waitlist and before blocking on notification. +// We use the condLocker which is noOp locker to get added to waitlist for notifications. +// The underlying notifcationList doesn't need to be guarded as it implementation is atomic and is thread safe +// Refer https://go.dev/src/runtime/sema.go +// Following is the function and its comments +// notifyListAdd adds the caller to a notify list such that it can receive +// notifications. The caller must eventually call notifyListWait to wait for +// such a notification, passing the returned ticket number. +// +// func notifyListAdd(l *notifyList) uint32 { +// // This may be called concurrently, for example, when called from +// // sync.Cond.Wait while holding a RWMutex in read mode. +// return l.wait.Add(1) - 1 +// } +func (t *TokenCacheInMemoryProvider) CondWait() { + t.condLocker.Lock() + t.cond.Wait() + t.condLocker.Unlock() +} + +// NoopLocker has empty implementation of Locker interface +type NoopLocker struct { +} + +func (*NoopLocker) Lock() { + +} +func (*NoopLocker) Unlock() { +} - return t.token, nil +// CondBroadcast signals the condition. +func (t *TokenCacheInMemoryProvider) CondBroadcast() { + t.cond.Broadcast() +} + +func NewTokenCacheInMemoryProvider() *TokenCacheInMemoryProvider { + condLocker := &NoopLocker{} + return &TokenCacheInMemoryProvider{ + mu: &sync.Mutex{}, + token: atomic.Value{}, + condLocker: condLocker, + cond: sync.NewCond(condLocker), + } } diff --git a/flyteidl/clients/go/admin/client_builder.go b/flyteidl/clients/go/admin/client_builder.go index 25b263ecf1..0d1341bf7b 100644 --- a/flyteidl/clients/go/admin/client_builder.go +++ b/flyteidl/clients/go/admin/client_builder.go @@ -40,7 +40,7 @@ func (cb *ClientsetBuilder) WithDialOptions(opts ...grpc.DialOption) *ClientsetB // Build the clientset using the current state of the ClientsetBuilder func (cb *ClientsetBuilder) Build(ctx context.Context) (*Clientset, error) { if cb.tokenCache == nil { - cb.tokenCache = &cache.TokenCacheInMemoryProvider{} + cb.tokenCache = cache.NewTokenCacheInMemoryProvider() } if cb.config == nil { diff --git a/flyteidl/clients/go/admin/client_builder_test.go b/flyteidl/clients/go/admin/client_builder_test.go index c871bcb326..89bcc38550 100644 --- a/flyteidl/clients/go/admin/client_builder_test.go +++ b/flyteidl/clients/go/admin/client_builder_test.go @@ -17,9 +17,9 @@ func TestClientsetBuilder_Build(t *testing.T) { cb := NewClientsetBuilder().WithConfig(&Config{ UseInsecureConnection: true, Endpoint: config.URL{URL: *u}, - }).WithTokenCache(&cache.TokenCacheInMemoryProvider{}) + }).WithTokenCache(cache.NewTokenCacheInMemoryProvider()) ctx := context.Background() _, err := cb.Build(ctx) assert.NoError(t, err) - assert.True(t, reflect.TypeOf(cb.tokenCache) == reflect.TypeOf(&cache.TokenCacheInMemoryProvider{})) + assert.True(t, reflect.TypeOf(cb.tokenCache) == reflect.TypeOf(cache.NewTokenCacheInMemoryProvider())) } diff --git a/flyteidl/clients/go/admin/client_test.go b/flyteidl/clients/go/admin/client_test.go index eb19b76f47..042a826692 100644 --- a/flyteidl/clients/go/admin/client_test.go +++ b/flyteidl/clients/go/admin/client_test.go @@ -255,6 +255,8 @@ func TestGetAuthenticationDialOptionPkce(t *testing.T) { mockAuthClient := new(mocks.AuthMetadataServiceClient) mockTokenCache.OnGetTokenMatch().Return(&tokenData, nil) mockTokenCache.OnSaveTokenMatch(mock.Anything).Return(nil) + mockTokenCache.On("Lock").Return() + mockTokenCache.On("Unlock").Return() mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metadata, nil) mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil) tokenSourceProvider, err := NewTokenSourceProvider(ctx, adminServiceConfig, mockTokenCache, mockAuthClient) @@ -288,7 +290,7 @@ func Test_getPkceAuthTokenSource(t *testing.T) { assert.NoError(t, err) // populate the cache - tokenCache := &cache.TokenCacheInMemoryProvider{} + tokenCache := cache.NewTokenCacheInMemoryProvider() assert.NoError(t, tokenCache.SaveToken(&tokenData)) baseOrchestrator := tokenorchestrator.BaseTokenOrchestrator{ diff --git a/flyteidl/clients/go/admin/deviceflow/token_orchestrator_test.go b/flyteidl/clients/go/admin/deviceflow/token_orchestrator_test.go index 5c1dc5f2bd..9f20fb3ef5 100644 --- a/flyteidl/clients/go/admin/deviceflow/token_orchestrator_test.go +++ b/flyteidl/clients/go/admin/deviceflow/token_orchestrator_test.go @@ -23,7 +23,7 @@ import ( func TestFetchFromAuthFlow(t *testing.T) { ctx := context.Background() t.Run("fetch from auth flow", func(t *testing.T) { - tokenCache := &cache.TokenCacheInMemoryProvider{} + tokenCache := cache.NewTokenCacheInMemoryProvider() orchestrator, err := NewDeviceFlowTokenOrchestrator(tokenorchestrator.BaseTokenOrchestrator{ ClientConfig: &oauth.Config{ Config: &oauth2.Config{ @@ -97,7 +97,7 @@ func TestFetchFromAuthFlow(t *testing.T) { })) defer fakeServer.Close() - tokenCache := &cache.TokenCacheInMemoryProvider{} + tokenCache := cache.NewTokenCacheInMemoryProvider() orchestrator, err := NewDeviceFlowTokenOrchestrator(tokenorchestrator.BaseTokenOrchestrator{ ClientConfig: &oauth.Config{ Config: &oauth2.Config{ diff --git a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator_test.go b/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator_test.go index dc1c80f63a..ca1973ea66 100644 --- a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator_test.go +++ b/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator_test.go @@ -16,7 +16,7 @@ import ( func TestFetchFromAuthFlow(t *testing.T) { ctx := context.Background() t.Run("fetch from auth flow", func(t *testing.T) { - tokenCache := &cache.TokenCacheInMemoryProvider{} + tokenCache := cache.NewTokenCacheInMemoryProvider() orchestrator, err := NewTokenOrchestrator(tokenorchestrator.BaseTokenOrchestrator{ ClientConfig: &oauth.Config{ Config: &oauth2.Config{ diff --git a/flyteidl/clients/go/admin/token_source_provider.go b/flyteidl/clients/go/admin/token_source_provider.go index d4f4a31a5a..83df542082 100644 --- a/flyteidl/clients/go/admin/token_source_provider.go +++ b/flyteidl/clients/go/admin/token_source_provider.go @@ -188,7 +188,7 @@ func NewClientCredentialsTokenSourceProvider(ctx context.Context, cfg *Config, s } secret = strings.TrimSpace(secret) if tokenCache == nil { - tokenCache = &cache.TokenCacheInMemoryProvider{} + tokenCache = cache.NewTokenCacheInMemoryProvider() } return ClientCredentialsTokenSourceProvider{ ccConfig: clientcredentials.Config{ @@ -227,14 +227,14 @@ func (s *customTokenSource) Token() (*oauth2.Token, error) { token, err := s.new.Token() if err != nil { - logger.Warnf(s.ctx, "failed to get token: %w", err) + logger.Warnf(s.ctx, "failed to get token: %v", err) return nil, fmt.Errorf("failed to get token: %w", err) } logger.Infof(s.ctx, "retrieved token with expiry %v", token.Expiry) err = s.tokenCache.SaveToken(token) if err != nil { - logger.Warnf(s.ctx, "failed to cache token: %w", err) + logger.Warnf(s.ctx, "failed to cache token: %v", err) } return token, nil diff --git a/flyteidl/clients/go/admin/token_source_provider_test.go b/flyteidl/clients/go/admin/token_source_provider_test.go index 63fc1aa56e..43d0fdd928 100644 --- a/flyteidl/clients/go/admin/token_source_provider_test.go +++ b/flyteidl/clients/go/admin/token_source_provider_test.go @@ -127,7 +127,9 @@ func TestCustomTokenSource_Token(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { tokenCache := &tokenCacheMocks.TokenCache{} - tokenCache.OnGetToken().Return(test.token, nil).Once() + tokenCache.OnGetToken().Return(test.token, nil).Maybe() + tokenCache.On("Lock").Return().Maybe() + tokenCache.On("Unlock").Return().Maybe() provider, err := NewClientCredentialsTokenSourceProvider(ctx, cfg, []string{}, "", tokenCache, "") assert.NoError(t, err) source, err := provider.GetTokenSource(ctx) diff --git a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator.go b/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator.go index c4891b13ae..4fd3fa476c 100644 --- a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator.go +++ b/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator.go @@ -3,7 +3,6 @@ package tokenorchestrator import ( "context" "fmt" - "time" "golang.org/x/oauth2" @@ -53,16 +52,21 @@ func (t BaseTokenOrchestrator) FetchTokenFromCacheOrRefreshIt(ctx context.Contex return nil, err } - if !token.Valid() { - return nil, fmt.Errorf("token from cache is invalid") + if token.Valid() { + return token, nil } - // If token doesn't need to be refreshed, return it. - if time.Now().Before(token.Expiry.Add(-tokenRefreshGracePeriod.Duration)) { - logger.Infof(ctx, "found the token in the cache") + t.TokenCache.Lock() + defer t.TokenCache.Unlock() + + token, err = t.TokenCache.GetToken() + if err != nil { + return nil, err + } + + if token.Valid() { return token, nil } - token.Expiry = token.Expiry.Add(-tokenRefreshGracePeriod.Duration) token, err = t.RefreshToken(ctx, token) if err != nil { @@ -73,6 +77,8 @@ func (t BaseTokenOrchestrator) FetchTokenFromCacheOrRefreshIt(ctx context.Contex return nil, fmt.Errorf("refreshed token is invalid") } + token.Expiry = token.Expiry.Add(-tokenRefreshGracePeriod.Duration) + err = t.TokenCache.SaveToken(token) if err != nil { return nil, fmt.Errorf("failed to save token in the token cache. Error: %w", err) diff --git a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator_test.go b/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator_test.go index ed4afa0ff0..0a1a9f4985 100644 --- a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator_test.go +++ b/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator_test.go @@ -26,7 +26,7 @@ func TestRefreshTheToken(t *testing.T) { ClientID: "dummyClient", }, } - tokenCacheProvider := &cache.TokenCacheInMemoryProvider{} + tokenCacheProvider := cache.NewTokenCacheInMemoryProvider() orchestrator := BaseTokenOrchestrator{ ClientConfig: clientConf, TokenCache: tokenCacheProvider, @@ -58,7 +58,7 @@ func TestFetchFromCache(t *testing.T) { mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil) t.Run("no token in cache", func(t *testing.T) { - tokenCacheProvider := &cache.TokenCacheInMemoryProvider{} + tokenCacheProvider := cache.NewTokenCacheInMemoryProvider() orchestrator, err := NewBaseTokenOrchestrator(ctx, tokenCacheProvider, mockAuthClient) @@ -69,7 +69,7 @@ func TestFetchFromCache(t *testing.T) { }) t.Run("token in cache", func(t *testing.T) { - tokenCacheProvider := &cache.TokenCacheInMemoryProvider{} + tokenCacheProvider := cache.NewTokenCacheInMemoryProvider() orchestrator, err := NewBaseTokenOrchestrator(ctx, tokenCacheProvider, mockAuthClient) assert.NoError(t, err) fileData, _ := os.ReadFile("testdata/token.json") @@ -86,7 +86,7 @@ func TestFetchFromCache(t *testing.T) { }) t.Run("expired token in cache", func(t *testing.T) { - tokenCacheProvider := &cache.TokenCacheInMemoryProvider{} + tokenCacheProvider := cache.NewTokenCacheInMemoryProvider() orchestrator, err := NewBaseTokenOrchestrator(ctx, tokenCacheProvider, mockAuthClient) assert.NoError(t, err) fileData, _ := os.ReadFile("testdata/token.json") From 9ffc54fa4d69f3058ce635a53ce2fa594a9cc5d9 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Sun, 2 Jun 2024 21:41:17 -0700 Subject: [PATCH 03/30] Indicate that jq is now required to install flytectl via the script (#5440) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/docs/source/overview.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flytectl/docs/source/overview.rst b/flytectl/docs/source/overview.rst index aac4c99ee6..db483007bf 100644 --- a/flytectl/docs/source/overview.rst +++ b/flytectl/docs/source/overview.rst @@ -30,6 +30,9 @@ Flytectl is a Golang binary that can be installed on any platform supported by G .. tab-item:: Other Operating systems + .. warning:: + `jq `_ is a dependency of this script. + .. prompt:: bash $ curl -sL https://ctl.flyte.org/install | bash From 5a81e76bc49fd8d8d9bed944c8ba6268412d37f0 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:15:06 -0700 Subject: [PATCH 04/30] Indicate that jq is needed to install flytectl (#5446) * Indicate that jq is needed to install flytectl Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> * Define warning using three colons. Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> * Use four colons Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> * Use triple backticks Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> * Update docs/getting_started_with_workflow_development/running_a_workflow_locally.md Co-authored-by: Nikki Everett Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> --------- Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Co-authored-by: Nikki Everett --- .../running_a_workflow_locally.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/getting_started_with_workflow_development/running_a_workflow_locally.md b/docs/getting_started_with_workflow_development/running_a_workflow_locally.md index 64573f990d..ce549889f0 100644 --- a/docs/getting_started_with_workflow_development/running_a_workflow_locally.md +++ b/docs/getting_started_with_workflow_development/running_a_workflow_locally.md @@ -89,6 +89,10 @@ To download manually, see the [flytectl releases](https://github.com/flyteorg/fl :::{tab-item} Linux To use `curl`, on the command line, run the following: +```{warning} +[jq](https://jqlang.github.io/jq) is a dependency of this script. +``` + ```{prompt} bash $ curl -sL https://ctl.flyte.org/install | sudo bash -s -- -b /usr/local/bin ``` From fceb78f992b8f0a1851c127f91ceafc805a2a71d Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 5 Jun 2024 06:57:38 +0800 Subject: [PATCH 05/30] Fix flaky auto_refresh_test (#5438) Signed-off-by: Kevin Su --- flytestdlib/cache/auto_refresh_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flytestdlib/cache/auto_refresh_test.go b/flytestdlib/cache/auto_refresh_test.go index ca36b54e08..e798300f5d 100644 --- a/flytestdlib/cache/auto_refresh_test.go +++ b/flytestdlib/cache/auto_refresh_test.go @@ -84,13 +84,13 @@ func TestCacheFour(t *testing.T) { assert.NoError(t, err) } - // Wait half a second for all resync periods to complete - time.Sleep(500 * time.Millisecond) - for i := 1; i <= 10; i++ { - item, err := cache.Get(fmt.Sprintf("%d", i)) - assert.NoError(t, err) - assert.Equal(t, 10, item.(fakeCacheItem).val) - } + assert.EventuallyWithT(t, func(c *assert.CollectT) { + for i := 1; i <= 10; i++ { + item, err := cache.Get(fmt.Sprintf("%d", i)) + assert.NoError(c, err) + assert.Equal(c, 10, item.(fakeCacheItem).val) + } + }, 3*time.Second, 100*time.Millisecond) cancel() }) From 25c35961f7d39b75868c0cad312984d73aa245ae Mon Sep 17 00:00:00 2001 From: "Fabio M. Graetz, Ph.D" Date: Wed, 5 Jun 2024 23:41:01 +0200 Subject: [PATCH 06/30] Feat: Allow using in-cluster creds in control plane cluster in a multi-cluster deployment (#5403) * Allow using in-cluster creds in control plane cluster in multi-cluster deployment Signed-off-by: Fabio Graetz * Check inCluster flag in cluster config test Signed-off-by: Fabio Graetz --------- Signed-off-by: Fabio Graetz --- docs/deployment/deployment/multicluster.rst | 18 ++++++++++++++++-- flyteadmin/pkg/flytek8s/client.go | 2 +- flyteadmin/pkg/runtime/config_provider_test.go | 13 +++++++++++-- .../interfaces/cluster_configuration.go | 1 + .../pkg/runtime/testdata/clusters_config.yaml | 3 +++ 5 files changed, 32 insertions(+), 5 deletions(-) diff --git a/docs/deployment/deployment/multicluster.rst b/docs/deployment/deployment/multicluster.rst index 23a1169c08..f6633e7a04 100644 --- a/docs/deployment/deployment/multicluster.rst +++ b/docs/deployment/deployment/multicluster.rst @@ -386,8 +386,22 @@ label has to be 1. .. note:: This step will disable ``flytepropeller`` in the control plane cluster, leaving no possibility of running workflows there. If you require - the control plane to run workflows, edit the ``values-controlplane.yaml`` file and set ``flytepropeller.enabled`` to ``true``. Then, perform the ``helm upgrade`` operation and complete the steps in :ref:`this section ` to configure it - as a dataplane cluster. + the control plane to run workflows, edit the ``values-controlplane.yaml`` file and set ``flytepropeller.enabled`` to ``true`` and add one + additional cluster config for the control plane cluster itself: + + .. code-block:: yaml + :caption: values-override.yaml + + configmap: + clusters: + clusterConfigs: + - name: "dataplane_1" + ... + - name: "controlplane" + enabled: true + inCluster: true # Use in-cluster credentials + + Then, perform the ``helm upgrade`` operation. .. tab-set:: diff --git a/flyteadmin/pkg/flytek8s/client.go b/flyteadmin/pkg/flytek8s/client.go index fda427a84c..340e4319b0 100644 --- a/flyteadmin/pkg/flytek8s/client.go +++ b/flyteadmin/pkg/flytek8s/client.go @@ -54,7 +54,7 @@ func GetRestClientConfig(kubeConfigPathString, master string, return nil, errors.NewFlyteAdminErrorf(codes.InvalidArgument, "Error building kubeconfig: %v", err) } logger.Debugf(context.Background(), "successfully loaded kube config from %s", kubeConfigPathString) - } else if k8sCluster != nil { + } else if k8sCluster != nil && !k8sCluster.InCluster { kubeConfiguration, err = RemoteClusterConfig(k8sCluster.Endpoint, k8sCluster.Auth) if err != nil { return nil, err diff --git a/flyteadmin/pkg/runtime/config_provider_test.go b/flyteadmin/pkg/runtime/config_provider_test.go index 7f61cd2e07..06dc6bb6d6 100644 --- a/flyteadmin/pkg/runtime/config_provider_test.go +++ b/flyteadmin/pkg/runtime/config_provider_test.go @@ -32,7 +32,7 @@ func TestClusterConfig(t *testing.T) { configProvider := NewConfigurationProvider() clusterConfig := configProvider.ClusterConfiguration() clusters := clusterConfig.GetClusterConfigs() - assert.Equal(t, 2, len(clusters)) + assert.Equal(t, 3, len(clusters)) assert.Equal(t, "testcluster", clusters[0].Name) assert.Equal(t, "testcluster_endpoint", clusters[0].Endpoint) @@ -40,14 +40,23 @@ func TestClusterConfig(t *testing.T) { assert.Equal(t, "/path/to/testcluster/token", clusters[0].Auth.TokenPath) assert.Equal(t, "file_path", clusters[0].Auth.Type) assert.False(t, clusters[0].Enabled) + assert.Equal(t, false, clusters[0].InCluster) assert.Equal(t, "testcluster2", clusters[1].Name) assert.Equal(t, "testcluster2_endpoint", clusters[1].Endpoint) assert.Equal(t, "/path/to/testcluster2/cert", clusters[1].Auth.CertPath) assert.Equal(t, "/path/to/testcluster2/token", clusters[1].Auth.TokenPath) assert.True(t, clusters[1].Enabled) - assert.Equal(t, "file_path", clusters[1].Auth.Type) + assert.Equal(t, false, clusters[1].InCluster) + + assert.Equal(t, "testcluster3", clusters[2].Name) + assert.Equal(t, "", clusters[2].Endpoint) + assert.Equal(t, "", clusters[2].Auth.CertPath) + assert.Equal(t, "", clusters[2].Auth.TokenPath) + assert.True(t, clusters[2].Enabled) + assert.Equal(t, "", clusters[2].Auth.Type) + assert.Equal(t, true, clusters[2].InCluster) } func TestGetCloudEventsConfig(t *testing.T) { diff --git a/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go b/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go index 501d64aec5..b6a37637f1 100644 --- a/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go @@ -15,6 +15,7 @@ type ClusterConfig struct { Auth Auth `json:"auth"` Enabled bool `json:"enabled"` KubeClientConfig *config.KubeClientConfig `json:"kubeClientConfig,omitempty"` + InCluster bool `json:"inCluster"` } type Auth struct { diff --git a/flyteadmin/pkg/runtime/testdata/clusters_config.yaml b/flyteadmin/pkg/runtime/testdata/clusters_config.yaml index d391648ca5..92f5deee6b 100644 --- a/flyteadmin/pkg/runtime/testdata/clusters_config.yaml +++ b/flyteadmin/pkg/runtime/testdata/clusters_config.yaml @@ -13,3 +13,6 @@ clusters: type: "file_path" tokenPath: "/path/to/testcluster2/token" certPath: "/path/to/testcluster2/cert" + - name: "testcluster3" + enabled: true + inCluster: true From 38883c721dac2875bdd2333f4cd56e757e81ea5f Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Sat, 8 Jun 2024 10:35:15 +0800 Subject: [PATCH 07/30] Key-value execution tags (#5453) Signed-off-by: Kevin Su --- flyteadmin/pkg/common/entity.go | 1 + flyteadmin/pkg/common/filters.go | 12 +- .../pkg/manager/impl/execution_manager.go | 66 +++--- flyteadmin/pkg/manager/impl/util/filters.go | 5 +- .../pkg/repositories/config/migrations.go | 55 +++++ .../pkg/repositories/gormimpl/common.go | 4 +- .../repositories/gormimpl/execution_repo.go | 28 ++- .../gormimpl/execution_repo_test.go | 63 +++++- .../repositories/interfaces/execution_repo.go | 2 +- .../pkg/repositories/mocks/execution_repo.go | 2 +- .../pkg/repositories/models/execution.go | 14 +- .../repositories/transformers/execution.go | 38 +++- flyteadmin/tests/bootstrap.go | 2 + flyteadmin/tests/execution_test.go | 27 ++- .../gen/pb-es/flyteidl/admin/execution_pb.ts | 3 +- .../gen/pb-go/flyteidl/admin/execution.pb.go | 194 +++++++++--------- .../pb_python/flyteidl/admin/execution_pb2.py | 46 +++-- flyteidl/gen/pb_rust/flyteidl.admin.rs | 1 + .../protos/flyteidl/admin/execution.proto | 2 +- 19 files changed, 379 insertions(+), 186 deletions(-) diff --git a/flyteadmin/pkg/common/entity.go b/flyteadmin/pkg/common/entity.go index ed51d872b2..71c991dc4e 100644 --- a/flyteadmin/pkg/common/entity.go +++ b/flyteadmin/pkg/common/entity.go @@ -20,6 +20,7 @@ const ( Signal = "s" AdminTag = "at" ExecutionAdminTag = "eat" + ExecutionTag = "et" ) // ResourceTypeToEntity maps a resource type to an entity suitable for use with Database filters diff --git a/flyteadmin/pkg/common/filters.go b/flyteadmin/pkg/common/filters.go index a5974fb286..cf7987bdf5 100644 --- a/flyteadmin/pkg/common/filters.go +++ b/flyteadmin/pkg/common/filters.go @@ -256,6 +256,10 @@ func customizeField(field string, entity Entity) string { if entity == Execution && executionIdentifierFields[field] { return fmt.Sprintf("execution_%s", field) } + // admin_tag table has been migrated to an execution_tag table, so we need to customize the field name. + if entity == AdminTag && field == "name" { + return "key" + } return field } @@ -265,6 +269,10 @@ func customizeEntity(field string, entity Entity) Entity { if entity == NamedEntity && entityMetadataFields[field] { return NamedEntityMetadata } + // admin_tag table has been migrated to an execution_tag table. + if entity == AdminTag { + return ExecutionTag + } return entity } @@ -289,8 +297,10 @@ func NewRepeatedValueFilter(entity Entity, function FilterExpression, field stri return nil, GetInvalidRepeatedValueFilterErr(function) } customizedField := customizeField(field, entity) + customizedEntity := customizeEntity(field, entity) + return &inlineFilterImpl{ - entity: entity, + entity: customizedEntity, function: function, field: customizedField, repeatedValue: repeatedValue, diff --git a/flyteadmin/pkg/manager/impl/execution_manager.go b/flyteadmin/pkg/manager/impl/execution_manager.go index fb2e0d377c..977e1f8179 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager.go +++ b/flyteadmin/pkg/manager/impl/execution_manager.go @@ -819,29 +819,29 @@ func (m *ExecutionManager) fillInTemplateArgs(ctx context.Context, query core.Ar func (m *ExecutionManager) launchExecutionAndPrepareModel( ctx context.Context, request admin.ExecutionCreateRequest, requestedAt time.Time) ( - context.Context, *models.Execution, error) { + context.Context, *models.Execution, []*models.ExecutionTag, error) { err := validation.ValidateExecutionRequest(ctx, request, m.db, m.config.ApplicationConfiguration()) if err != nil { logger.Debugf(ctx, "Failed to validate ExecutionCreateRequest %+v with err %v", request, err) - return nil, nil, err + return nil, nil, nil, err } if request.Spec.LaunchPlan.ResourceType == core.ResourceType_TASK { logger.Debugf(ctx, "Launching single task execution with [%+v]", request.Spec.LaunchPlan) // When tasks can have defaults this will need to handle Artifacts as well. ctx, model, err := m.launchSingleTaskExecution(ctx, request, requestedAt) - return ctx, model, err + return ctx, model, nil, err } launchPlanModel, err := util.GetLaunchPlanModel(ctx, m.db, *request.Spec.LaunchPlan) if err != nil { logger.Debugf(ctx, "Failed to get launch plan model for ExecutionCreateRequest %+v with err %v", request, err) - return nil, nil, err + return nil, nil, nil, err } launchPlan, err := transformers.FromLaunchPlanModel(launchPlanModel) if err != nil { logger.Debugf(ctx, "Failed to transform launch plan model %+v with err %v", launchPlanModel, err) - return nil, nil, err + return nil, nil, nil, err } var lpExpectedInputs *core.ParameterMap @@ -860,23 +860,23 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( logger.Debugf(ctx, "Failed to CheckAndFetchInputsForExecution with request.Inputs: %+v"+ "fixed inputs: %+v and expected inputs: %+v with err %v", request.Inputs, launchPlan.Spec.FixedInputs, lpExpectedInputs, err) - return nil, nil, err + return nil, nil, nil, err } workflowModel, err := util.GetWorkflowModel(ctx, m.db, *launchPlan.Spec.WorkflowId) if err != nil { logger.Debugf(ctx, "Failed to get workflow with id %+v with err %v", launchPlan.Spec.WorkflowId, err) - return nil, nil, err + return nil, nil, nil, err } workflow, err := transformers.FromWorkflowModel(workflowModel) if err != nil { logger.Debugf(ctx, "Failed to get workflow with id %+v with err %v", launchPlan.Spec.WorkflowId, err) - return nil, nil, err + return nil, nil, nil, err } closure, err := util.FetchAndGetWorkflowClosure(ctx, m.storageClient, workflowModel.RemoteClosureIdentifier) if err != nil { logger.Debugf(ctx, "Failed to get workflow with id %+v with err %v", launchPlan.Spec.WorkflowId, err) - return nil, nil, err + return nil, nil, nil, err } closure.CreatedAt = workflow.Closure.CreatedAt workflow.Closure = closure @@ -900,7 +900,7 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( var sourceExecutionID uint parentNodeExecutionID, sourceExecutionID, err = m.getInheritedExecMetadata(ctx, requestSpec, &workflowExecutionID) if err != nil { - return nil, nil, err + return nil, nil, nil, err } // Dynamically assign task resource defaults. @@ -914,16 +914,16 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( inputsURI, err := common.OffloadLiteralMap(ctx, m.storageClient, executionInputs, workflowExecutionID.Project, workflowExecutionID.Domain, workflowExecutionID.Name, shared.Inputs) if err != nil { - return nil, nil, err + return nil, nil, nil, err } userInputsURI, err := common.OffloadLiteralMap(ctx, m.storageClient, request.Inputs, workflowExecutionID.Project, workflowExecutionID.Domain, workflowExecutionID.Name, shared.UserInputs) if err != nil { - return nil, nil, err + return nil, nil, nil, err } executionConfig, err := m.getExecutionConfig(ctx, &request, launchPlan) if err != nil { - return nil, nil, err + return nil, nil, nil, err } namespace := common.GetNamespaceName( @@ -931,15 +931,15 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( labels, err := resolveStringMap(executionConfig.GetLabels(), launchPlan.Spec.Labels, "labels", m.config.RegistrationValidationConfiguration().GetMaxLabelEntries()) if err != nil { - return nil, nil, err + return nil, nil, nil, err } labels, err = m.addProjectLabels(ctx, request.Project, labels) if err != nil { - return nil, nil, err + return nil, nil, nil, err } annotations, err := resolveStringMap(executionConfig.GetAnnotations(), launchPlan.Spec.Annotations, "annotations", m.config.RegistrationValidationConfiguration().GetMaxAnnotationEntries()) if err != nil { - return nil, nil, err + return nil, nil, nil, err } var rawOutputDataConfig *admin.RawOutputDataConfig if executionConfig.RawOutputDataConfig != nil { @@ -948,7 +948,7 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( clusterAssignment, err := m.getClusterAssignment(ctx, &request) if err != nil { - return nil, nil, err + return nil, nil, nil, err } var executionClusterLabel *admin.ExecutionClusterLabel @@ -972,7 +972,7 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( overrides, err := m.addPluginOverrides(ctx, &workflowExecutionID, launchPlan.GetSpec().WorkflowId.Name, launchPlan.Id.Name) if err != nil { - return nil, nil, err + return nil, nil, nil, err } if overrides != nil { executionParameters.TaskPluginOverrides = overrides @@ -1041,21 +1041,28 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( if err != nil { logger.Infof(ctx, "Failed to create execution model in transformer for id: [%+v] with err: %v", workflowExecutionID, err) - return nil, nil, err + return nil, nil, nil, err } - return ctx, executionModel, nil + executionTagModel, err := transformers.CreateExecutionTagModel(createExecModelInput) + if err != nil { + logger.Infof(ctx, "Failed to create execution tag model in transformer for id: [%+v] with err: %v", + workflowExecutionID, err) + return nil, nil, nil, err + } + + return ctx, executionModel, executionTagModel, nil } // Inserts an execution model into the database store and emits platform metrics. func (m *ExecutionManager) createExecutionModel( - ctx context.Context, executionModel *models.Execution) (*core.WorkflowExecutionIdentifier, error) { + ctx context.Context, executionModel *models.Execution, executionTagModel []*models.ExecutionTag) (*core.WorkflowExecutionIdentifier, error) { workflowExecutionIdentifier := core.WorkflowExecutionIdentifier{ Project: executionModel.ExecutionKey.Project, Domain: executionModel.ExecutionKey.Domain, Name: executionModel.ExecutionKey.Name, } - err := m.db.ExecutionRepo().Create(ctx, *executionModel) + err := m.db.ExecutionRepo().Create(ctx, *executionModel, executionTagModel) if err != nil { logger.Debugf(ctx, "failed to save newly created execution [%+v] with id %+v to db with err %v", workflowExecutionIdentifier, workflowExecutionIdentifier, err) @@ -1077,12 +1084,13 @@ func (m *ExecutionManager) CreateExecution( request.Inputs = request.GetSpec().GetInputs() } var executionModel *models.Execution + var executionTagModel []*models.ExecutionTag var err error - ctx, executionModel, err = m.launchExecutionAndPrepareModel(ctx, request, requestedAt) + ctx, executionModel, executionTagModel, err = m.launchExecutionAndPrepareModel(ctx, request, requestedAt) if err != nil { return nil, err } - workflowExecutionIdentifier, err := m.createExecutionModel(ctx, executionModel) + workflowExecutionIdentifier, err := m.createExecutionModel(ctx, executionModel, executionTagModel) if err != nil { return nil, err } @@ -1127,7 +1135,8 @@ func (m *ExecutionManager) RelaunchExecution( executionSpec.Metadata.ReferenceExecution = existingExecution.Id executionSpec.OverwriteCache = request.GetOverwriteCache() var executionModel *models.Execution - ctx, executionModel, err = m.launchExecutionAndPrepareModel(ctx, admin.ExecutionCreateRequest{ + var executionTagModel []*models.ExecutionTag + ctx, executionModel, executionTagModel, err = m.launchExecutionAndPrepareModel(ctx, admin.ExecutionCreateRequest{ Project: request.Id.Project, Domain: request.Id.Domain, Name: request.Name, @@ -1138,7 +1147,7 @@ func (m *ExecutionManager) RelaunchExecution( return nil, err } executionModel.SourceExecutionID = existingExecutionModel.ID - workflowExecutionIdentifier, err := m.createExecutionModel(ctx, executionModel) + workflowExecutionIdentifier, err := m.createExecutionModel(ctx, executionModel, executionTagModel) if err != nil { return nil, err } @@ -1178,7 +1187,8 @@ func (m *ExecutionManager) RecoverExecution( executionSpec.Metadata.Mode = admin.ExecutionMetadata_RECOVERED executionSpec.Metadata.ReferenceExecution = existingExecution.Id var executionModel *models.Execution - ctx, executionModel, err = m.launchExecutionAndPrepareModel(ctx, admin.ExecutionCreateRequest{ + var executionTagModel []*models.ExecutionTag + ctx, executionModel, executionTagModel, err = m.launchExecutionAndPrepareModel(ctx, admin.ExecutionCreateRequest{ Project: request.Id.Project, Domain: request.Id.Domain, Name: request.Name, @@ -1189,7 +1199,7 @@ func (m *ExecutionManager) RecoverExecution( return nil, err } executionModel.SourceExecutionID = existingExecutionModel.ID - workflowExecutionIdentifier, err := m.createExecutionModel(ctx, executionModel) + workflowExecutionIdentifier, err := m.createExecutionModel(ctx, executionModel, executionTagModel) if err != nil { return nil, err } diff --git a/flyteadmin/pkg/manager/impl/util/filters.go b/flyteadmin/pkg/manager/impl/util/filters.go index ccf6d6f9b1..dfdadc8dc2 100644 --- a/flyteadmin/pkg/manager/impl/util/filters.go +++ b/flyteadmin/pkg/manager/impl/util/filters.go @@ -64,6 +64,7 @@ var filterFieldEntityPrefix = map[string]common.Entity{ "signal": common.Signal, "admin_tag": common.AdminTag, "execution_admin_tag": common.ExecutionAdminTag, + "execution_tag": common.ExecutionTag, } func parseField(field string, primaryEntity common.Entity) (common.Entity, string) { @@ -121,7 +122,7 @@ func prepareValues(field string, values []string) (interface{}, error) { } var allowedJoinEntities = map[common.Entity]sets.String{ - common.Execution: sets.NewString(common.Execution, common.LaunchPlan, common.Workflow, common.Task, common.AdminTag), + common.Execution: sets.NewString(common.Execution, common.LaunchPlan, common.Workflow, common.Task, common.AdminTag, common.ExecutionTag), common.LaunchPlan: sets.NewString(common.LaunchPlan, common.Workflow), common.NodeExecution: sets.NewString(common.NodeExecution, common.Execution), common.NodeExecutionEvent: sets.NewString(common.NodeExecutionEvent), @@ -133,6 +134,7 @@ var allowedJoinEntities = map[common.Entity]sets.String{ common.Project: sets.NewString(common.Project), common.Signal: sets.NewString(common.Signal), common.AdminTag: sets.NewString(common.AdminTag), + common.ExecutionTag: sets.NewString(common.ExecutionTag), } var entityColumns = map[common.Entity]sets.String{ @@ -148,6 +150,7 @@ var entityColumns = map[common.Entity]sets.String{ common.Project: models.ProjectColumns, common.Signal: models.SignalColumns, common.AdminTag: models.AdminTagColumns, + common.ExecutionTag: models.ExecutionTagColumns, } func ParseFilters(filterParams string, primaryEntity common.Entity) ([]common.InlineFilter, error) { diff --git a/flyteadmin/pkg/repositories/config/migrations.go b/flyteadmin/pkg/repositories/config/migrations.go index b05da0d4c9..a2b39000d2 100644 --- a/flyteadmin/pkg/repositories/config/migrations.go +++ b/flyteadmin/pkg/repositories/config/migrations.go @@ -1222,6 +1222,61 @@ var ContinuedMigrations = []*gormigrate.Migration{ return tx.Table("launch_plans").Migrator().DropColumn(&models.LaunchPlan{}, "launch_condition_type") }, }, + + { + ID: "2024-06-06-execution-tags", + Migrate: func(tx *gorm.DB) error { + type ExecutionKey struct { + Project string `gorm:"primary_key;column:execution_project;size:255"` + Domain string `gorm:"primary_key;column:execution_domain;size:255"` + Name string `gorm:"primary_key;column:execution_name;size:255"` + } + + type ExecutionTag struct { + ID uint `gorm:"index;autoIncrement;not null"` + CreatedAt time.Time `gorm:"type:time"` + UpdatedAt time.Time `gorm:"type:time"` + DeletedAt *time.Time `gorm:"index"` + ExecutionKey + Key string `gorm:"primary_key;index:tag_key;size:255"` + Value string `gorm:"primary_key;index:tag_value;size:255"` + } + + return tx.Transaction(func(_ *gorm.DB) error { + // Create an execution_tags Table + if err := tx.AutoMigrate(&ExecutionTag{}); err != nil { + return err + } + // Drop execution_admin_tags and admin_tags tables, and create a new table execution_tags + // to store tags associated with executions. + sql := "INSERT INTO execution_tags (execution_project, execution_domain, execution_name, created_at, updated_at, deleted_at, key, value)" + + " SELECT execution_project, execution_domain, execution_name, created_at, updated_at, deleted_at, name as key, null as value" + + " FROM execution_admin_tags" + + " INNER JOIN admin_tags a on execution_admin_tags.admin_tag_id = a.id;" + if err := tx.Exec(sql).Error; err != nil { + return err + } + return nil + }) + }, + Rollback: func(tx *gorm.DB) error { + return tx.Migrator().DropTable("execution_tags") + }, + }, + + { + ID: "2024-06-06-drop-execution_admin-tags", + Migrate: func(tx *gorm.DB) error { + return tx.Migrator().DropTable("execution_admin_tags") + }, + }, + + { + ID: "2024-06-06-drop-admin-tags", + Migrate: func(tx *gorm.DB) error { + return tx.Migrator().DropTable("admin_tags") + }, + }, } var m = append(LegacyMigrations, NoopMigrations...) diff --git a/flyteadmin/pkg/repositories/gormimpl/common.go b/flyteadmin/pkg/repositories/gormimpl/common.go index 5b5885c212..40a54f8878 100644 --- a/flyteadmin/pkg/repositories/gormimpl/common.go +++ b/flyteadmin/pkg/repositories/gormimpl/common.go @@ -28,8 +28,7 @@ const taskExecutionTableName = "task_executions" const taskTableName = "tasks" const workflowTableName = "workflows" const descriptionEntityTableName = "description_entities" -const AdminTagsTableName = "admin_tags" -const executionAdminTagsTableName = "execution_admin_tags" +const executionTagsTableName = "execution_tags" const limit = "limit" const filters = "filters" @@ -49,6 +48,7 @@ var entityToTableName = map[common.Entity]string{ common.Signal: "signals", common.AdminTag: "admin_tags", common.ExecutionAdminTag: "execution_admin_tags", + common.ExecutionTag: "execution_tags", } var innerJoinExecToNodeExec = fmt.Sprintf( diff --git a/flyteadmin/pkg/repositories/gormimpl/execution_repo.go b/flyteadmin/pkg/repositories/gormimpl/execution_repo.go index c2957af0b6..69345fc06d 100644 --- a/flyteadmin/pkg/repositories/gormimpl/execution_repo.go +++ b/flyteadmin/pkg/repositories/gormimpl/execution_repo.go @@ -22,14 +22,24 @@ type ExecutionRepo struct { metrics gormMetrics } -func (r *ExecutionRepo) Create(ctx context.Context, input models.Execution) error { +func (r *ExecutionRepo) Create(ctx context.Context, input models.Execution, executionTagModel []*models.ExecutionTag) error { timer := r.metrics.CreateDuration.Start() - tx := r.db.WithContext(ctx).Omit("id").Create(&input) + err := r.db.WithContext(ctx).Transaction(func(_ *gorm.DB) error { + if len(executionTagModel) > 0 { + tx := r.db.WithContext(ctx).Create(executionTagModel) + if tx.Error != nil { + return r.errorTransformer.ToFlyteAdminError(tx.Error) + } + } + + tx := r.db.WithContext(ctx).Create(&input) + if tx.Error != nil { + return r.errorTransformer.ToFlyteAdminError(tx.Error) + } + return nil + }) timer.Stop() - if tx.Error != nil { - return r.errorTransformer.ToFlyteAdminError(tx.Error) - } - return nil + return err } func (r *ExecutionRepo) Get(ctx context.Context, input interfaces.Identifier) (models.Execution, error) { @@ -89,11 +99,9 @@ func (r *ExecutionRepo) List(ctx context.Context, input interfaces.ListResourceI taskTableName, executionTableName, taskTableName)) } - if ok := input.JoinTableEntities[common.AdminTag]; ok { + if ok := input.JoinTableEntities[common.ExecutionTag]; ok { tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.execution_name = %s.execution_name", - executionAdminTagsTableName, executionTableName, executionAdminTagsTableName)) - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.id = %s.admin_tag_id", - AdminTagsTableName, AdminTagsTableName, executionAdminTagsTableName)) + executionTagsTableName, executionTableName, executionTagsTableName)) } // Apply filters diff --git a/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go b/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go index e3483af7fc..1b4068d4f1 100644 --- a/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go +++ b/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go @@ -25,18 +25,30 @@ var executionUpdatedAt = time.Date(2018, time.February, 17, 00, 01, 00, 00, time func TestCreateExecution(t *testing.T) { executionRepo := NewExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) + executionKey := models.ExecutionKey{ + Project: "project", + Domain: "domain", + Name: "1", + } err := executionRepo.Create(context.Background(), models.Execution{ - ExecutionKey: models.ExecutionKey{ - Project: "project", - Domain: "domain", - Name: "1", - }, + ExecutionKey: executionKey, LaunchPlanID: uint(2), Phase: core.WorkflowExecution_SUCCEEDED.String(), Closure: []byte{1, 2}, Spec: []byte{3, 4}, StartedAt: &executionStartedAt, ExecutionCreatedAt: &createdAt, + }, []*models.ExecutionTag{ + { + ExecutionKey: executionKey, + Key: "hello", + Value: "world", + }, + { + ExecutionKey: executionKey, + Key: "rust", + Value: "", + }, }) assert.NoError(t, err) } @@ -305,6 +317,43 @@ func TestListExecutions_WithTags(t *testing.T) { assert.True(t, mockQuery.Triggered) } +func TestListExecutions_WithLabels(t *testing.T) { + executionRepo := NewExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) + + executions := make([]map[string]interface{}, 0) + GlobalMock := mocket.Catcher.Reset() + // Only match on queries that include ordering by name + mockQuery := GlobalMock.NewMock().WithQuery(`execution_name asc`) + mockQuery.WithReply(executions) + + sortParameter, err := common.NewSortParameter(&admin.Sort{ + Direction: admin.Sort_ASCENDING, + Key: "execution_name", + }, models.ExecutionColumns) + require.NoError(t, err) + + keys := []string{"rust", "tonic"} + values := []string{"foo", "bar"} + keyFilter, err := common.NewRepeatedValueFilter(common.ExecutionTag, common.ValueIn, "key", keys) + assert.NoError(t, err) + valueFilter, err := common.NewRepeatedValueFilter(common.ExecutionTag, common.ValueIn, "value", values) + assert.NoError(t, err) + + _, err = executionRepo.List(context.Background(), interfaces.ListResourceInput{ + SortParameter: sortParameter, + InlineFilters: []common.InlineFilter{ + getEqualityFilter(common.Task, "project", project), + getEqualityFilter(common.Task, "domain", domain), + getEqualityFilter(common.Task, "name", name), + keyFilter, + valueFilter, + }, + Limit: 20, + }) + assert.NoError(t, err) + assert.True(t, mockQuery.Triggered) +} + func TestListExecutions_MissingParameters(t *testing.T) { executionRepo := NewExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) _, err := executionRepo.List(context.Background(), interfaces.ListResourceInput{ @@ -348,9 +397,9 @@ func TestListExecutionsForWorkflow(t *testing.T) { GlobalMock := mocket.Catcher.Reset() GlobalMock.Logging = true // Only match on queries that append expected filters - GlobalMock.NewMock().WithQuery(`SELECT "executions"."id","executions"."created_at","executions"."updated_at","executions"."deleted_at","executions"."execution_project","executions"."execution_domain","executions"."execution_name","executions"."launch_plan_id","executions"."workflow_id","executions"."task_id","executions"."phase","executions"."closure","executions"."spec","executions"."started_at","executions"."execution_created_at","executions"."execution_updated_at","executions"."duration","executions"."abort_cause","executions"."mode","executions"."source_execution_id","executions"."parent_node_execution_id","executions"."cluster","executions"."inputs_uri","executions"."user_inputs_uri","executions"."error_kind","executions"."error_code","executions"."user","executions"."state","executions"."launch_entity" FROM "executions" INNER JOIN workflows ON executions.workflow_id = workflows.id INNER JOIN tasks ON executions.task_id = tasks.id WHERE executions.execution_project = $1 AND executions.execution_domain = $2 AND executions.execution_name = $3 AND workflows.name = $4 AND tasks.name = $5 AND execution_admin_tags.execution_tag_name in ($6,$7) LIMIT 20`).WithReply(executions) + GlobalMock.NewMock().WithQuery(`SELECT "executions"."id","executions"."created_at","executions"."updated_at","executions"."deleted_at","executions"."execution_project","executions"."execution_domain","executions"."execution_name","executions"."launch_plan_id","executions"."workflow_id","executions"."task_id","executions"."phase","executions"."closure","executions"."spec","executions"."started_at","executions"."execution_created_at","executions"."execution_updated_at","executions"."duration","executions"."abort_cause","executions"."mode","executions"."source_execution_id","executions"."parent_node_execution_id","executions"."cluster","executions"."inputs_uri","executions"."user_inputs_uri","executions"."error_kind","executions"."error_code","executions"."user","executions"."state","executions"."launch_entity" FROM "executions" INNER JOIN workflows ON executions.workflow_id = workflows.id INNER JOIN tasks ON executions.task_id = tasks.id WHERE executions.execution_project = $1 AND executions.execution_domain = $2 AND executions.execution_name = $3 AND workflows.name = $4 AND tasks.name = $5 AND execution_tags.key in ($6,$7) LIMIT 20`).WithReply(executions) vals := []string{"tag1", "tag2"} - tagFilter, err := common.NewRepeatedValueFilter(common.ExecutionAdminTag, common.ValueIn, "execution_tag_name", vals) + tagFilter, err := common.NewRepeatedValueFilter(common.AdminTag, common.ValueIn, "name", vals) assert.NoError(t, err) collection, err := executionRepo.List(context.Background(), interfaces.ListResourceInput{ InlineFilters: []common.InlineFilter{ diff --git a/flyteadmin/pkg/repositories/interfaces/execution_repo.go b/flyteadmin/pkg/repositories/interfaces/execution_repo.go index 29e46c69ca..7036b2f83c 100644 --- a/flyteadmin/pkg/repositories/interfaces/execution_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/execution_repo.go @@ -9,7 +9,7 @@ import ( // Defines the interface for interacting with workflow execution models. type ExecutionRepoInterface interface { // Inserts a workflow execution model into the database store. - Create(ctx context.Context, input models.Execution) error + Create(ctx context.Context, input models.Execution, executionTagModel []*models.ExecutionTag) error // This updates only an existing execution model with all non-empty fields in the input. Update(ctx context.Context, execution models.Execution) error // Returns a matching execution if it exists. diff --git a/flyteadmin/pkg/repositories/mocks/execution_repo.go b/flyteadmin/pkg/repositories/mocks/execution_repo.go index 8649bcaa3c..5b8bdf2a01 100644 --- a/flyteadmin/pkg/repositories/mocks/execution_repo.go +++ b/flyteadmin/pkg/repositories/mocks/execution_repo.go @@ -22,7 +22,7 @@ type MockExecutionRepo struct { countFunction CountExecutionFunc } -func (r *MockExecutionRepo) Create(ctx context.Context, input models.Execution) error { +func (r *MockExecutionRepo) Create(ctx context.Context, input models.Execution, executionTagModel []*models.ExecutionTag) error { if r.createFunction != nil { return r.createFunction(ctx, input) } diff --git a/flyteadmin/pkg/repositories/models/execution.go b/flyteadmin/pkg/repositories/models/execution.go index 4c236e093d..f148c95faf 100644 --- a/flyteadmin/pkg/repositories/models/execution.go +++ b/flyteadmin/pkg/repositories/models/execution.go @@ -72,6 +72,15 @@ type AdminTag struct { Name string `gorm:"index:,unique;size:255"` } +type ExecutionTag struct { + BaseModel + ExecutionKey + // The key of the tag. + Key string `gorm:"primary_key;index:tag_key;size:255"` + // The value of the tag. + Value string `gorm:"primary_key;index:tag_key;size:255"` +} + func (b *AdminTag) BeforeCreate(tx *gorm.DB) (err error) { tx.Statement.AddClause(clause.OnConflict{ Columns: []clause.Column{{Name: "name"}}, // key column @@ -81,6 +90,7 @@ func (b *AdminTag) BeforeCreate(tx *gorm.DB) (err error) { } var ( - ExecutionColumns = modelColumns(Execution{}) - AdminTagColumns = modelColumns(AdminTag{}) + ExecutionColumns = modelColumns(Execution{}) + AdminTagColumns = modelColumns(AdminTag{}) + ExecutionTagColumns = modelColumns(ExecutionTag{}) ) diff --git a/flyteadmin/pkg/repositories/transformers/execution.go b/flyteadmin/pkg/repositories/transformers/execution.go index 3b8c556abd..1d4e317ad8 100644 --- a/flyteadmin/pkg/repositories/transformers/execution.go +++ b/flyteadmin/pkg/repositories/transformers/execution.go @@ -111,10 +111,6 @@ func CreateExecutionModel(input CreateExecutionModelInput) (*models.Execution, e } activeExecution := int32(admin.ExecutionState_EXECUTION_ACTIVE) - tags := make([]models.AdminTag, len(input.RequestSpec.Tags)) - for i, tag := range input.RequestSpec.Tags { - tags[i] = models.AdminTag{Name: tag} - } executionModel := &models.Execution{ ExecutionKey: models.ExecutionKey{ @@ -136,7 +132,6 @@ func CreateExecutionModel(input CreateExecutionModelInput) (*models.Execution, e User: requestSpec.Metadata.Principal, State: &activeExecution, LaunchEntity: strings.ToLower(input.LaunchEntity.String()), - Tags: tags, } // A reference launch entity can be one of either or a task OR launch plan. Traditionally, workflows are executed // with a reference launch plan which is why this behavior is the default below. @@ -152,6 +147,39 @@ func CreateExecutionModel(input CreateExecutionModelInput) (*models.Execution, e return executionModel, nil } +// CreateExecutionTagModel transforms a CreateExecutionModelInput to a ExecutionTag model +func CreateExecutionTagModel(input CreateExecutionModelInput) ([]*models.ExecutionTag, error) { + tags := make([]*models.ExecutionTag, 0) + + if input.RequestSpec.Labels != nil { + for k, v := range input.RequestSpec.Labels.Values { + tags = append(tags, &models.ExecutionTag{ + ExecutionKey: models.ExecutionKey{ + Project: input.WorkflowExecutionID.Project, + Domain: input.WorkflowExecutionID.Domain, + Name: input.WorkflowExecutionID.Name, + }, + Key: k, + Value: v, + }) + } + } + + for _, v := range input.RequestSpec.Tags { + tags = append(tags, &models.ExecutionTag{ + ExecutionKey: models.ExecutionKey{ + Project: input.WorkflowExecutionID.Project, + Domain: input.WorkflowExecutionID.Domain, + Name: input.WorkflowExecutionID.Name, + }, + Key: v, + Value: "", + }) + } + + return tags, nil +} + func reassignCluster(ctx context.Context, cluster string, executionID *core.WorkflowExecutionIdentifier, execution *models.Execution) error { logger.Debugf(ctx, "Updating cluster for execution [%v] with existing recorded cluster [%s] and setting to cluster [%s]", executionID, execution.Cluster, cluster) diff --git a/flyteadmin/tests/bootstrap.go b/flyteadmin/tests/bootstrap.go index aa1808282d..02fb86cefa 100644 --- a/flyteadmin/tests/bootstrap.go +++ b/flyteadmin/tests/bootstrap.go @@ -86,6 +86,7 @@ func truncateAllTablesForTestingOnly() { TruncateSchedulableEntitiesSnapshots := fmt.Sprintf("TRUNCATE TABLE schedule_entities_snapshots;") TruncateAdminTags := fmt.Sprintf("TRUNCATE TABLE admin_tags;") TruncateExecutionAdminTags := fmt.Sprintf("TRUNCATE TABLE execution_admin_tags;") + TruncateExecutionTags := fmt.Sprintf("TRUNCATE TABLE execution_tags;") ctx := context.Background() db, err := repositories.GetDB(ctx, getDbConfig(), getLoggerConfig()) if err != nil { @@ -116,6 +117,7 @@ func truncateAllTablesForTestingOnly() { db.Exec(TruncateSchedulableEntitiesSnapshots) db.Exec(TruncateAdminTags) db.Exec(TruncateExecutionAdminTags) + db.Exec(TruncateExecutionTags) } func populateWorkflowExecutionForTestingOnly(project, domain, name string) { diff --git a/flyteadmin/tests/execution_test.go b/flyteadmin/tests/execution_test.go index d0d373a1d5..a3d226562b 100644 --- a/flyteadmin/tests/execution_test.go +++ b/flyteadmin/tests/execution_test.go @@ -184,13 +184,11 @@ func populateWorkflowExecutionsForTestingOnly() { db.Exec(`INSERT INTO workflows ("id", "project", "domain", "name", "version", "remote_closure_identifier") ` + `VALUES (4, 'project2', 'domain2', 'name2', 'version1', 's3://foo')`) - // Insert dummy tags - db.Exec(`INSERT INTO admin_tags ("id", "name") ` + `VALUES (1, 'hello')`) - db.Exec(`INSERT INTO admin_tags ("id", "name") ` + `VALUES (2, 'flyte')`) - db.Exec(`INSERT INTO execution_admin_tags ("execution_project", "execution_domain", "execution_name", "admin_tag_id") ` + `VALUES ('project1', 'domain1', 'name1', 1)`) - db.Exec(`INSERT INTO execution_admin_tags ("execution_project", "execution_domain", "execution_name", "admin_tag_id") ` + `VALUES ('project1', 'domain1', 'name1', 2)`) - db.Exec(`INSERT INTO execution_admin_tags ("execution_project", "execution_domain", "execution_name", "admin_tag_id") ` + `VALUES ('project1', 'domain1', 'name3', 2)`) - db.Exec(`INSERT INTO execution_admin_tags ("execution_project", "execution_domain", "execution_name", "admin_tag_id") ` + `VALUES ('project1', 'domain1', 'name4', 1)`) + // Insert dummy labels + db.Exec(`INSERT INTO execution_tags ("execution_project", "execution_domain", "execution_name", "key", "value") ` + `VALUES ('project1', 'domain1', 'name1', 'key1', 'value1')`) + db.Exec(`INSERT INTO execution_tags ("execution_project", "execution_domain", "execution_name", "key", "value") ` + `VALUES ('project1', 'domain1', 'name1', 'key1', 'value2')`) + db.Exec(`INSERT INTO execution_tags ("execution_project", "execution_domain", "execution_name", "key", "value") ` + `VALUES ('project1', 'domain1', 'name1', 'key2', 'value2')`) + db.Exec(`INSERT INTO execution_tags ("execution_project", "execution_domain", "execution_name", "key", "value") ` + `VALUES ('project1', 'domain1', 'name1', 'key3', 'value3')`) for _, statement := range insertExecutionStatements { db.Exec(statement) @@ -216,7 +214,7 @@ func TestListWorkflowExecutions(t *testing.T) { assert.Equal(t, len(resp.Executions), 4) } -func TestListWorkflowExecutionsWithTags(t *testing.T) { +func TestListWorkflowExecutionsWithLabels(t *testing.T) { truncateAllTablesForTestingOnly() populateWorkflowExecutionsForTestingOnly() @@ -230,7 +228,18 @@ func TestListWorkflowExecutionsWithTags(t *testing.T) { Domain: "domain1", }, Limit: 5, - Filters: "value_in(admin_tag.name, hello)", + Filters: "value_in(execution_tag.key, key1)", + }) + assert.Nil(t, err) + assert.Equal(t, len(resp.Executions), 2) + + resp, err = client.ListExecutions(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: "project1", + Domain: "domain1", + }, + Limit: 5, + Filters: "value_in(execution_tag.value, value2)", }) assert.Nil(t, err) assert.Equal(t, len(resp.Executions), 2) diff --git a/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts b/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts index 88a9a1865f..5ba9f62ca6 100644 --- a/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts @@ -1113,7 +1113,8 @@ export class ExecutionSpec extends Message { /** * Tags to be set for the execution. * - * @generated from field: repeated string tags = 24; + * @generated from field: repeated string tags = 24 [deprecated = true]; + * @deprecated */ tags: string[] = []; diff --git a/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go index b026cbf07a..1b878ceeb6 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go @@ -1266,6 +1266,8 @@ type ExecutionSpec struct { // Environment variables to be set for the execution. Envs *Envs `protobuf:"bytes,23,opt,name=envs,proto3" json:"envs,omitempty"` // Tags to be set for the execution. + // + // Deprecated: Marked as deprecated in flyteidl/admin/execution.proto. Tags []string `protobuf:"bytes,24,rep,name=tags,proto3" json:"tags,omitempty"` // Execution cluster label to be set for the execution. ExecutionClusterLabel *ExecutionClusterLabel `protobuf:"bytes,25,opt,name=execution_cluster_label,json=executionClusterLabel,proto3" json:"execution_cluster_label,omitempty"` @@ -1426,6 +1428,7 @@ func (x *ExecutionSpec) GetEnvs() *Envs { return nil } +// Deprecated: Marked as deprecated in flyteidl/admin/execution.proto. func (x *ExecutionSpec) GetTags() []string { if x != nil { return x.Tags @@ -2185,7 +2188,7 @@ var file_flyteidl_admin_execution_proto_rawDesc = []byte{ 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, + 0x0d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd6, 0x09, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3a, 0x0a, 0x0b, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, @@ -2247,104 +2250,105 @@ var file_flyteidl_admin_execution_proto_rawDesc = []byte{ 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x73, 0x52, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x5d, 0x0a, 0x17, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x19, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x15, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x12, 0x61, 0x0a, 0x19, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, - 0x76, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x1a, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, - 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x4a, 0x04, 0x08, - 0x04, 0x10, 0x05, 0x22, 0x6d, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x75, - 0x73, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x5d, 0x0a, 0x1f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x88, 0x02, 0x0a, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x42, 0x6c, 0x6f, 0x62, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x06, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x72, 0x6c, - 0x42, 0x6c, 0x6f, 0x62, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, - 0x12, 0x3a, 0x0a, 0x0b, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, - 0x52, 0x0a, 0x66, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0c, - 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x0b, 0x66, - 0x75, 0x6c, 0x6c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x34, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x1b, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x73, 0x52, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x12, 0x16, 0x0a, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x17, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, - 0x0b, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x19, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x76, 0x0a, 0x22, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x15, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x12, 0x61, 0x0a, 0x19, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x76, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x17, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x41, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x6d, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x0a, 0x1f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x88, 0x02, 0x0a, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x42, 0x6c, + 0x6f, 0x62, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, + 0x33, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x55, 0x72, 0x6c, 0x42, 0x6c, 0x6f, 0x62, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x0b, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x0a, 0x66, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, + 0x12, 0x3c, 0x0a, 0x0c, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, + 0x70, 0x52, 0x0b, 0x66, 0x75, 0x6c, 0x6c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x8a, + 0x01, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0x4e, 0x0a, 0x23, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x2a, 0x3e, 0x0a, 0x0e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, - 0x10, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x45, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x12, - 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x42, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, - 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xca, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xe2, 0x02, 0x1a, 0x46, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x1b, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x19, 0x0a, 0x17, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x76, 0x0a, 0x22, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, + 0x4e, 0x0a, 0x23, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x2a, + 0x3e, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x58, 0x45, 0x43, 0x55, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x42, + 0xba, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x46, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xca, 0x02, 0x0e, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xe2, 0x02, 0x1a, + 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py index a89ed51e3f..ff650d4c55 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py @@ -26,7 +26,7 @@ from flyteidl.admin import matchable_resource_pb2 as flyteidl_dot_admin_dot_matchable__resource__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x66lyteidl/admin/execution.proto\x12\x0e\x66lyteidl.admin\x1a\'flyteidl/admin/cluster_assignment.proto\x1a\x1b\x66lyteidl/admin/common.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\"flyteidl/core/execution_envs.proto\x1a\x1f\x66lyteidl/core/artifact_id.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1c\x66lyteidl/core/security.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\'flyteidl/admin/matchable_resource.proto\"\xd6\x01\n\x16\x45xecutionCreateRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x31\n\x04spec\x18\x04 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12\x31\n\x06inputs\x18\x05 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x10\n\x03org\x18\x06 \x01(\tR\x03org\"\x99\x01\n\x18\x45xecutionRelaunchRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\'\n\x0foverwrite_cache\x18\x04 \x01(\x08R\x0eoverwriteCacheJ\x04\x08\x02\x10\x03\"\xa8\x01\n\x17\x45xecutionRecoverRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\"U\n\x17\x45xecutionCreateResponse\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"Y\n\x1bWorkflowExecutionGetRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\xb6\x01\n\tExecution\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x31\n\x04spec\x18\x02 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12:\n\x07\x63losure\x18\x03 \x01(\x0b\x32 .flyteidl.admin.ExecutionClosureR\x07\x63losure\"`\n\rExecutionList\x12\x39\n\nexecutions\x18\x01 \x03(\x0b\x32\x19.flyteidl.admin.ExecutionR\nexecutions\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"e\n\x0eLiteralMapBlob\x12\x37\n\x06values\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\x06values\x12\x12\n\x03uri\x18\x02 \x01(\tH\x00R\x03uriB\x06\n\x04\x64\x61ta\"C\n\rAbortMetadata\x12\x14\n\x05\x63\x61use\x18\x01 \x01(\tR\x05\x63\x61use\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\"\x98\x07\n\x10\x45xecutionClosure\x12>\n\x07outputs\x18\x01 \x01(\x0b\x32\x1e.flyteidl.admin.LiteralMapBlobB\x02\x18\x01H\x00R\x07outputs\x12\x35\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x1d.flyteidl.core.ExecutionErrorH\x00R\x05\x65rror\x12%\n\x0b\x61\x62ort_cause\x18\n \x01(\tB\x02\x18\x01H\x00R\nabortCause\x12\x46\n\x0e\x61\x62ort_metadata\x18\x0c \x01(\x0b\x32\x1d.flyteidl.admin.AbortMetadataH\x00R\rabortMetadata\x12@\n\x0boutput_data\x18\r \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\noutputData\x12\x46\n\x0f\x63omputed_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x0e\x63omputedInputs\x12<\n\x05phase\x18\x04 \x01(\x0e\x32&.flyteidl.core.WorkflowExecution.PhaseR\x05phase\x12\x39\n\nstarted_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartedAt\x12\x35\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x42\n\rnotifications\x18\t \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\x12:\n\x0bworkflow_id\x18\x0b \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nworkflowId\x12]\n\x14state_change_details\x18\x0e \x01(\x0b\x32+.flyteidl.admin.ExecutionStateChangeDetailsR\x12stateChangeDetailsB\x0f\n\routput_result\"[\n\x0eSystemMetadata\x12+\n\x11\x65xecution_cluster\x18\x01 \x01(\tR\x10\x65xecutionCluster\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\"\x85\x05\n\x11\x45xecutionMetadata\x12\x43\n\x04mode\x18\x01 \x01(\x0e\x32/.flyteidl.admin.ExecutionMetadata.ExecutionModeR\x04mode\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\x12\x18\n\x07nesting\x18\x03 \x01(\rR\x07nesting\x12=\n\x0cscheduled_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bscheduledAt\x12Z\n\x15parent_node_execution\x18\x05 \x01(\x0b\x32&.flyteidl.core.NodeExecutionIdentifierR\x13parentNodeExecution\x12[\n\x13reference_execution\x18\x10 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x12referenceExecution\x12G\n\x0fsystem_metadata\x18\x11 \x01(\x0b\x32\x1e.flyteidl.admin.SystemMetadataR\x0esystemMetadata\x12<\n\x0c\x61rtifact_ids\x18\x12 \x03(\x0b\x32\x19.flyteidl.core.ArtifactIDR\x0b\x61rtifactIds\"t\n\rExecutionMode\x12\n\n\x06MANUAL\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0c\n\x08RELAUNCH\x10\x03\x12\x12\n\x0e\x43HILD_WORKFLOW\x10\x04\x12\r\n\tRECOVERED\x10\x05\x12\x0b\n\x07TRIGGER\x10\x06\"V\n\x10NotificationList\x12\x42\n\rnotifications\x18\x01 \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\"\xd2\t\n\rExecutionSpec\x12:\n\x0blaunch_plan\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nlaunchPlan\x12\x35\n\x06inputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x06inputs\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\x12H\n\rnotifications\x18\x05 \x01(\x0b\x32 .flyteidl.admin.NotificationListH\x00R\rnotifications\x12!\n\x0b\x64isable_all\x18\x06 \x01(\x08H\x00R\ndisableAll\x12.\n\x06labels\x18\x07 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12=\n\x0b\x61nnotations\x18\x08 \x01(\x0b\x32\x1b.flyteidl.admin.AnnotationsR\x0b\x61nnotations\x12I\n\x10security_context\x18\n \x01(\x0b\x32\x1e.flyteidl.core.SecurityContextR\x0fsecurityContext\x12\x39\n\tauth_role\x18\x10 \x01(\x0b\x32\x18.flyteidl.admin.AuthRoleB\x02\x18\x01R\x08\x61uthRole\x12M\n\x12quality_of_service\x18\x11 \x01(\x0b\x32\x1f.flyteidl.core.QualityOfServiceR\x10qualityOfService\x12\'\n\x0fmax_parallelism\x18\x12 \x01(\x05R\x0emaxParallelism\x12X\n\x16raw_output_data_config\x18\x13 \x01(\x0b\x32#.flyteidl.admin.RawOutputDataConfigR\x13rawOutputDataConfig\x12P\n\x12\x63luster_assignment\x18\x14 \x01(\x0b\x32!.flyteidl.admin.ClusterAssignmentR\x11\x63lusterAssignment\x12@\n\rinterruptible\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.BoolValueR\rinterruptible\x12\'\n\x0foverwrite_cache\x18\x16 \x01(\x08R\x0eoverwriteCache\x12(\n\x04\x65nvs\x18\x17 \x01(\x0b\x32\x14.flyteidl.admin.EnvsR\x04\x65nvs\x12\x12\n\x04tags\x18\x18 \x03(\tR\x04tags\x12]\n\x17\x65xecution_cluster_label\x18\x19 \x01(\x0b\x32%.flyteidl.admin.ExecutionClusterLabelR\x15\x65xecutionClusterLabel\x12\x61\n\x19\x65xecution_env_assignments\x18\x1a \x03(\x0b\x32%.flyteidl.core.ExecutionEnvAssignmentR\x17\x65xecutionEnvAssignmentsB\x18\n\x16notification_overridesJ\x04\x08\x04\x10\x05\"m\n\x19\x45xecutionTerminateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x63\x61use\x18\x02 \x01(\tR\x05\x63\x61use\"\x1c\n\x1a\x45xecutionTerminateResponse\"]\n\x1fWorkflowExecutionGetDataRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\x88\x02\n WorkflowExecutionGetDataResponse\x12\x35\n\x07outputs\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x07outputs\x12\x33\n\x06inputs\x18\x02 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x06inputs\x12:\n\x0b\x66ull_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\nfullInputs\x12<\n\x0c\x66ull_outputs\x18\x04 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x0b\x66ullOutputs\"\x8a\x01\n\x16\x45xecutionUpdateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\"\xae\x01\n\x1b\x45xecutionStateChangeDetails\x12\x34\n\x05state\x18\x01 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\x12;\n\x0boccurred_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\noccurredAt\x12\x1c\n\tprincipal\x18\x03 \x01(\tR\tprincipal\"\x19\n\x17\x45xecutionUpdateResponse\"v\n\"WorkflowExecutionGetMetricsRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x64\x65pth\x18\x02 \x01(\x05R\x05\x64\x65pth\"N\n#WorkflowExecutionGetMetricsResponse\x12\'\n\x04span\x18\x01 \x01(\x0b\x32\x13.flyteidl.core.SpanR\x04span*>\n\x0e\x45xecutionState\x12\x14\n\x10\x45XECUTION_ACTIVE\x10\x00\x12\x16\n\x12\x45XECUTION_ARCHIVED\x10\x01\x42\xba\x01\n\x12\x63om.flyteidl.adminB\x0e\x45xecutionProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x66lyteidl/admin/execution.proto\x12\x0e\x66lyteidl.admin\x1a\'flyteidl/admin/cluster_assignment.proto\x1a\x1b\x66lyteidl/admin/common.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\"flyteidl/core/execution_envs.proto\x1a\x1f\x66lyteidl/core/artifact_id.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1c\x66lyteidl/core/security.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\'flyteidl/admin/matchable_resource.proto\"\xd6\x01\n\x16\x45xecutionCreateRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x31\n\x04spec\x18\x04 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12\x31\n\x06inputs\x18\x05 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x10\n\x03org\x18\x06 \x01(\tR\x03org\"\x99\x01\n\x18\x45xecutionRelaunchRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\'\n\x0foverwrite_cache\x18\x04 \x01(\x08R\x0eoverwriteCacheJ\x04\x08\x02\x10\x03\"\xa8\x01\n\x17\x45xecutionRecoverRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\"U\n\x17\x45xecutionCreateResponse\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"Y\n\x1bWorkflowExecutionGetRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\xb6\x01\n\tExecution\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x31\n\x04spec\x18\x02 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12:\n\x07\x63losure\x18\x03 \x01(\x0b\x32 .flyteidl.admin.ExecutionClosureR\x07\x63losure\"`\n\rExecutionList\x12\x39\n\nexecutions\x18\x01 \x03(\x0b\x32\x19.flyteidl.admin.ExecutionR\nexecutions\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"e\n\x0eLiteralMapBlob\x12\x37\n\x06values\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\x06values\x12\x12\n\x03uri\x18\x02 \x01(\tH\x00R\x03uriB\x06\n\x04\x64\x61ta\"C\n\rAbortMetadata\x12\x14\n\x05\x63\x61use\x18\x01 \x01(\tR\x05\x63\x61use\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\"\x98\x07\n\x10\x45xecutionClosure\x12>\n\x07outputs\x18\x01 \x01(\x0b\x32\x1e.flyteidl.admin.LiteralMapBlobB\x02\x18\x01H\x00R\x07outputs\x12\x35\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x1d.flyteidl.core.ExecutionErrorH\x00R\x05\x65rror\x12%\n\x0b\x61\x62ort_cause\x18\n \x01(\tB\x02\x18\x01H\x00R\nabortCause\x12\x46\n\x0e\x61\x62ort_metadata\x18\x0c \x01(\x0b\x32\x1d.flyteidl.admin.AbortMetadataH\x00R\rabortMetadata\x12@\n\x0boutput_data\x18\r \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\noutputData\x12\x46\n\x0f\x63omputed_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x0e\x63omputedInputs\x12<\n\x05phase\x18\x04 \x01(\x0e\x32&.flyteidl.core.WorkflowExecution.PhaseR\x05phase\x12\x39\n\nstarted_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartedAt\x12\x35\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x42\n\rnotifications\x18\t \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\x12:\n\x0bworkflow_id\x18\x0b \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nworkflowId\x12]\n\x14state_change_details\x18\x0e \x01(\x0b\x32+.flyteidl.admin.ExecutionStateChangeDetailsR\x12stateChangeDetailsB\x0f\n\routput_result\"[\n\x0eSystemMetadata\x12+\n\x11\x65xecution_cluster\x18\x01 \x01(\tR\x10\x65xecutionCluster\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\"\x85\x05\n\x11\x45xecutionMetadata\x12\x43\n\x04mode\x18\x01 \x01(\x0e\x32/.flyteidl.admin.ExecutionMetadata.ExecutionModeR\x04mode\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\x12\x18\n\x07nesting\x18\x03 \x01(\rR\x07nesting\x12=\n\x0cscheduled_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bscheduledAt\x12Z\n\x15parent_node_execution\x18\x05 \x01(\x0b\x32&.flyteidl.core.NodeExecutionIdentifierR\x13parentNodeExecution\x12[\n\x13reference_execution\x18\x10 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x12referenceExecution\x12G\n\x0fsystem_metadata\x18\x11 \x01(\x0b\x32\x1e.flyteidl.admin.SystemMetadataR\x0esystemMetadata\x12<\n\x0c\x61rtifact_ids\x18\x12 \x03(\x0b\x32\x19.flyteidl.core.ArtifactIDR\x0b\x61rtifactIds\"t\n\rExecutionMode\x12\n\n\x06MANUAL\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0c\n\x08RELAUNCH\x10\x03\x12\x12\n\x0e\x43HILD_WORKFLOW\x10\x04\x12\r\n\tRECOVERED\x10\x05\x12\x0b\n\x07TRIGGER\x10\x06\"V\n\x10NotificationList\x12\x42\n\rnotifications\x18\x01 \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\"\xd6\t\n\rExecutionSpec\x12:\n\x0blaunch_plan\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nlaunchPlan\x12\x35\n\x06inputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x06inputs\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\x12H\n\rnotifications\x18\x05 \x01(\x0b\x32 .flyteidl.admin.NotificationListH\x00R\rnotifications\x12!\n\x0b\x64isable_all\x18\x06 \x01(\x08H\x00R\ndisableAll\x12.\n\x06labels\x18\x07 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12=\n\x0b\x61nnotations\x18\x08 \x01(\x0b\x32\x1b.flyteidl.admin.AnnotationsR\x0b\x61nnotations\x12I\n\x10security_context\x18\n \x01(\x0b\x32\x1e.flyteidl.core.SecurityContextR\x0fsecurityContext\x12\x39\n\tauth_role\x18\x10 \x01(\x0b\x32\x18.flyteidl.admin.AuthRoleB\x02\x18\x01R\x08\x61uthRole\x12M\n\x12quality_of_service\x18\x11 \x01(\x0b\x32\x1f.flyteidl.core.QualityOfServiceR\x10qualityOfService\x12\'\n\x0fmax_parallelism\x18\x12 \x01(\x05R\x0emaxParallelism\x12X\n\x16raw_output_data_config\x18\x13 \x01(\x0b\x32#.flyteidl.admin.RawOutputDataConfigR\x13rawOutputDataConfig\x12P\n\x12\x63luster_assignment\x18\x14 \x01(\x0b\x32!.flyteidl.admin.ClusterAssignmentR\x11\x63lusterAssignment\x12@\n\rinterruptible\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.BoolValueR\rinterruptible\x12\'\n\x0foverwrite_cache\x18\x16 \x01(\x08R\x0eoverwriteCache\x12(\n\x04\x65nvs\x18\x17 \x01(\x0b\x32\x14.flyteidl.admin.EnvsR\x04\x65nvs\x12\x16\n\x04tags\x18\x18 \x03(\tB\x02\x18\x01R\x04tags\x12]\n\x17\x65xecution_cluster_label\x18\x19 \x01(\x0b\x32%.flyteidl.admin.ExecutionClusterLabelR\x15\x65xecutionClusterLabel\x12\x61\n\x19\x65xecution_env_assignments\x18\x1a \x03(\x0b\x32%.flyteidl.core.ExecutionEnvAssignmentR\x17\x65xecutionEnvAssignmentsB\x18\n\x16notification_overridesJ\x04\x08\x04\x10\x05\"m\n\x19\x45xecutionTerminateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x63\x61use\x18\x02 \x01(\tR\x05\x63\x61use\"\x1c\n\x1a\x45xecutionTerminateResponse\"]\n\x1fWorkflowExecutionGetDataRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\x88\x02\n WorkflowExecutionGetDataResponse\x12\x35\n\x07outputs\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x07outputs\x12\x33\n\x06inputs\x18\x02 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x06inputs\x12:\n\x0b\x66ull_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\nfullInputs\x12<\n\x0c\x66ull_outputs\x18\x04 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x0b\x66ullOutputs\"\x8a\x01\n\x16\x45xecutionUpdateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\"\xae\x01\n\x1b\x45xecutionStateChangeDetails\x12\x34\n\x05state\x18\x01 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\x12;\n\x0boccurred_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\noccurredAt\x12\x1c\n\tprincipal\x18\x03 \x01(\tR\tprincipal\"\x19\n\x17\x45xecutionUpdateResponse\"v\n\"WorkflowExecutionGetMetricsRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x64\x65pth\x18\x02 \x01(\x05R\x05\x64\x65pth\"N\n#WorkflowExecutionGetMetricsResponse\x12\'\n\x04span\x18\x01 \x01(\x0b\x32\x13.flyteidl.core.SpanR\x04span*>\n\x0e\x45xecutionState\x12\x14\n\x10\x45XECUTION_ACTIVE\x10\x00\x12\x16\n\x12\x45XECUTION_ARCHIVED\x10\x01\x42\xba\x01\n\x12\x63om.flyteidl.adminB\x0e\x45xecutionProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -49,12 +49,14 @@ _EXECUTIONSPEC.fields_by_name['inputs']._serialized_options = b'\030\001' _EXECUTIONSPEC.fields_by_name['auth_role']._options = None _EXECUTIONSPEC.fields_by_name['auth_role']._serialized_options = b'\030\001' + _EXECUTIONSPEC.fields_by_name['tags']._options = None + _EXECUTIONSPEC.fields_by_name['tags']._serialized_options = b'\030\001' _WORKFLOWEXECUTIONGETDATARESPONSE.fields_by_name['outputs']._options = None _WORKFLOWEXECUTIONGETDATARESPONSE.fields_by_name['outputs']._serialized_options = b'\030\001' _WORKFLOWEXECUTIONGETDATARESPONSE.fields_by_name['inputs']._options = None _WORKFLOWEXECUTIONGETDATARESPONSE.fields_by_name['inputs']._serialized_options = b'\030\001' - _globals['_EXECUTIONSTATE']._serialized_start=5693 - _globals['_EXECUTIONSTATE']._serialized_end=5755 + _globals['_EXECUTIONSTATE']._serialized_start=5697 + _globals['_EXECUTIONSTATE']._serialized_end=5759 _globals['_EXECUTIONCREATEREQUEST']._serialized_start=480 _globals['_EXECUTIONCREATEREQUEST']._serialized_end=694 _globals['_EXECUTIONRELAUNCHREQUEST']._serialized_start=697 @@ -84,23 +86,23 @@ _globals['_NOTIFICATIONLIST']._serialized_start=3320 _globals['_NOTIFICATIONLIST']._serialized_end=3406 _globals['_EXECUTIONSPEC']._serialized_start=3409 - _globals['_EXECUTIONSPEC']._serialized_end=4643 - _globals['_EXECUTIONTERMINATEREQUEST']._serialized_start=4645 - _globals['_EXECUTIONTERMINATEREQUEST']._serialized_end=4754 - _globals['_EXECUTIONTERMINATERESPONSE']._serialized_start=4756 - _globals['_EXECUTIONTERMINATERESPONSE']._serialized_end=4784 - _globals['_WORKFLOWEXECUTIONGETDATAREQUEST']._serialized_start=4786 - _globals['_WORKFLOWEXECUTIONGETDATAREQUEST']._serialized_end=4879 - _globals['_WORKFLOWEXECUTIONGETDATARESPONSE']._serialized_start=4882 - _globals['_WORKFLOWEXECUTIONGETDATARESPONSE']._serialized_end=5146 - _globals['_EXECUTIONUPDATEREQUEST']._serialized_start=5149 - _globals['_EXECUTIONUPDATEREQUEST']._serialized_end=5287 - _globals['_EXECUTIONSTATECHANGEDETAILS']._serialized_start=5290 - _globals['_EXECUTIONSTATECHANGEDETAILS']._serialized_end=5464 - _globals['_EXECUTIONUPDATERESPONSE']._serialized_start=5466 - _globals['_EXECUTIONUPDATERESPONSE']._serialized_end=5491 - _globals['_WORKFLOWEXECUTIONGETMETRICSREQUEST']._serialized_start=5493 - _globals['_WORKFLOWEXECUTIONGETMETRICSREQUEST']._serialized_end=5611 - _globals['_WORKFLOWEXECUTIONGETMETRICSRESPONSE']._serialized_start=5613 - _globals['_WORKFLOWEXECUTIONGETMETRICSRESPONSE']._serialized_end=5691 + _globals['_EXECUTIONSPEC']._serialized_end=4647 + _globals['_EXECUTIONTERMINATEREQUEST']._serialized_start=4649 + _globals['_EXECUTIONTERMINATEREQUEST']._serialized_end=4758 + _globals['_EXECUTIONTERMINATERESPONSE']._serialized_start=4760 + _globals['_EXECUTIONTERMINATERESPONSE']._serialized_end=4788 + _globals['_WORKFLOWEXECUTIONGETDATAREQUEST']._serialized_start=4790 + _globals['_WORKFLOWEXECUTIONGETDATAREQUEST']._serialized_end=4883 + _globals['_WORKFLOWEXECUTIONGETDATARESPONSE']._serialized_start=4886 + _globals['_WORKFLOWEXECUTIONGETDATARESPONSE']._serialized_end=5150 + _globals['_EXECUTIONUPDATEREQUEST']._serialized_start=5153 + _globals['_EXECUTIONUPDATEREQUEST']._serialized_end=5291 + _globals['_EXECUTIONSTATECHANGEDETAILS']._serialized_start=5294 + _globals['_EXECUTIONSTATECHANGEDETAILS']._serialized_end=5468 + _globals['_EXECUTIONUPDATERESPONSE']._serialized_start=5470 + _globals['_EXECUTIONUPDATERESPONSE']._serialized_end=5495 + _globals['_WORKFLOWEXECUTIONGETMETRICSREQUEST']._serialized_start=5497 + _globals['_WORKFLOWEXECUTIONGETMETRICSREQUEST']._serialized_end=5615 + _globals['_WORKFLOWEXECUTIONGETMETRICSRESPONSE']._serialized_start=5617 + _globals['_WORKFLOWEXECUTIONGETMETRICSRESPONSE']._serialized_end=5695 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_rust/flyteidl.admin.rs b/flyteidl/gen/pb_rust/flyteidl.admin.rs index 5f515581cc..91ad8d56f9 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -1673,6 +1673,7 @@ pub struct ExecutionSpec { #[prost(message, optional, tag="23")] pub envs: ::core::option::Option, /// Tags to be set for the execution. + #[deprecated] #[prost(string, repeated, tag="24")] pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// Execution cluster label to be set for the execution. diff --git a/flyteidl/protos/flyteidl/admin/execution.proto b/flyteidl/protos/flyteidl/admin/execution.proto index 676c5a5d6e..6197576bd9 100644 --- a/flyteidl/protos/flyteidl/admin/execution.proto +++ b/flyteidl/protos/flyteidl/admin/execution.proto @@ -331,7 +331,7 @@ message ExecutionSpec { Envs envs = 23; // Tags to be set for the execution. - repeated string tags = 24; + repeated string tags = 24 [deprecated = true]; // Execution cluster label to be set for the execution. ExecutionClusterLabel execution_cluster_label = 25; From cd37d1b5b61789d651e3aa1686910593ccbeaea0 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Sat, 8 Jun 2024 18:19:50 +0800 Subject: [PATCH 08/30] Watch agent metadata service (#5017) Signed-off-by: Kevin Su Signed-off-by: Kevin Su --- .../go/tasks/plugins/webapi/agent/client.go | 71 +++++++++-------- .../tasks/plugins/webapi/agent/client_test.go | 4 +- .../go/tasks/plugins/webapi/agent/config.go | 4 + .../plugins/webapi/agent/integration_test.go | 6 +- .../go/tasks/plugins/webapi/agent/plugin.go | 77 +++++++++++-------- .../tasks/plugins/webapi/agent/plugin_test.go | 13 ++-- 6 files changed, 104 insertions(+), 71 deletions(-) diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/client.go b/flyteplugins/go/tasks/plugins/webapi/agent/client.go index 9f4409c8e6..d8c8b055dc 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/client.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/client.go @@ -3,7 +3,6 @@ package agent import ( "context" "crypto/x509" - "fmt" "golang.org/x/exp/maps" "google.golang.org/grpc" @@ -98,8 +97,7 @@ func getFinalContext(ctx context.Context, operation string, agent *Deployment) ( return context.WithTimeout(ctx, timeout) } -func initializeAgentRegistry(cs *ClientSet) (Registry, error) { - logger.Infof(context.Background(), "Initializing agent registry") +func updateAgentRegistry(ctx context.Context, cs *ClientSet) { agentRegistry := make(Registry) cfg := GetConfig() var agentDeployments []*Deployment @@ -115,9 +113,13 @@ func initializeAgentRegistry(cs *ClientSet) (Registry, error) { } agentDeployments = append(agentDeployments, maps.Values(cfg.AgentDeployments)...) for _, agentDeployment := range agentDeployments { - client := cs.agentMetadataClients[agentDeployment.Endpoint] + client, ok := cs.agentMetadataClients[agentDeployment.Endpoint] + if !ok { + logger.Warningf(ctx, "Agent client not found in the clientSet for the endpoint: %v", agentDeployment.Endpoint) + continue + } - finalCtx, cancel := getFinalContext(context.Background(), "ListAgents", agentDeployment) + finalCtx, cancel := getFinalContext(ctx, "ListAgents", agentDeployment) defer cancel() res, err := client.ListAgents(finalCtx, &admin.ListAgentsRequest{}) @@ -125,15 +127,17 @@ func initializeAgentRegistry(cs *ClientSet) (Registry, error) { grpcStatus, ok := status.FromError(err) if grpcStatus.Code() == codes.Unimplemented { // we should not panic here, as we want to continue to support old agent settings - logger.Infof(context.Background(), "list agent method not implemented for agent: [%v]", agentDeployment) + logger.Warningf(finalCtx, "list agent method not implemented for agent: [%v]", agentDeployment.Endpoint) continue } if !ok { - return nil, fmt.Errorf("failed to list agent: [%v] with a non-gRPC error: [%v]", agentDeployment, err) + logger.Errorf(finalCtx, "failed to list agent: [%v] with a non-gRPC error: [%v]", agentDeployment.Endpoint, err) + continue } - return nil, fmt.Errorf("failed to list agent: [%v] with error: [%v]", agentDeployment, err) + logger.Errorf(finalCtx, "failed to list agent: [%v] with error: [%v]", agentDeployment.Endpoint, err) + continue } for _, agent := range res.GetAgents() { @@ -148,20 +152,27 @@ func initializeAgentRegistry(cs *ClientSet) (Registry, error) { agent := &Agent{AgentDeployment: agentDeployment, IsSync: agent.IsSync} agentRegistry[supportedCategory.GetName()] = map[int32]*Agent{supportedCategory.GetVersion(): agent} } - logger.Infof(context.Background(), "[%v] is a sync agent: [%v]", agent.Name, agent.IsSync) - logger.Infof(context.Background(), "[%v] supports task category: [%v]", agent.Name, supportedTaskCategories) + } + // If the agent doesn't implement the metadata service, we construct the registry based on the configuration + for taskType, agentDeploymentID := range cfg.AgentForTaskTypes { + if agentDeployment, ok := cfg.AgentDeployments[agentDeploymentID]; ok { + if _, ok := agentRegistry[taskType]; !ok { + agent := &Agent{AgentDeployment: agentDeployment, IsSync: false} + agentRegistry[taskType] = map[int32]*Agent{defaultTaskTypeVersion: agent} + } + } } } - - return agentRegistry, nil + logger.Debugf(ctx, "AgentDeployment service supports task types: %v", maps.Keys(agentRegistry)) + setAgentRegistry(agentRegistry) } -func initializeClients(ctx context.Context) (*ClientSet, error) { - logger.Infof(ctx, "Initializing agent clients") - - asyncAgentClients := make(map[string]service.AsyncAgentServiceClient) - syncAgentClients := make(map[string]service.SyncAgentServiceClient) - agentMetadataClients := make(map[string]service.AgentMetadataServiceClient) +func getAgentClientSets(ctx context.Context) *ClientSet { + clientSet := &ClientSet{ + asyncAgentClients: make(map[string]service.AsyncAgentServiceClient), + syncAgentClients: make(map[string]service.SyncAgentServiceClient), + agentMetadataClients: make(map[string]service.AgentMetadataServiceClient), + } var agentDeployments []*Deployment cfg := GetConfig() @@ -170,19 +181,19 @@ func initializeClients(ctx context.Context) (*ClientSet, error) { agentDeployments = append(agentDeployments, &cfg.DefaultAgent) } agentDeployments = append(agentDeployments, maps.Values(cfg.AgentDeployments)...) - for _, agentService := range agentDeployments { - conn, err := getGrpcConnection(ctx, agentService) + for _, agentDeployment := range agentDeployments { + if _, ok := clientSet.agentMetadataClients[agentDeployment.Endpoint]; ok { + logger.Infof(ctx, "Agent client already initialized for [%v]", agentDeployment.Endpoint) + continue + } + conn, err := getGrpcConnection(ctx, agentDeployment) if err != nil { - return nil, err + logger.Errorf(ctx, "failed to create connection to agent: [%v] with error: [%v]", agentDeployment, err) + continue } - syncAgentClients[agentService.Endpoint] = service.NewSyncAgentServiceClient(conn) - asyncAgentClients[agentService.Endpoint] = service.NewAsyncAgentServiceClient(conn) - agentMetadataClients[agentService.Endpoint] = service.NewAgentMetadataServiceClient(conn) + clientSet.syncAgentClients[agentDeployment.Endpoint] = service.NewSyncAgentServiceClient(conn) + clientSet.asyncAgentClients[agentDeployment.Endpoint] = service.NewAsyncAgentServiceClient(conn) + clientSet.agentMetadataClients[agentDeployment.Endpoint] = service.NewAgentMetadataServiceClient(conn) } - - return &ClientSet{ - syncAgentClients: syncAgentClients, - asyncAgentClients: asyncAgentClients, - agentMetadataClients: agentMetadataClients, - }, nil + return clientSet } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go index 4ad7f8cbaa..1850f2128f 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go @@ -20,9 +20,7 @@ func TestInitializeClients(t *testing.T) { ctx := context.Background() err := SetConfig(&cfg) assert.NoError(t, err) - cs, err := initializeClients(ctx) - assert.NoError(t, err) - assert.NotNil(t, cs) + cs := getAgentClientSets(ctx) _, ok := cs.syncAgentClients["y"] assert.True(t, ok) _, ok = cs.asyncAgentClients["x"] diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/config.go b/flyteplugins/go/tasks/plugins/webapi/agent/config.go index 3f9fd354b6..f26499f320 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/config.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/config.go @@ -47,6 +47,7 @@ var ( // AsyncPlugin should be registered to at least one task type. // Reference: https://github.com/flyteorg/flyte/blob/master/flyteplugins/go/tasks/pluginmachinery/registry.go#L27 SupportedTaskTypes: []string{"task_type_1", "task_type_2"}, + PollInterval: config.Duration{Duration: 10 * time.Second}, } configSection = pluginsConfig.MustRegisterSubSection("agent-service", &defaultConfig) @@ -71,6 +72,9 @@ type Config struct { // SupportedTaskTypes is a list of task types that are supported by this plugin. SupportedTaskTypes []string `json:"supportedTaskTypes" pflag:"-,Defines a list of task types that are supported by this plugin."` + + // PollInterval is the interval at which the plugin should poll the agent for metadata updates + PollInterval config.Duration `json:"pollInterval" pflag:",The interval at which the plugin should poll the agent for metadata updates."` } type Deployment struct { diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go index 6fb3828c0c..f3e626524c 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go @@ -35,6 +35,10 @@ import ( ) func TestEndToEnd(t *testing.T) { + agentRegistry = Registry{ + "openai": {defaultTaskTypeVersion: {AgentDeployment: &Deployment{Endpoint: defaultAgentEndpoint}, IsSync: true}}, + "spark": {defaultTaskTypeVersion: {AgentDeployment: &Deployment{Endpoint: defaultAgentEndpoint}, IsSync: false}}, + } iter := func(ctx context.Context, tCtx pluginCore.TaskExecutionContext) error { return nil } @@ -118,6 +122,7 @@ func TestEndToEnd(t *testing.T) { cfg: GetConfig(), cs: &ClientSet{ asyncAgentClients: map[string]service.AsyncAgentServiceClient{}, + syncAgentClients: map[string]service.SyncAgentServiceClient{}, agentMetadataClients: map[string]service.AgentMetadataServiceClient{}, }, }, nil @@ -326,7 +331,6 @@ func newMockSyncAgentPlugin() webapi.PluginEntry { defaultAgentEndpoint: syncAgentClient, }, }, - agentRegistry: Registry{"openai": {defaultTaskTypeVersion: {AgentDeployment: &Deployment{Endpoint: defaultAgentEndpoint}, IsSync: true}}}, }, nil }, } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go index e41c4ccaa0..368dffcef4 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go @@ -4,9 +4,11 @@ import ( "context" "encoding/gob" "fmt" + "sync" "time" "golang.org/x/exp/maps" + "k8s.io/apimachinery/pkg/util/wait" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" flyteIdl "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -24,11 +26,27 @@ import ( type Registry map[string]map[int32]*Agent // map[taskTypeName][taskTypeVersion] => Agent -type Plugin struct { - metricScope promutils.Scope - cfg *Config - cs *ClientSet +var ( agentRegistry Registry + mu sync.RWMutex +) + +func getAgentRegistry() Registry { + mu.Lock() + defer mu.Unlock() + return agentRegistry +} + +func setAgentRegistry(r Registry) { + mu.Lock() + defer mu.Unlock() + agentRegistry = r +} + +type Plugin struct { + metricScope promutils.Scope + cfg *Config + cs *ClientSet } type ResourceWrapper struct { @@ -95,7 +113,7 @@ func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextR outputPrefix := taskCtx.OutputWriter().GetOutputPrefixPath().String() taskCategory := admin.TaskCategory{Name: taskTemplate.Type, Version: taskTemplate.TaskTypeVersion} - agent, isSync := getFinalAgent(&taskCategory, p.cfg, p.agentRegistry) + agent, isSync := getFinalAgent(&taskCategory, p.cfg) taskExecutionMetadata := buildTaskExecutionMetadata(taskCtx.TaskExecutionMetadata()) @@ -193,7 +211,7 @@ func (p Plugin) ExecuteTaskSync( func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest webapi.Resource, err error) { metadata := taskCtx.ResourceMeta().(ResourceMetaWrapper) - agent, _ := getFinalAgent(&metadata.TaskCategory, p.cfg, p.agentRegistry) + agent, _ := getFinalAgent(&metadata.TaskCategory, p.cfg) client, err := p.getAsyncAgentClient(ctx, agent) if err != nil { @@ -226,7 +244,7 @@ func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error return nil } metadata := taskCtx.ResourceMeta().(ResourceMetaWrapper) - agent, _ := getFinalAgent(&metadata.TaskCategory, p.cfg, p.agentRegistry) + agent, _ := getFinalAgent(&metadata.TaskCategory, p.cfg) client, err := p.getAsyncAgentClient(ctx, agent) if err != nil { @@ -322,6 +340,13 @@ func (p Plugin) getAsyncAgentClient(ctx context.Context, agent *Deployment) (ser return client, nil } +func (p Plugin) watchAgents(ctx context.Context) { + go wait.Until(func() { + clientSet := getAgentClientSets(ctx) + updateAgentRegistry(ctx, clientSet) + }, p.cfg.PollInterval.Duration, ctx.Done()) +} + func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, outputs *flyteIdl.LiteralMap) error { taskTemplate, err := taskCtx.TaskReader().Read(ctx) if err != nil { @@ -344,11 +369,11 @@ func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, outputs *fly return taskCtx.OutputWriter().Put(ctx, opReader) } -func getFinalAgent(taskCategory *admin.TaskCategory, cfg *Config, agentRegistry Registry) (*Deployment, bool) { - if agent, exists := agentRegistry[taskCategory.Name][taskCategory.Version]; exists { +func getFinalAgent(taskCategory *admin.TaskCategory, cfg *Config) (*Deployment, bool) { + r := getAgentRegistry() + if agent, exists := r[taskCategory.Name][taskCategory.Version]; exists { return agent.AgentDeployment, agent.IsSync } - return &cfg.DefaultAgent, false } @@ -367,31 +392,24 @@ func buildTaskExecutionMetadata(taskExecutionMetadata core.TaskExecutionMetadata } func newAgentPlugin() webapi.PluginEntry { - cs, err := initializeClients(context.Background()) - if err != nil { - // We should wait for all agents to be up and running before starting the server - panic(fmt.Sprintf("failed to initialize clients with error: %v", err)) - } - - agentRegistry, err := initializeAgentRegistry(cs) - if err != nil { - panic(fmt.Sprintf("failed to initialize agent registry with error: %v", err)) - } - + ctx := context.Background() cfg := GetConfig() - supportedTaskTypes := append(maps.Keys(agentRegistry), cfg.SupportedTaskTypes...) - logger.Infof(context.Background(), "AgentDeployment service supports task types: %v", supportedTaskTypes) + + clientSet := getAgentClientSets(ctx) + updateAgentRegistry(ctx, clientSet) + supportedTaskTypes := append(maps.Keys(getAgentRegistry()), cfg.SupportedTaskTypes...) return webapi.PluginEntry{ ID: "agent-service", SupportedTaskTypes: supportedTaskTypes, PluginLoader: func(ctx context.Context, iCtx webapi.PluginSetupContext) (webapi.AsyncPlugin, error) { - return &Plugin{ - metricScope: iCtx.MetricsScope(), - cfg: cfg, - cs: cs, - agentRegistry: agentRegistry, - }, nil + plugin := &Plugin{ + metricScope: iCtx.MetricsScope(), + cfg: cfg, + cs: clientSet, + } + plugin.watchAgents(ctx) + return plugin, nil }, } } @@ -399,6 +417,5 @@ func newAgentPlugin() webapi.PluginEntry { func RegisterAgentPlugin() { gob.Register(ResourceMetaWrapper{}) gob.Register(ResourceWrapper{}) - pluginmachinery.PluginRegistry().RegisterRemotePlugin(newAgentPlugin()) } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go index 3e8cb882c8..19af85eed3 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go @@ -60,15 +60,15 @@ func TestPlugin(t *testing.T) { t.Run("test getFinalAgent", func(t *testing.T) { agent := &Agent{AgentDeployment: &Deployment{Endpoint: "localhost:80"}} - agentRegistry := Registry{"spark": {defaultTaskTypeVersion: agent}} + agentRegistry = Registry{"spark": {defaultTaskTypeVersion: agent}} spark := &admin.TaskCategory{Name: "spark", Version: defaultTaskTypeVersion} foo := &admin.TaskCategory{Name: "foo", Version: defaultTaskTypeVersion} bar := &admin.TaskCategory{Name: "bar", Version: defaultTaskTypeVersion} - agentDeployment, _ := getFinalAgent(spark, &cfg, agentRegistry) + agentDeployment, _ := getFinalAgent(spark, &cfg) assert.Equal(t, agentDeployment.Endpoint, "localhost:80") - agentDeployment, _ = getFinalAgent(foo, &cfg, agentRegistry) + agentDeployment, _ = getFinalAgent(foo, &cfg) assert.Equal(t, agentDeployment.Endpoint, cfg.DefaultAgent.Endpoint) - agentDeployment, _ = getFinalAgent(bar, &cfg, agentRegistry) + agentDeployment, _ = getFinalAgent(bar, &cfg) assert.Equal(t, agentDeployment.Endpoint, cfg.DefaultAgent.Endpoint) }) @@ -318,11 +318,10 @@ func TestInitializeAgentRegistry(t *testing.T) { cfg.AgentForTaskTypes = map[string]string{"task1": "agent-deployment-1", "task2": "agent-deployment-2"} err := SetConfig(&cfg) assert.NoError(t, err) - agentRegistry, err := initializeAgentRegistry(cs) - assert.NoError(t, err) + updateAgentRegistry(context.Background(), cs) // In golang, the order of keys in a map is random. So, we sort the keys before asserting. - agentRegistryKeys := maps.Keys(agentRegistry) + agentRegistryKeys := maps.Keys(getAgentRegistry()) sort.Strings(agentRegistryKeys) assert.Equal(t, agentRegistryKeys, []string{"task1", "task2", "task3"}) From 15e321ba37defc87db1e5d7479317204d7547b41 Mon Sep 17 00:00:00 2001 From: Yakov Dlougach Date: Tue, 11 Jun 2024 05:49:34 +0100 Subject: [PATCH 09/30] Make BaseURL insensitive to trailing slashes for metadata endpoint redirect. (#5458) * Make BaseURL insensitive to trailing slashes for metadata endpoint redirect. Signed-off-by: Yakov Dlougach * Lint renaming Signed-off-by: Yakov Dlougach --------- Signed-off-by: Yakov Dlougach --- flyteadmin/auth/handlers.go | 2 +- flyteadmin/auth/handlers_test.go | 70 ++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/flyteadmin/auth/handlers.go b/flyteadmin/auth/handlers.go index bb03e1a654..0416245f8c 100644 --- a/flyteadmin/auth/handlers.go +++ b/flyteadmin/auth/handlers.go @@ -484,7 +484,7 @@ func QueryUserInfoUsingAccessToken(ctx context.Context, originalRequest *http.Re // See https://tools.ietf.org/html/rfc8414 for more information. func GetOIdCMetadataEndpointRedirectHandler(ctx context.Context, authCtx interfaces.AuthenticationContext) http.HandlerFunc { return func(writer http.ResponseWriter, request *http.Request) { - metadataURL := authCtx.Options().UserAuth.OpenID.BaseURL.ResolveReference(authCtx.GetOIdCMetadataURL()) + metadataURL := authCtx.Options().UserAuth.OpenID.BaseURL.JoinPath("/").ResolveReference(authCtx.GetOIdCMetadataURL()) http.Redirect(writer, request, metadataURL.String(), http.StatusSeeOther) } } diff --git a/flyteadmin/auth/handlers_test.go b/flyteadmin/auth/handlers_test.go index 5428fb9b80..ee106e92cb 100644 --- a/flyteadmin/auth/handlers_test.go +++ b/flyteadmin/auth/handlers_test.go @@ -449,24 +449,60 @@ func TestGetHTTPRequestCookieToMetadataHandler_CustomHeader(t *testing.T) { func TestGetOIdCMetadataEndpointRedirectHandler(t *testing.T) { ctx := context.Background() - metadataPath := mustParseURL(t, OIdCMetadataEndpoint) - mockAuthCtx := mocks.AuthenticationContext{} - mockAuthCtx.OnOptions().Return(&config.Config{ - UserAuth: config.UserAuthConfig{ - OpenID: config.OpenIDOptions{ - BaseURL: stdConfig.URL{URL: mustParseURL(t, "http://www.google.com")}, - }, + type test struct { + name string + baseURL string + metadataPath string + expectedRedirectLocation string + } + tests := []test{ + { + name: "base_url_without_path", + baseURL: "http://www.google.com", + metadataPath: OIdCMetadataEndpoint, + expectedRedirectLocation: "http://www.google.com/.well-known/openid-configuration", }, - }) - - mockAuthCtx.OnGetOIdCMetadataURL().Return(&metadataPath) - handler := GetOIdCMetadataEndpointRedirectHandler(ctx, &mockAuthCtx) - req, err := http.NewRequest("GET", "/xyz", nil) - assert.NoError(t, err) - w := httptest.NewRecorder() - handler(w, req) - assert.Equal(t, http.StatusSeeOther, w.Code) - assert.Equal(t, "http://www.google.com/.well-known/openid-configuration", w.Header()["Location"][0]) + { + name: "base_url_with_path", + baseURL: "https://login.microsoftonline.com/abc/v2.0", + metadataPath: OIdCMetadataEndpoint, + expectedRedirectLocation: "https://login.microsoftonline.com/abc/v2.0/.well-known/openid-configuration", + }, + { + name: "base_url_with_trailing_slash_path", + baseURL: "https://login.microsoftonline.com/abc/v2.0/", + metadataPath: OIdCMetadataEndpoint, + expectedRedirectLocation: "https://login.microsoftonline.com/abc/v2.0/.well-known/openid-configuration", + }, + { + name: "absolute_metadata_path", + baseURL: "https://login.microsoftonline.com/abc/v2.0/", + metadataPath: "/.well-known/openid-configuration", + expectedRedirectLocation: "https://login.microsoftonline.com/.well-known/openid-configuration", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + metadataPath := mustParseURL(t, tt.metadataPath) + mockAuthCtx := mocks.AuthenticationContext{} + mockAuthCtx.OnOptions().Return(&config.Config{ + UserAuth: config.UserAuthConfig{ + OpenID: config.OpenIDOptions{ + BaseURL: stdConfig.URL{URL: mustParseURL(t, tt.baseURL)}, + }, + }, + }) + + mockAuthCtx.OnGetOIdCMetadataURL().Return(&metadataPath) + handler := GetOIdCMetadataEndpointRedirectHandler(ctx, &mockAuthCtx) + req, err := http.NewRequest("GET", "/xyz", nil) + assert.NoError(t, err) + w := httptest.NewRecorder() + handler(w, req) + assert.Equal(t, http.StatusSeeOther, w.Code) + assert.Equal(t, tt.expectedRedirectLocation, w.Header()["Location"][0]) + }) + } } func TestUserInfoForwardResponseHander(t *testing.T) { From bd2f9a825903c4ce10408974e45cf22fd16caa3d Mon Sep 17 00:00:00 2001 From: Nikki Everett Date: Tue, 11 Jun 2024 13:51:13 -0500 Subject: [PATCH 10/30] remove mmcloud plugin (#5468) Signed-off-by: nikki everett --- docs/conf.py | 2 + docs/deprecated_integrations/index.md | 3 - .../mmcloud_plugin/index.md | 98 ------------------- .../mmcloud_plugin/mmcloud_plugin_example.md | 30 ------ 4 files changed, 2 insertions(+), 131 deletions(-) delete mode 100644 docs/deprecated_integrations/mmcloud_plugin/index.md delete mode 100644 docs/deprecated_integrations/mmcloud_plugin/mmcloud_plugin_example.md diff --git a/docs/conf.py b/docs/conf.py index c7c1bcd75a..ae4400dd31 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -105,6 +105,8 @@ "flytesnacks/examples/mmcloud_plugin/mmcloud_plugin_example": "../../../deprecated_integrations/mmcloud_plugin/mmcloud_plugin_example.html", "flytesnacks/examples/snowflake_plugin/index": "../../../deprecated_integrations/snowflake_plugin/index.html", "flytesnacks/examples/snowflake_plugin/snowflake_plugin_example": "../../../deprecated_integrations/snowflake_plugin/snowflake_plugin_example.html", + "deprecated_integrations/mmcloud_plugin/index": "../../flytesnacks/examples/mmcloud_agent/index.html", + "deprecated_integrations/mmcloud_plugin/mmcloud_plugin_example": "../../flytesnacks/examples/mmcloud_agent/index.html" } diff --git a/docs/deprecated_integrations/index.md b/docs/deprecated_integrations/index.md index ef11ffb0db..a623278388 100644 --- a/docs/deprecated_integrations/index.md +++ b/docs/deprecated_integrations/index.md @@ -8,8 +8,6 @@ - Deprecated BigQuery plugin. * - {doc}`Databricks ` - Deprecated Databricks plugin. -* - {doc}`Memory Machine Cloud ` - - Deprecated MemVerge Memory Machine Cloud plugin. * - {doc}`Snowflake ` - Deprecated Snowflake plugin. ``` @@ -20,6 +18,5 @@ bigquery_plugin/index databricks_plugin/index -mmcloud_plugin/index snowflake_plugin/index ``` diff --git a/docs/deprecated_integrations/mmcloud_plugin/index.md b/docs/deprecated_integrations/mmcloud_plugin/index.md deleted file mode 100644 index 9539a82a08..0000000000 --- a/docs/deprecated_integrations/mmcloud_plugin/index.md +++ /dev/null @@ -1,98 +0,0 @@ -```{eval-rst} -.. tags:: AWS, GCP, AliCloud, Integration, Advanced -``` - -(mmcloud_plugin)= - -# Memory Machine Cloud plugin - -```{note} - -This is a legacy implementation of the Memory Machine Cloud integration. We recommend using the {ref}`Memory Machine Cloud agent ` instead. - -``` - -[MemVerge](https://memverge.com/) [Memory Machine Cloud](https://www.mmcloud.io/) (MMCloud)—available on AWS, GCP, and AliCloud—empowers users to continuously optimize cloud resources during runtime, safely execute stateful tasks on spot instances, and monitor resource usage in real time. These capabilities make it an excellent fit for long-running batch workloads. Flyte can be integrated with MMCloud, allowing you to execute Flyte tasks using MMCloud. - -## Installation - -To install the plugin, run the following command: - -```{eval-rst} -.. prompt:: bash - - pip install flytekitplugins-mmcloud -``` - -To get started with MMCloud, see the [MMCloud user guide](https://docs.memverge.com/mmce/current/userguide/olh/index.html). - -## Flyte deployment configuration - -The MMCloud plugin is [enabled in FlytePropeller's configuration](https://docs.flyte.org/en/latest/deployment/plugins/memverge/mmcloud.html). - -## Getting Started - -This plugin allows executing `PythonFunctionTask` using MMCloud without changing any function code. - -```{eval-rst} -.. testcode:: awsbatch-quickstart - from flytekitplugins.mmcloud import MMCloudConfig - - @task(task_config=MMCloudConfig()) - def to_str(i: int) -> str: - return str(i) -``` - -[Resource](https://docs.flyte.org/en/latest/user_guide/productionizing/customizing_task_resources.html) (cpu and mem) requests and limits, [container](https://docs.flyte.org/en/latest/user_guide/customizing_dependencies/multiple_images_in_a_workflow.html) images, and environment variable specifications are supported. - -[ImageSpec](https://docs.flyte.org/en/latest/user_guide/customizing_dependencies/imagespec.html#image-spec-example) may be used to define images to run tasks. - -### Credentials - -The following [secrets](https://docs.flyte.org/en/latest/user_guide/productionizing/secrets.html) are required to be defined for the agent server: -* `mmc_address`: MMCloud OpCenter address -* `mmc_username`: MMCloud OpCenter username -* `mmc_password`: MMCloud OpCenter password - -### Defaults - -Compute resources: -* If only requests are specified, there are no limits. -* If only limits are specified, the requests are equal to the limits. -* If neither resource requests nor limits are specified, the default requests used for job submission are `cpu="1"` and `mem="1Gi"`, and there are no limits. - -### Agent Image - -Install `flytekitplugins-mmcloud` in the agent image. - -A `float` binary (obtainable via the OpCenter) is required. Copy it to the agent image `PATH`. - -Sample `Dockerfile` for building an agent image: -```dockerfile -FROM python:3.11-slim-bookworm - -WORKDIR /root -ENV PYTHONPATH /root - -# flytekit will autoload the agent if package is installed. -RUN pip install flytekitplugins-mmcloud -COPY float /usr/local/bin/float - -# For flytekit versions <= v1.10.2, use pyflyte serve. -# CMD pyflyte serve --port 8000 -# For flytekit versions > v1.10.2, use pyflyte serve agent. -CMD pyflyte serve agent --port 8000 -``` - -## Example usage - -For a usage example, see the {doc}`Memory Machine Cloud example` page. - - - -```{toctree} -:maxdepth: -1 -:hidden: - -mmcloud_plugin_example -``` diff --git a/docs/deprecated_integrations/mmcloud_plugin/mmcloud_plugin_example.md b/docs/deprecated_integrations/mmcloud_plugin/mmcloud_plugin_example.md deleted file mode 100644 index 51e54a9e96..0000000000 --- a/docs/deprecated_integrations/mmcloud_plugin/mmcloud_plugin_example.md +++ /dev/null @@ -1,30 +0,0 @@ -(mmcloud_plugin_example)= -# Memory Machine Cloud - -This example shows how to use the MMCloud plugin to execute tasks on [MemVerge Memory Machine Cloud][mmcloud]. - -```{note} -To clone and run the example code on this page, see the [Flytesnacks repo][flytesnacks]. -``` - -```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/master/examples/mmcloud_plugin/mmcloud_plugin/mmcloud_plugin_example.py -:caption: mmcloud_plugin/mmcloud_plugin_example.py -:lines: 1-2 -``` - -`MMCloudConfig` configures `MMCloudTask`. Tasks specified with `MMCloudConfig` will be executed using MMCloud. Tasks will be executed with requests `cpu="1"` and `mem="1Gi"` by default. - -```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/master/examples/mmcloud_plugin/mmcloud_plugin/mmcloud_plugin_example.py -:caption: mmcloud_plugin/mmcloud_plugin_example.py -:lines: 8-15 -``` - -[Resource](https://docs.flyte.org/en/latest/user_guide/productionizing/customizing_task_resources.html) (cpu and mem) requests and limits, [container](https://docs.flyte.org/en/latest/user_guide/customizing_dependencies/multiple_images_in_a_workflow.html) images, and [environment](https://docs.flyte.org/en/latest/api/flytekit/generated/flytekit.task.html) variable specifications are supported. - -```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/master/examples/mmcloud_plugin/mmcloud_plugin/mmcloud_plugin_example.py -:caption: mmcloud_plugin/mmcloud_plugin_example.py -:lines: 18-32 -``` - -[mmcloud]: https://www.mmcloud.io/ -[flytesnacks]: https://github.com/flyteorg/flytesnacks/tree/master/examples/mmcloud_plugin From 266beda39c22e961951dda4bc612d66186cb0915 Mon Sep 17 00:00:00 2001 From: Chi-Sheng Liu Date: Wed, 12 Jun 2024 09:34:17 +0800 Subject: [PATCH 11/30] [Feature] Refactor distributed job using common ReplicaSpec (#5355) * feat(proto): Define CommonReplicaSpec in common.proto Resolves: flyteorg/flyte#4408 Signed-off-by: Chi-Sheng Liu * chore(proto): Generate new clients corresponding to proto changes Resolves: flyteorg/flyte#4408 Signed-off-by: Chi-Sheng Liu * feat(replica-spec): Update corresponding golang files based on protobuf changes Resolves: flyteorg/flyte#4408 Signed-off-by: Chi-Sheng Liu --------- Signed-off-by: Chi-Sheng Liu --- .../gen/pb-es/flyteidl/plugins/common_pb.ts | 98 +++ .../flyteidl/plugins/kubeflow/common_pb.ts | 26 - .../pb-es/flyteidl/plugins/kubeflow/mpi_pb.ts | 24 +- .../flyteidl/plugins/kubeflow/pytorch_pb.ts | 26 +- .../plugins/kubeflow/tensorflow_pb.ts | 26 +- .../gen/pb-go/flyteidl/plugins/common.pb.go | 257 +++++++ .../flyteidl/plugins/kubeflow/common.pb.go | 158 ++--- .../pb-go/flyteidl/plugins/kubeflow/mpi.pb.go | 113 ++-- .../flyteidl/plugins/kubeflow/pytorch.pb.go | 112 ++-- .../plugins/kubeflow/tensorflow.pb.go | 117 ++-- .../flyteidl/plugins/common.swagger.json | 46 ++ .../pb_python/flyteidl/plugins/common_pb2.py | 30 + .../pb_python/flyteidl/plugins/common_pb2.pyi | 28 + .../flyteidl/plugins/common_pb2_grpc.py | 4 + .../flyteidl/plugins/kubeflow/common_pb2.py | 16 +- .../flyteidl/plugins/kubeflow/common_pb2.pyi | 15 +- .../flyteidl/plugins/kubeflow/mpi_pb2.py | 18 +- .../flyteidl/plugins/kubeflow/mpi_pb2.pyi | 9 +- .../flyteidl/plugins/kubeflow/pytorch_pb2.py | 18 +- .../flyteidl/plugins/kubeflow/pytorch_pb2.pyi | 9 +- .../plugins/kubeflow/tensorflow_pb2.py | 18 +- .../plugins/kubeflow/tensorflow_pb2.pyi | 9 +- .../gen/pb_rust/flyteidl.plugins.kubeflow.rs | 63 +- flyteidl/gen/pb_rust/flyteidl.plugins.rs | 45 ++ flyteidl/protos/flyteidl/plugins/common.proto | 27 + .../flyteidl/plugins/kubeflow/common.proto | 11 +- .../flyteidl/plugins/kubeflow/mpi.proto | 18 +- .../flyteidl/plugins/kubeflow/pytorch.proto | 18 +- .../plugins/kubeflow/tensorflow.proto | 16 +- .../k8s/kfoperators/common/common_operator.go | 58 +- .../plugins/k8s/kfoperators/mpi/mpi_test.go | 345 ++++++---- .../k8s/kfoperators/pytorch/pytorch_test.go | 534 +++++++++------ .../k8s/kfoperators/tensorflow/tensorflow.go | 11 +- .../kfoperators/tensorflow/tensorflow_test.go | 634 +++++++++++------- 34 files changed, 2015 insertions(+), 942 deletions(-) create mode 100644 flyteidl/gen/pb-es/flyteidl/plugins/common_pb.ts create mode 100644 flyteidl/gen/pb-go/flyteidl/plugins/common.pb.go create mode 100644 flyteidl/gen/pb-go/gateway/flyteidl/plugins/common.swagger.json create mode 100644 flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.py create mode 100644 flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.pyi create mode 100644 flyteidl/gen/pb_python/flyteidl/plugins/common_pb2_grpc.py create mode 100644 flyteidl/protos/flyteidl/plugins/common.proto diff --git a/flyteidl/gen/pb-es/flyteidl/plugins/common_pb.ts b/flyteidl/gen/pb-es/flyteidl/plugins/common_pb.ts new file mode 100644 index 0000000000..37949692d1 --- /dev/null +++ b/flyteidl/gen/pb-es/flyteidl/plugins/common_pb.ts @@ -0,0 +1,98 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file flyteidl/plugins/common.proto (package flyteidl.plugins, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import { Resources } from "../core/tasks_pb.js"; + +/** + * @generated from enum flyteidl.plugins.RestartPolicy + */ +export enum RestartPolicy { + /** + * @generated from enum value: RESTART_POLICY_NEVER = 0; + */ + NEVER = 0, + + /** + * @generated from enum value: RESTART_POLICY_ON_FAILURE = 1; + */ + ON_FAILURE = 1, + + /** + * @generated from enum value: RESTART_POLICY_ALWAYS = 2; + */ + ALWAYS = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(RestartPolicy) +proto3.util.setEnumType(RestartPolicy, "flyteidl.plugins.RestartPolicy", [ + { no: 0, name: "RESTART_POLICY_NEVER" }, + { no: 1, name: "RESTART_POLICY_ON_FAILURE" }, + { no: 2, name: "RESTART_POLICY_ALWAYS" }, +]); + +/** + * @generated from message flyteidl.plugins.CommonReplicaSpec + */ +export class CommonReplicaSpec extends Message { + /** + * Number of replicas + * + * @generated from field: int32 replicas = 1; + */ + replicas = 0; + + /** + * Image used for the replica group + * + * @generated from field: string image = 2; + */ + image = ""; + + /** + * Resources required for the replica group + * + * @generated from field: flyteidl.core.Resources resources = 3; + */ + resources?: Resources; + + /** + * RestartPolicy determines whether pods will be restarted when they exit + * + * @generated from field: flyteidl.plugins.RestartPolicy restart_policy = 4; + */ + restartPolicy = RestartPolicy.NEVER; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.plugins.CommonReplicaSpec"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 2, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "resources", kind: "message", T: Resources }, + { no: 4, name: "restart_policy", kind: "enum", T: proto3.getEnumType(RestartPolicy) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CommonReplicaSpec { + return new CommonReplicaSpec().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CommonReplicaSpec { + return new CommonReplicaSpec().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CommonReplicaSpec { + return new CommonReplicaSpec().fromJsonString(jsonString, options); + } + + static equals(a: CommonReplicaSpec | PlainMessage | undefined, b: CommonReplicaSpec | PlainMessage | undefined): boolean { + return proto3.util.equals(CommonReplicaSpec, a, b); + } +} + diff --git a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/common_pb.ts b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/common_pb.ts index aec23a4da5..8ab5d03372 100644 --- a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/common_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/common_pb.ts @@ -6,32 +6,6 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -/** - * @generated from enum flyteidl.plugins.kubeflow.RestartPolicy - */ -export enum RestartPolicy { - /** - * @generated from enum value: RESTART_POLICY_NEVER = 0; - */ - NEVER = 0, - - /** - * @generated from enum value: RESTART_POLICY_ON_FAILURE = 1; - */ - ON_FAILURE = 1, - - /** - * @generated from enum value: RESTART_POLICY_ALWAYS = 2; - */ - ALWAYS = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(RestartPolicy) -proto3.util.setEnumType(RestartPolicy, "flyteidl.plugins.kubeflow.RestartPolicy", [ - { no: 0, name: "RESTART_POLICY_NEVER" }, - { no: 1, name: "RESTART_POLICY_ON_FAILURE" }, - { no: 2, name: "RESTART_POLICY_ALWAYS" }, -]); - /** * @generated from enum flyteidl.plugins.kubeflow.CleanPodPolicy */ diff --git a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/mpi_pb.ts b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/mpi_pb.ts index 89ff16b82b..9364f1c082 100644 --- a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/mpi_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/mpi_pb.ts @@ -5,8 +5,9 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import { RestartPolicy, RunPolicy } from "./common_pb.js"; +import { RunPolicy } from "./common_pb.js"; import { Resources } from "../../core/tasks_pb.js"; +import { CommonReplicaSpec, RestartPolicy } from "../common_pb.js"; /** * Proto for plugin that enables distributed training using https://github.com/kubeflow/mpi-operator @@ -82,30 +83,35 @@ export class DistributedMPITrainingTask extends Message { /** + * 1~4 deprecated. Use common instead. * Number of replicas * - * @generated from field: int32 replicas = 1; + * @generated from field: int32 replicas = 1 [deprecated = true]; + * @deprecated */ replicas = 0; /** * Image used for the replica group * - * @generated from field: string image = 2; + * @generated from field: string image = 2 [deprecated = true]; + * @deprecated */ image = ""; /** * Resources required for the replica group * - * @generated from field: flyteidl.core.Resources resources = 3; + * @generated from field: flyteidl.core.Resources resources = 3 [deprecated = true]; + * @deprecated */ resources?: Resources; /** * Restart policy determines whether pods will be restarted when they exit * - * @generated from field: flyteidl.plugins.kubeflow.RestartPolicy restart_policy = 4; + * @generated from field: flyteidl.plugins.RestartPolicy restart_policy = 4 [deprecated = true]; + * @deprecated */ restartPolicy = RestartPolicy.NEVER; @@ -116,6 +122,13 @@ export class DistributedMPITrainingReplicaSpec extends Message) { super(); proto3.util.initPartial(data, this); @@ -129,6 +142,7 @@ export class DistributedMPITrainingReplicaSpec extends Message): DistributedMPITrainingReplicaSpec { diff --git a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/pytorch_pb.ts b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/pytorch_pb.ts index 2dd38a56ba..fc5a17a460 100644 --- a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/pytorch_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/pytorch_pb.ts @@ -5,8 +5,9 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import { RestartPolicy, RunPolicy } from "./common_pb.js"; +import { RunPolicy } from "./common_pb.js"; import { Resources } from "../../core/tasks_pb.js"; +import { CommonReplicaSpec, RestartPolicy } from "../common_pb.js"; /** * Custom proto for torch elastic config for distributed training using @@ -144,33 +145,45 @@ export class DistributedPyTorchTrainingTask extends Message { /** + * 1~4 deprecated. Use common instead. * Number of replicas * - * @generated from field: int32 replicas = 1; + * @generated from field: int32 replicas = 1 [deprecated = true]; + * @deprecated */ replicas = 0; /** * Image used for the replica group * - * @generated from field: string image = 2; + * @generated from field: string image = 2 [deprecated = true]; + * @deprecated */ image = ""; /** * Resources required for the replica group * - * @generated from field: flyteidl.core.Resources resources = 3; + * @generated from field: flyteidl.core.Resources resources = 3 [deprecated = true]; + * @deprecated */ resources?: Resources; /** - * RestartPolicy determines whether pods will be restarted when they exit + * Restart policy determines whether pods will be restarted when they exit * - * @generated from field: flyteidl.plugins.kubeflow.RestartPolicy restart_policy = 4; + * @generated from field: flyteidl.plugins.RestartPolicy restart_policy = 4 [deprecated = true]; + * @deprecated */ restartPolicy = RestartPolicy.NEVER; + /** + * The common replica spec + * + * @generated from field: flyteidl.plugins.CommonReplicaSpec common = 5; + */ + common?: CommonReplicaSpec; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -183,6 +196,7 @@ export class DistributedPyTorchTrainingReplicaSpec extends Message): DistributedPyTorchTrainingReplicaSpec { diff --git a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/tensorflow_pb.ts b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/tensorflow_pb.ts index 356385d858..5b9c001e30 100644 --- a/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/tensorflow_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/plugins/kubeflow/tensorflow_pb.ts @@ -5,8 +5,9 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import { RestartPolicy, RunPolicy } from "./common_pb.js"; +import { RunPolicy } from "./common_pb.js"; import { Resources } from "../../core/tasks_pb.js"; +import { CommonReplicaSpec, RestartPolicy } from "../common_pb.js"; /** * Proto for plugin that enables distributed training using https://github.com/kubeflow/tf-operator @@ -88,33 +89,45 @@ export class DistributedTensorflowTrainingTask extends Message { /** + * 1~4 deprecated. Use common instead. * Number of replicas * - * @generated from field: int32 replicas = 1; + * @generated from field: int32 replicas = 1 [deprecated = true]; + * @deprecated */ replicas = 0; /** * Image used for the replica group * - * @generated from field: string image = 2; + * @generated from field: string image = 2 [deprecated = true]; + * @deprecated */ image = ""; /** * Resources required for the replica group * - * @generated from field: flyteidl.core.Resources resources = 3; + * @generated from field: flyteidl.core.Resources resources = 3 [deprecated = true]; + * @deprecated */ resources?: Resources; /** - * RestartPolicy Determines whether pods will be restarted when they exit + * Restart policy determines whether pods will be restarted when they exit * - * @generated from field: flyteidl.plugins.kubeflow.RestartPolicy restart_policy = 4; + * @generated from field: flyteidl.plugins.RestartPolicy restart_policy = 4 [deprecated = true]; + * @deprecated */ restartPolicy = RestartPolicy.NEVER; + /** + * The common replica spec + * + * @generated from field: flyteidl.plugins.CommonReplicaSpec common = 5; + */ + common?: CommonReplicaSpec; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -127,6 +140,7 @@ export class DistributedTensorflowTrainingReplicaSpec extends Message): DistributedTensorflowTrainingReplicaSpec { diff --git a/flyteidl/gen/pb-go/flyteidl/plugins/common.pb.go b/flyteidl/gen/pb-go/flyteidl/plugins/common.pb.go new file mode 100644 index 0000000000..f92acdc2ee --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/plugins/common.pb.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: flyteidl/plugins/common.proto + +package plugins + +import ( + core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RestartPolicy int32 + +const ( + RestartPolicy_RESTART_POLICY_NEVER RestartPolicy = 0 + RestartPolicy_RESTART_POLICY_ON_FAILURE RestartPolicy = 1 + RestartPolicy_RESTART_POLICY_ALWAYS RestartPolicy = 2 +) + +// Enum value maps for RestartPolicy. +var ( + RestartPolicy_name = map[int32]string{ + 0: "RESTART_POLICY_NEVER", + 1: "RESTART_POLICY_ON_FAILURE", + 2: "RESTART_POLICY_ALWAYS", + } + RestartPolicy_value = map[string]int32{ + "RESTART_POLICY_NEVER": 0, + "RESTART_POLICY_ON_FAILURE": 1, + "RESTART_POLICY_ALWAYS": 2, + } +) + +func (x RestartPolicy) Enum() *RestartPolicy { + p := new(RestartPolicy) + *p = x + return p +} + +func (x RestartPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RestartPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_flyteidl_plugins_common_proto_enumTypes[0].Descriptor() +} + +func (RestartPolicy) Type() protoreflect.EnumType { + return &file_flyteidl_plugins_common_proto_enumTypes[0] +} + +func (x RestartPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RestartPolicy.Descriptor instead. +func (RestartPolicy) EnumDescriptor() ([]byte, []int) { + return file_flyteidl_plugins_common_proto_rawDescGZIP(), []int{0} +} + +type CommonReplicaSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Number of replicas + Replicas int32 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"` + // Image used for the replica group + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // Resources required for the replica group + Resources *core.Resources `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` + // RestartPolicy determines whether pods will be restarted when they exit + RestartPolicy RestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=flyteidl.plugins.RestartPolicy" json:"restart_policy,omitempty"` +} + +func (x *CommonReplicaSpec) Reset() { + *x = CommonReplicaSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_plugins_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonReplicaSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonReplicaSpec) ProtoMessage() {} + +func (x *CommonReplicaSpec) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_plugins_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommonReplicaSpec.ProtoReflect.Descriptor instead. +func (*CommonReplicaSpec) Descriptor() ([]byte, []int) { + return file_flyteidl_plugins_common_proto_rawDescGZIP(), []int{0} +} + +func (x *CommonReplicaSpec) GetReplicas() int32 { + if x != nil { + return x.Replicas + } + return 0 +} + +func (x *CommonReplicaSpec) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *CommonReplicaSpec) GetResources() *core.Resources { + if x != nil { + return x.Resources + } + return nil +} + +func (x *CommonReplicaSpec) GetRestartPolicy() RestartPolicy { + if x != nil { + return x.RestartPolicy + } + return RestartPolicy_RESTART_POLICY_NEVER +} + +var File_flyteidl_plugins_common_proto protoreflect.FileDescriptor + +var file_flyteidl_plugins_common_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x73, 0x1a, 0x19, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, + 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0e, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2a, 0x63, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4e, 0x45, 0x56, 0x45, 0x52, 0x10, 0x00, 0x12, + 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, + 0x59, 0x5f, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x19, + 0x0a, 0x15, 0x52, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, + 0x5f, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x10, 0x02, 0x42, 0xc3, 0x01, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, + 0xa2, 0x02, 0x03, 0x46, 0x50, 0x58, 0xaa, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0xe2, 0x02, 0x1c, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_flyteidl_plugins_common_proto_rawDescOnce sync.Once + file_flyteidl_plugins_common_proto_rawDescData = file_flyteidl_plugins_common_proto_rawDesc +) + +func file_flyteidl_plugins_common_proto_rawDescGZIP() []byte { + file_flyteidl_plugins_common_proto_rawDescOnce.Do(func() { + file_flyteidl_plugins_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_flyteidl_plugins_common_proto_rawDescData) + }) + return file_flyteidl_plugins_common_proto_rawDescData +} + +var file_flyteidl_plugins_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_flyteidl_plugins_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_flyteidl_plugins_common_proto_goTypes = []interface{}{ + (RestartPolicy)(0), // 0: flyteidl.plugins.RestartPolicy + (*CommonReplicaSpec)(nil), // 1: flyteidl.plugins.CommonReplicaSpec + (*core.Resources)(nil), // 2: flyteidl.core.Resources +} +var file_flyteidl_plugins_common_proto_depIdxs = []int32{ + 2, // 0: flyteidl.plugins.CommonReplicaSpec.resources:type_name -> flyteidl.core.Resources + 0, // 1: flyteidl.plugins.CommonReplicaSpec.restart_policy:type_name -> flyteidl.plugins.RestartPolicy + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_flyteidl_plugins_common_proto_init() } +func file_flyteidl_plugins_common_proto_init() { + if File_flyteidl_plugins_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_flyteidl_plugins_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonReplicaSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_flyteidl_plugins_common_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_flyteidl_plugins_common_proto_goTypes, + DependencyIndexes: file_flyteidl_plugins_common_proto_depIdxs, + EnumInfos: file_flyteidl_plugins_common_proto_enumTypes, + MessageInfos: file_flyteidl_plugins_common_proto_msgTypes, + }.Build() + File_flyteidl_plugins_common_proto = out.File + file_flyteidl_plugins_common_proto_rawDesc = nil + file_flyteidl_plugins_common_proto_goTypes = nil + file_flyteidl_plugins_common_proto_depIdxs = nil +} diff --git a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/common.pb.go b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/common.pb.go index ba03051e1e..685ffa716b 100644 --- a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/common.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/common.pb.go @@ -4,9 +4,10 @@ // protoc (unknown) // source: flyteidl/plugins/kubeflow/common.proto -package plugins +package kubeflow import ( + plugins "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,54 +21,18 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type RestartPolicy int32 +// Symbols defined in public import of flyteidl/plugins/common.proto. -const ( - RestartPolicy_RESTART_POLICY_NEVER RestartPolicy = 0 - RestartPolicy_RESTART_POLICY_ON_FAILURE RestartPolicy = 1 - RestartPolicy_RESTART_POLICY_ALWAYS RestartPolicy = 2 -) - -// Enum value maps for RestartPolicy. -var ( - RestartPolicy_name = map[int32]string{ - 0: "RESTART_POLICY_NEVER", - 1: "RESTART_POLICY_ON_FAILURE", - 2: "RESTART_POLICY_ALWAYS", - } - RestartPolicy_value = map[string]int32{ - "RESTART_POLICY_NEVER": 0, - "RESTART_POLICY_ON_FAILURE": 1, - "RESTART_POLICY_ALWAYS": 2, - } -) +type RestartPolicy = plugins.RestartPolicy -func (x RestartPolicy) Enum() *RestartPolicy { - p := new(RestartPolicy) - *p = x - return p -} +const RestartPolicy_RESTART_POLICY_NEVER = plugins.RestartPolicy_RESTART_POLICY_NEVER +const RestartPolicy_RESTART_POLICY_ON_FAILURE = plugins.RestartPolicy_RESTART_POLICY_ON_FAILURE +const RestartPolicy_RESTART_POLICY_ALWAYS = plugins.RestartPolicy_RESTART_POLICY_ALWAYS -func (x RestartPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} +var RestartPolicy_name = plugins.RestartPolicy_name +var RestartPolicy_value = plugins.RestartPolicy_value -func (RestartPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_flyteidl_plugins_kubeflow_common_proto_enumTypes[0].Descriptor() -} - -func (RestartPolicy) Type() protoreflect.EnumType { - return &file_flyteidl_plugins_kubeflow_common_proto_enumTypes[0] -} - -func (x RestartPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RestartPolicy.Descriptor instead. -func (RestartPolicy) EnumDescriptor() ([]byte, []int) { - return file_flyteidl_plugins_kubeflow_common_proto_rawDescGZIP(), []int{0} -} +type CommonReplicaSpec = plugins.CommonReplicaSpec type CleanPodPolicy int32 @@ -102,11 +67,11 @@ func (x CleanPodPolicy) String() string { } func (CleanPodPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_flyteidl_plugins_kubeflow_common_proto_enumTypes[1].Descriptor() + return file_flyteidl_plugins_kubeflow_common_proto_enumTypes[0].Descriptor() } func (CleanPodPolicy) Type() protoreflect.EnumType { - return &file_flyteidl_plugins_kubeflow_common_proto_enumTypes[1] + return &file_flyteidl_plugins_kubeflow_common_proto_enumTypes[0] } func (x CleanPodPolicy) Number() protoreflect.EnumNumber { @@ -115,7 +80,7 @@ func (x CleanPodPolicy) Number() protoreflect.EnumNumber { // Deprecated: Use CleanPodPolicy.Descriptor instead. func (CleanPodPolicy) EnumDescriptor() ([]byte, []int) { - return file_flyteidl_plugins_kubeflow_common_proto_rawDescGZIP(), []int{1} + return file_flyteidl_plugins_kubeflow_common_proto_rawDescGZIP(), []int{0} } type RunPolicy struct { @@ -201,51 +166,47 @@ var file_flyteidl_plugins_kubeflow_common_proto_rawDesc = []byte{ 0x6e, 0x73, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x22, 0xfa, 0x01, 0x0a, 0x09, 0x52, 0x75, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x53, 0x0a, 0x10, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x64, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x6f, 0x64, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x6f, 0x64, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x74, 0x6c, 0x5f, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6e, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x74, 0x74, 0x6c, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, - 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x61, 0x64, - 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x62, - 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2a, 0x63, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x50, 0x4f, 0x4c, - 0x49, 0x43, 0x59, 0x5f, 0x4e, 0x45, 0x56, 0x45, 0x52, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x52, - 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4f, 0x4e, - 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x45, - 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x57, - 0x41, 0x59, 0x53, 0x10, 0x02, 0x2a, 0x60, 0x0a, 0x0e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x6f, - 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4c, 0x45, 0x41, 0x4e, - 0x50, 0x4f, 0x44, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, - 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4c, 0x45, 0x41, 0x4e, 0x50, 0x4f, 0x44, 0x5f, 0x50, 0x4f, - 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, - 0x0a, 0x13, 0x43, 0x4c, 0x45, 0x41, 0x4e, 0x50, 0x4f, 0x44, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, - 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x4b, 0xaa, 0x02, 0x19, - 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xca, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xe2, 0x02, 0x25, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, - 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x73, 0x3a, 0x3a, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6c, 0x6f, 0x77, 0x1a, 0x1d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xfa, 0x01, 0x0a, 0x09, 0x52, 0x75, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x53, 0x0a, 0x10, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x64, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, + 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x6f, 0x64, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x6f, 0x64, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x74, 0x6c, 0x5f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x74, 0x74, 0x6c, 0x53, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, + 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x61, + 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x15, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x61, 0x64, 0x6c, + 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, + 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2a, + 0x60, 0x0a, 0x0e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4c, 0x45, 0x41, 0x4e, 0x50, 0x4f, 0x44, 0x5f, 0x50, 0x4f, + 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, + 0x4c, 0x45, 0x41, 0x4e, 0x50, 0x4f, 0x44, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, + 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x45, 0x41, + 0x4e, 0x50, 0x4f, 0x44, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x10, + 0x02, 0x42, 0xfa, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, + 0x6c, 0x6f, 0x77, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, + 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x73, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x4b, + 0xaa, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xca, 0x02, 0x19, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, + 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xe2, 0x02, 0x25, 0x46, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, + 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x1b, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x3a, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x50, 0x00, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -260,15 +221,14 @@ func file_flyteidl_plugins_kubeflow_common_proto_rawDescGZIP() []byte { return file_flyteidl_plugins_kubeflow_common_proto_rawDescData } -var file_flyteidl_plugins_kubeflow_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_flyteidl_plugins_kubeflow_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_flyteidl_plugins_kubeflow_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_flyteidl_plugins_kubeflow_common_proto_goTypes = []interface{}{ - (RestartPolicy)(0), // 0: flyteidl.plugins.kubeflow.RestartPolicy - (CleanPodPolicy)(0), // 1: flyteidl.plugins.kubeflow.CleanPodPolicy - (*RunPolicy)(nil), // 2: flyteidl.plugins.kubeflow.RunPolicy + (CleanPodPolicy)(0), // 0: flyteidl.plugins.kubeflow.CleanPodPolicy + (*RunPolicy)(nil), // 1: flyteidl.plugins.kubeflow.RunPolicy } var file_flyteidl_plugins_kubeflow_common_proto_depIdxs = []int32{ - 1, // 0: flyteidl.plugins.kubeflow.RunPolicy.clean_pod_policy:type_name -> flyteidl.plugins.kubeflow.CleanPodPolicy + 0, // 0: flyteidl.plugins.kubeflow.RunPolicy.clean_pod_policy:type_name -> flyteidl.plugins.kubeflow.CleanPodPolicy 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -300,7 +260,7 @@ func file_flyteidl_plugins_kubeflow_common_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_plugins_kubeflow_common_proto_rawDesc, - NumEnums: 2, + NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, diff --git a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/mpi.pb.go b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/mpi.pb.go index 4dcea4912a..ee2bf87273 100644 --- a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/mpi.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/mpi.pb.go @@ -4,10 +4,11 @@ // protoc (unknown) // source: flyteidl/plugins/kubeflow/mpi.proto -package plugins +package kubeflow import ( core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + plugins "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -105,16 +106,27 @@ type DistributedMPITrainingReplicaSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // 1~4 deprecated. Use common instead. // Number of replicas + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. Replicas int32 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"` // Image used for the replica group + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` // Resources required for the replica group + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. Resources *core.Resources `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` // Restart policy determines whether pods will be restarted when they exit - RestartPolicy RestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=flyteidl.plugins.kubeflow.RestartPolicy" json:"restart_policy,omitempty"` + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. + RestartPolicy plugins.RestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=flyteidl.plugins.RestartPolicy" json:"restart_policy,omitempty"` // MPI sometimes requires different command set for different replica groups Command []string `protobuf:"bytes,5,rep,name=command,proto3" json:"command,omitempty"` + // The common replica spec + Common *plugins.CommonReplicaSpec `protobuf:"bytes,6,opt,name=common,proto3" json:"common,omitempty"` } func (x *DistributedMPITrainingReplicaSpec) Reset() { @@ -149,6 +161,7 @@ func (*DistributedMPITrainingReplicaSpec) Descriptor() ([]byte, []int) { return file_flyteidl_plugins_kubeflow_mpi_proto_rawDescGZIP(), []int{1} } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. func (x *DistributedMPITrainingReplicaSpec) GetReplicas() int32 { if x != nil { return x.Replicas @@ -156,6 +169,7 @@ func (x *DistributedMPITrainingReplicaSpec) GetReplicas() int32 { return 0 } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. func (x *DistributedMPITrainingReplicaSpec) GetImage() string { if x != nil { return x.Image @@ -163,6 +177,7 @@ func (x *DistributedMPITrainingReplicaSpec) GetImage() string { return "" } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. func (x *DistributedMPITrainingReplicaSpec) GetResources() *core.Resources { if x != nil { return x.Resources @@ -170,11 +185,12 @@ func (x *DistributedMPITrainingReplicaSpec) GetResources() *core.Resources { return nil } -func (x *DistributedMPITrainingReplicaSpec) GetRestartPolicy() RestartPolicy { +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/mpi.proto. +func (x *DistributedMPITrainingReplicaSpec) GetRestartPolicy() plugins.RestartPolicy { if x != nil { return x.RestartPolicy } - return RestartPolicy_RESTART_POLICY_NEVER + return plugins.RestartPolicy(0) } func (x *DistributedMPITrainingReplicaSpec) GetCommand() []string { @@ -184,6 +200,13 @@ func (x *DistributedMPITrainingReplicaSpec) GetCommand() []string { return nil } +func (x *DistributedMPITrainingReplicaSpec) GetCommon() *plugins.CommonReplicaSpec { + if x != nil { + return x.Common + } + return nil +} + var File_flyteidl_plugins_kubeflow_mpi_proto protoreflect.FileDescriptor var file_flyteidl_plugins_kubeflow_mpi_proto_rawDesc = []byte{ @@ -216,38 +239,42 @@ var file_flyteidl_plugins_kubeflow_mpi_proto_rawDesc = []byte{ 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x09, 0x72, 0x75, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x6c, 0x6f, 0x74, 0x73, 0x22, - 0xf8, 0x01, 0x0a, 0x21, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x4d, + 0xbc, 0x02, 0x0a, 0x21, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x4d, 0x50, 0x49, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x4f, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0xee, 0x01, 0x0a, 0x1d, 0x63, - 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x08, 0x4d, 0x70, - 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x4b, 0xaa, 0x02, 0x19, - 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xca, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xe2, 0x02, 0x25, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, - 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x73, 0x3a, 0x3a, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x61, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x18, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x72, + 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x53, 0x70, 0x65, 0x63, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0xf7, + 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, + 0x42, 0x08, 0x4d, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, + 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6b, 0x75, 0x62, 0x65, + 0x66, 0x6c, 0x6f, 0x77, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x4b, 0xaa, 0x02, 0x19, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x4b, 0x75, + 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xca, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, + 0x6f, 0x77, 0xe2, 0x02, 0x25, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x3a, + 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -268,19 +295,21 @@ var file_flyteidl_plugins_kubeflow_mpi_proto_goTypes = []interface{}{ (*DistributedMPITrainingReplicaSpec)(nil), // 1: flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpec (*RunPolicy)(nil), // 2: flyteidl.plugins.kubeflow.RunPolicy (*core.Resources)(nil), // 3: flyteidl.core.Resources - (RestartPolicy)(0), // 4: flyteidl.plugins.kubeflow.RestartPolicy + (plugins.RestartPolicy)(0), // 4: flyteidl.plugins.RestartPolicy + (*plugins.CommonReplicaSpec)(nil), // 5: flyteidl.plugins.CommonReplicaSpec } var file_flyteidl_plugins_kubeflow_mpi_proto_depIdxs = []int32{ 1, // 0: flyteidl.plugins.kubeflow.DistributedMPITrainingTask.worker_replicas:type_name -> flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpec 1, // 1: flyteidl.plugins.kubeflow.DistributedMPITrainingTask.launcher_replicas:type_name -> flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpec 2, // 2: flyteidl.plugins.kubeflow.DistributedMPITrainingTask.run_policy:type_name -> flyteidl.plugins.kubeflow.RunPolicy 3, // 3: flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpec.resources:type_name -> flyteidl.core.Resources - 4, // 4: flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpec.restart_policy:type_name -> flyteidl.plugins.kubeflow.RestartPolicy - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 4, // 4: flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpec.restart_policy:type_name -> flyteidl.plugins.RestartPolicy + 5, // 5: flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpec.common:type_name -> flyteidl.plugins.CommonReplicaSpec + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_flyteidl_plugins_kubeflow_mpi_proto_init() } diff --git a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/pytorch.pb.go b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/pytorch.pb.go index 4dbabf4ae3..7107835725 100644 --- a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/pytorch.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/pytorch.pb.go @@ -4,10 +4,11 @@ // protoc (unknown) // source: flyteidl/plugins/kubeflow/pytorch.proto -package plugins +package kubeflow import ( core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + plugins "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -185,14 +186,25 @@ type DistributedPyTorchTrainingReplicaSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // 1~4 deprecated. Use common instead. // Number of replicas + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. Replicas int32 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"` // Image used for the replica group + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` // Resources required for the replica group + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. Resources *core.Resources `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` - // RestartPolicy determines whether pods will be restarted when they exit - RestartPolicy RestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=flyteidl.plugins.kubeflow.RestartPolicy" json:"restart_policy,omitempty"` + // Restart policy determines whether pods will be restarted when they exit + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. + RestartPolicy plugins.RestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=flyteidl.plugins.RestartPolicy" json:"restart_policy,omitempty"` + // The common replica spec + Common *plugins.CommonReplicaSpec `protobuf:"bytes,5,opt,name=common,proto3" json:"common,omitempty"` } func (x *DistributedPyTorchTrainingReplicaSpec) Reset() { @@ -227,6 +239,7 @@ func (*DistributedPyTorchTrainingReplicaSpec) Descriptor() ([]byte, []int) { return file_flyteidl_plugins_kubeflow_pytorch_proto_rawDescGZIP(), []int{2} } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. func (x *DistributedPyTorchTrainingReplicaSpec) GetReplicas() int32 { if x != nil { return x.Replicas @@ -234,6 +247,7 @@ func (x *DistributedPyTorchTrainingReplicaSpec) GetReplicas() int32 { return 0 } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. func (x *DistributedPyTorchTrainingReplicaSpec) GetImage() string { if x != nil { return x.Image @@ -241,6 +255,7 @@ func (x *DistributedPyTorchTrainingReplicaSpec) GetImage() string { return "" } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. func (x *DistributedPyTorchTrainingReplicaSpec) GetResources() *core.Resources { if x != nil { return x.Resources @@ -248,11 +263,19 @@ func (x *DistributedPyTorchTrainingReplicaSpec) GetResources() *core.Resources { return nil } -func (x *DistributedPyTorchTrainingReplicaSpec) GetRestartPolicy() RestartPolicy { +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/pytorch.proto. +func (x *DistributedPyTorchTrainingReplicaSpec) GetRestartPolicy() plugins.RestartPolicy { if x != nil { return x.RestartPolicy } - return RestartPolicy_RESTART_POLICY_NEVER + return plugins.RestartPolicy(0) +} + +func (x *DistributedPyTorchTrainingReplicaSpec) GetCommon() *plugins.CommonReplicaSpec { + if x != nil { + return x.Common + } + return nil } var File_flyteidl_plugins_kubeflow_pytorch_proto protoreflect.FileDescriptor @@ -303,37 +326,42 @@ var file_flyteidl_plugins_kubeflow_pytorch_proto_rawDesc = []byte{ 0x0b, 0x32, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x65, 0x6c, 0x61, - 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe2, 0x01, 0x0a, 0x25, 0x44, + 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa6, 0x02, 0x0a, 0x25, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x50, 0x79, 0x54, 0x6f, 0x72, 0x63, 0x68, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4f, - 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, - 0xf2, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x42, 0x0c, 0x50, 0x79, 0x74, 0x6f, 0x72, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0xa2, 0x02, 0x03, 0x46, 0x50, 0x4b, 0xaa, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0xca, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xe2, 0x02, - 0x25, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x3a, 0x4b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x73, 0x12, 0x18, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3a, + 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x72, 0x65, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x70, 0x65, 0x63, 0x52, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x42, 0xfb, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, + 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x0c, 0x50, 0x79, 0x74, 0x6f, 0x72, 0x63, 0x68, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, + 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xa2, 0x02, 0x03, + 0x46, 0x50, 0x4b, 0xaa, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xca, + 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xe2, 0x02, 0x25, 0x46, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, + 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x3a, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, + 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -355,7 +383,8 @@ var file_flyteidl_plugins_kubeflow_pytorch_proto_goTypes = []interface{}{ (*DistributedPyTorchTrainingReplicaSpec)(nil), // 2: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpec (*RunPolicy)(nil), // 3: flyteidl.plugins.kubeflow.RunPolicy (*core.Resources)(nil), // 4: flyteidl.core.Resources - (RestartPolicy)(0), // 5: flyteidl.plugins.kubeflow.RestartPolicy + (plugins.RestartPolicy)(0), // 5: flyteidl.plugins.RestartPolicy + (*plugins.CommonReplicaSpec)(nil), // 6: flyteidl.plugins.CommonReplicaSpec } var file_flyteidl_plugins_kubeflow_pytorch_proto_depIdxs = []int32{ 2, // 0: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingTask.worker_replicas:type_name -> flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpec @@ -363,12 +392,13 @@ var file_flyteidl_plugins_kubeflow_pytorch_proto_depIdxs = []int32{ 3, // 2: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingTask.run_policy:type_name -> flyteidl.plugins.kubeflow.RunPolicy 0, // 3: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingTask.elastic_config:type_name -> flyteidl.plugins.kubeflow.ElasticConfig 4, // 4: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpec.resources:type_name -> flyteidl.core.Resources - 5, // 5: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpec.restart_policy:type_name -> flyteidl.plugins.kubeflow.RestartPolicy - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 5, // 5: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpec.restart_policy:type_name -> flyteidl.plugins.RestartPolicy + 6, // 6: flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpec.common:type_name -> flyteidl.plugins.CommonReplicaSpec + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_flyteidl_plugins_kubeflow_pytorch_proto_init() } diff --git a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/tensorflow.pb.go b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/tensorflow.pb.go index ef6ec1899b..8fb9878d56 100644 --- a/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/tensorflow.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow/tensorflow.pb.go @@ -4,10 +4,11 @@ // protoc (unknown) // source: flyteidl/plugins/kubeflow/tensorflow.proto -package plugins +package kubeflow import ( core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + plugins "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -113,14 +114,25 @@ type DistributedTensorflowTrainingReplicaSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // 1~4 deprecated. Use common instead. // Number of replicas + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. Replicas int32 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"` // Image used for the replica group + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` // Resources required for the replica group + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. Resources *core.Resources `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` - // RestartPolicy Determines whether pods will be restarted when they exit - RestartPolicy RestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=flyteidl.plugins.kubeflow.RestartPolicy" json:"restart_policy,omitempty"` + // Restart policy determines whether pods will be restarted when they exit + // + // Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. + RestartPolicy plugins.RestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=flyteidl.plugins.RestartPolicy" json:"restart_policy,omitempty"` + // The common replica spec + Common *plugins.CommonReplicaSpec `protobuf:"bytes,5,opt,name=common,proto3" json:"common,omitempty"` } func (x *DistributedTensorflowTrainingReplicaSpec) Reset() { @@ -155,6 +167,7 @@ func (*DistributedTensorflowTrainingReplicaSpec) Descriptor() ([]byte, []int) { return file_flyteidl_plugins_kubeflow_tensorflow_proto_rawDescGZIP(), []int{1} } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. func (x *DistributedTensorflowTrainingReplicaSpec) GetReplicas() int32 { if x != nil { return x.Replicas @@ -162,6 +175,7 @@ func (x *DistributedTensorflowTrainingReplicaSpec) GetReplicas() int32 { return 0 } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. func (x *DistributedTensorflowTrainingReplicaSpec) GetImage() string { if x != nil { return x.Image @@ -169,6 +183,7 @@ func (x *DistributedTensorflowTrainingReplicaSpec) GetImage() string { return "" } +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. func (x *DistributedTensorflowTrainingReplicaSpec) GetResources() *core.Resources { if x != nil { return x.Resources @@ -176,11 +191,19 @@ func (x *DistributedTensorflowTrainingReplicaSpec) GetResources() *core.Resource return nil } -func (x *DistributedTensorflowTrainingReplicaSpec) GetRestartPolicy() RestartPolicy { +// Deprecated: Marked as deprecated in flyteidl/plugins/kubeflow/tensorflow.proto. +func (x *DistributedTensorflowTrainingReplicaSpec) GetRestartPolicy() plugins.RestartPolicy { if x != nil { return x.RestartPolicy } - return RestartPolicy_RESTART_POLICY_NEVER + return plugins.RestartPolicy(0) +} + +func (x *DistributedTensorflowTrainingReplicaSpec) GetCommon() *plugins.CommonReplicaSpec { + if x != nil { + return x.Common + } + return nil } var File_flyteidl_plugins_kubeflow_tensorflow_proto protoreflect.FileDescriptor @@ -228,38 +251,42 @@ var file_flyteidl_plugins_kubeflow_tensorflow_proto_rawDesc = []byte{ 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x70, 0x65, 0x63, 0x52, 0x11, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x28, 0x44, 0x69, + 0x72, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x28, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x4f, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x42, 0xf5, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x42, 0x0f, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, - 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x73, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x4b, 0xaa, 0x02, 0x19, 0x46, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x4b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0xca, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0xe2, 0x02, 0x25, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x46, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x3a, - 0x3a, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x63, 0x61, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x18, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0e, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x70, 0x65, 0x63, 0x52, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0xfe, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x6b, + 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x0f, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x66, + 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, + 0x6f, 0x77, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x4b, 0xaa, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, + 0x66, 0x6c, 0x6f, 0x77, 0xca, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, + 0xe2, 0x02, 0x25, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x5c, 0x4b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x46, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x3a, 0x4b, 0x75, + 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -278,9 +305,10 @@ var file_flyteidl_plugins_kubeflow_tensorflow_proto_msgTypes = make([]protoimpl. var file_flyteidl_plugins_kubeflow_tensorflow_proto_goTypes = []interface{}{ (*DistributedTensorflowTrainingTask)(nil), // 0: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingTask (*DistributedTensorflowTrainingReplicaSpec)(nil), // 1: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpec - (*RunPolicy)(nil), // 2: flyteidl.plugins.kubeflow.RunPolicy - (*core.Resources)(nil), // 3: flyteidl.core.Resources - (RestartPolicy)(0), // 4: flyteidl.plugins.kubeflow.RestartPolicy + (*RunPolicy)(nil), // 2: flyteidl.plugins.kubeflow.RunPolicy + (*core.Resources)(nil), // 3: flyteidl.core.Resources + (plugins.RestartPolicy)(0), // 4: flyteidl.plugins.RestartPolicy + (*plugins.CommonReplicaSpec)(nil), // 5: flyteidl.plugins.CommonReplicaSpec } var file_flyteidl_plugins_kubeflow_tensorflow_proto_depIdxs = []int32{ 1, // 0: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingTask.worker_replicas:type_name -> flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpec @@ -289,12 +317,13 @@ var file_flyteidl_plugins_kubeflow_tensorflow_proto_depIdxs = []int32{ 2, // 3: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingTask.run_policy:type_name -> flyteidl.plugins.kubeflow.RunPolicy 1, // 4: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingTask.evaluator_replicas:type_name -> flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpec 3, // 5: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpec.resources:type_name -> flyteidl.core.Resources - 4, // 6: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpec.restart_policy:type_name -> flyteidl.plugins.kubeflow.RestartPolicy - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 4, // 6: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpec.restart_policy:type_name -> flyteidl.plugins.RestartPolicy + 5, // 7: flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpec.common:type_name -> flyteidl.plugins.CommonReplicaSpec + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_flyteidl_plugins_kubeflow_tensorflow_proto_init() } diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/plugins/common.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/plugins/common.swagger.json new file mode 100644 index 0000000000..4e9dc31dbe --- /dev/null +++ b/flyteidl/gen/pb-go/gateway/flyteidl/plugins/common.swagger.json @@ -0,0 +1,46 @@ +{ + "swagger": "2.0", + "info": { + "title": "flyteidl/plugins/common.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } +} diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.py b/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.py new file mode 100644 index 0000000000..5abdb07e50 --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl/plugins/common.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lyteidl/plugins/common.proto\x12\x10\x66lyteidl.plugins\x1a\x19\x66lyteidl/core/tasks.proto\"\xc5\x01\n\x11\x43ommonReplicaSpec\x12\x1a\n\x08replicas\x18\x01 \x01(\x05R\x08replicas\x12\x14\n\x05image\x18\x02 \x01(\tR\x05image\x12\x36\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresources\x12\x46\n\x0erestart_policy\x18\x04 \x01(\x0e\x32\x1f.flyteidl.plugins.RestartPolicyR\rrestartPolicy*c\n\rRestartPolicy\x12\x18\n\x14RESTART_POLICY_NEVER\x10\x00\x12\x1d\n\x19RESTART_POLICY_ON_FAILURE\x10\x01\x12\x19\n\x15RESTART_POLICY_ALWAYS\x10\x02\x42\xc3\x01\n\x14\x63om.flyteidl.pluginsB\x0b\x43ommonProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PX\xaa\x02\x10\x46lyteidl.Plugins\xca\x02\x10\x46lyteidl\\Plugins\xe2\x02\x1c\x46lyteidl\\Plugins\\GPBMetadata\xea\x02\x11\x46lyteidl::Pluginsb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flyteidl.plugins.common_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\024com.flyteidl.pluginsB\013CommonProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\242\002\003FPX\252\002\020Flyteidl.Plugins\312\002\020Flyteidl\\Plugins\342\002\034Flyteidl\\Plugins\\GPBMetadata\352\002\021Flyteidl::Plugins' + _globals['_RESTARTPOLICY']._serialized_start=278 + _globals['_RESTARTPOLICY']._serialized_end=377 + _globals['_COMMONREPLICASPEC']._serialized_start=79 + _globals['_COMMONREPLICASPEC']._serialized_end=276 +# @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.pyi new file mode 100644 index 0000000000..24115b7166 --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2.pyi @@ -0,0 +1,28 @@ +from flyteidl.core import tasks_pb2 as _tasks_pb2 +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class RestartPolicy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + RESTART_POLICY_NEVER: _ClassVar[RestartPolicy] + RESTART_POLICY_ON_FAILURE: _ClassVar[RestartPolicy] + RESTART_POLICY_ALWAYS: _ClassVar[RestartPolicy] +RESTART_POLICY_NEVER: RestartPolicy +RESTART_POLICY_ON_FAILURE: RestartPolicy +RESTART_POLICY_ALWAYS: RestartPolicy + +class CommonReplicaSpec(_message.Message): + __slots__ = ["replicas", "image", "resources", "restart_policy"] + REPLICAS_FIELD_NUMBER: _ClassVar[int] + IMAGE_FIELD_NUMBER: _ClassVar[int] + RESOURCES_FIELD_NUMBER: _ClassVar[int] + RESTART_POLICY_FIELD_NUMBER: _ClassVar[int] + replicas: int + image: str + resources: _tasks_pb2.Resources + restart_policy: RestartPolicy + def __init__(self, replicas: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ..., restart_policy: _Optional[_Union[RestartPolicy, str]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/plugins/common_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.py b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.py index d09a4aba41..3cba1b71ec 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.py @@ -11,9 +11,11 @@ _sym_db = _symbol_database.Default() +from flyteidl.plugins import common_pb2 as flyteidl_dot_plugins_dot_common__pb2 +from flyteidl.plugins.common_pb2 import * -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&flyteidl/plugins/kubeflow/common.proto\x12\x19\x66lyteidl.plugins.kubeflow\"\xfa\x01\n\tRunPolicy\x12S\n\x10\x63lean_pod_policy\x18\x01 \x01(\x0e\x32).flyteidl.plugins.kubeflow.CleanPodPolicyR\x0e\x63leanPodPolicy\x12;\n\x1attl_seconds_after_finished\x18\x02 \x01(\x05R\x17ttlSecondsAfterFinished\x12\x36\n\x17\x61\x63tive_deadline_seconds\x18\x03 \x01(\x05R\x15\x61\x63tiveDeadlineSeconds\x12#\n\rbackoff_limit\x18\x04 \x01(\x05R\x0c\x62\x61\x63koffLimit*c\n\rRestartPolicy\x12\x18\n\x14RESTART_POLICY_NEVER\x10\x00\x12\x1d\n\x19RESTART_POLICY_ON_FAILURE\x10\x01\x12\x19\n\x15RESTART_POLICY_ALWAYS\x10\x02*`\n\x0e\x43leanPodPolicy\x12\x18\n\x14\x43LEANPOD_POLICY_NONE\x10\x00\x12\x1b\n\x17\x43LEANPOD_POLICY_RUNNING\x10\x01\x12\x17\n\x13\x43LEANPOD_POLICY_ALL\x10\x02\x42\xf1\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x0b\x43ommonProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::Kubeflowb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&flyteidl/plugins/kubeflow/common.proto\x12\x19\x66lyteidl.plugins.kubeflow\x1a\x1d\x66lyteidl/plugins/common.proto\"\xfa\x01\n\tRunPolicy\x12S\n\x10\x63lean_pod_policy\x18\x01 \x01(\x0e\x32).flyteidl.plugins.kubeflow.CleanPodPolicyR\x0e\x63leanPodPolicy\x12;\n\x1attl_seconds_after_finished\x18\x02 \x01(\x05R\x17ttlSecondsAfterFinished\x12\x36\n\x17\x61\x63tive_deadline_seconds\x18\x03 \x01(\x05R\x15\x61\x63tiveDeadlineSeconds\x12#\n\rbackoff_limit\x18\x04 \x01(\x05R\x0c\x62\x61\x63koffLimit*`\n\x0e\x43leanPodPolicy\x12\x18\n\x14\x43LEANPOD_POLICY_NONE\x10\x00\x12\x1b\n\x17\x43LEANPOD_POLICY_RUNNING\x10\x01\x12\x17\n\x13\x43LEANPOD_POLICY_ALL\x10\x02\x42\xfa\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x0b\x43ommonProtoP\x01ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::KubeflowP\x00\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,11 +23,9 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\013CommonProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' - _globals['_RESTARTPOLICY']._serialized_start=322 - _globals['_RESTARTPOLICY']._serialized_end=421 - _globals['_CLEANPODPOLICY']._serialized_start=423 - _globals['_CLEANPODPOLICY']._serialized_end=519 - _globals['_RUNPOLICY']._serialized_start=70 - _globals['_RUNPOLICY']._serialized_end=320 + DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\013CommonProtoP\001ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' + _globals['_CLEANPODPOLICY']._serialized_start=353 + _globals['_CLEANPODPOLICY']._serialized_end=449 + _globals['_RUNPOLICY']._serialized_start=101 + _globals['_RUNPOLICY']._serialized_end=351 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.pyi index 916c3344b2..484c1472b7 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/common_pb2.pyi @@ -1,24 +1,21 @@ +from flyteidl.plugins import common_pb2 as _common_pb2 from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union +from flyteidl.plugins.common_pb2 import CommonReplicaSpec +from flyteidl.plugins.common_pb2 import RestartPolicy DESCRIPTOR: _descriptor.FileDescriptor - -class RestartPolicy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - RESTART_POLICY_NEVER: _ClassVar[RestartPolicy] - RESTART_POLICY_ON_FAILURE: _ClassVar[RestartPolicy] - RESTART_POLICY_ALWAYS: _ClassVar[RestartPolicy] +RESTART_POLICY_NEVER: _common_pb2.RestartPolicy +RESTART_POLICY_ON_FAILURE: _common_pb2.RestartPolicy +RESTART_POLICY_ALWAYS: _common_pb2.RestartPolicy class CleanPodPolicy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] CLEANPOD_POLICY_NONE: _ClassVar[CleanPodPolicy] CLEANPOD_POLICY_RUNNING: _ClassVar[CleanPodPolicy] CLEANPOD_POLICY_ALL: _ClassVar[CleanPodPolicy] -RESTART_POLICY_NEVER: RestartPolicy -RESTART_POLICY_ON_FAILURE: RestartPolicy -RESTART_POLICY_ALWAYS: RestartPolicy CLEANPOD_POLICY_NONE: CleanPodPolicy CLEANPOD_POLICY_RUNNING: CleanPodPolicy CLEANPOD_POLICY_ALL: CleanPodPolicy diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.py b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.py index 4ed3f22be7..49078c7372 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.py @@ -13,9 +13,13 @@ from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2 from flyteidl.plugins.kubeflow import common_pb2 as flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2 +try: + flyteidl_dot_plugins_dot_common__pb2 = flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2.flyteidl_dot_plugins_dot_common__pb2 +except AttributeError: + flyteidl_dot_plugins_dot_common__pb2 = flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2.flyteidl.plugins.common_pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#flyteidl/plugins/kubeflow/mpi.proto\x12\x19\x66lyteidl.plugins.kubeflow\x1a\x19\x66lyteidl/core/tasks.proto\x1a&flyteidl/plugins/kubeflow/common.proto\"\xc9\x02\n\x1a\x44istributedMPITrainingTask\x12\x65\n\x0fworker_replicas\x18\x01 \x01(\x0b\x32<.flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpecR\x0eworkerReplicas\x12i\n\x11launcher_replicas\x18\x02 \x01(\x0b\x32<.flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpecR\x10launcherReplicas\x12\x43\n\nrun_policy\x18\x03 \x01(\x0b\x32$.flyteidl.plugins.kubeflow.RunPolicyR\trunPolicy\x12\x14\n\x05slots\x18\x04 \x01(\x05R\x05slots\"\xf8\x01\n!DistributedMPITrainingReplicaSpec\x12\x1a\n\x08replicas\x18\x01 \x01(\x05R\x08replicas\x12\x14\n\x05image\x18\x02 \x01(\tR\x05image\x12\x36\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresources\x12O\n\x0erestart_policy\x18\x04 \x01(\x0e\x32(.flyteidl.plugins.kubeflow.RestartPolicyR\rrestartPolicy\x12\x18\n\x07\x63ommand\x18\x05 \x03(\tR\x07\x63ommandB\xee\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x08MpiProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::Kubeflowb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#flyteidl/plugins/kubeflow/mpi.proto\x12\x19\x66lyteidl.plugins.kubeflow\x1a\x19\x66lyteidl/core/tasks.proto\x1a&flyteidl/plugins/kubeflow/common.proto\"\xc9\x02\n\x1a\x44istributedMPITrainingTask\x12\x65\n\x0fworker_replicas\x18\x01 \x01(\x0b\x32<.flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpecR\x0eworkerReplicas\x12i\n\x11launcher_replicas\x18\x02 \x01(\x0b\x32<.flyteidl.plugins.kubeflow.DistributedMPITrainingReplicaSpecR\x10launcherReplicas\x12\x43\n\nrun_policy\x18\x03 \x01(\x0b\x32$.flyteidl.plugins.kubeflow.RunPolicyR\trunPolicy\x12\x14\n\x05slots\x18\x04 \x01(\x05R\x05slots\"\xbc\x02\n!DistributedMPITrainingReplicaSpec\x12\x1e\n\x08replicas\x18\x01 \x01(\x05\x42\x02\x18\x01R\x08replicas\x12\x18\n\x05image\x18\x02 \x01(\tB\x02\x18\x01R\x05image\x12:\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesB\x02\x18\x01R\tresources\x12J\n\x0erestart_policy\x18\x04 \x01(\x0e\x32\x1f.flyteidl.plugins.RestartPolicyB\x02\x18\x01R\rrestartPolicy\x12\x18\n\x07\x63ommand\x18\x05 \x03(\tR\x07\x63ommand\x12;\n\x06\x63ommon\x18\x06 \x01(\x0b\x32#.flyteidl.plugins.CommonReplicaSpecR\x06\x63ommonB\xf7\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x08MpiProtoP\x01ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::Kubeflowb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,9 +27,17 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\010MpiProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' + DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\010MpiProtoP\001ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['replicas']._options = None + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['replicas']._serialized_options = b'\030\001' + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['image']._options = None + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['image']._serialized_options = b'\030\001' + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['resources']._options = None + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['resources']._serialized_options = b'\030\001' + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['restart_policy']._options = None + _DISTRIBUTEDMPITRAININGREPLICASPEC.fields_by_name['restart_policy']._serialized_options = b'\030\001' _globals['_DISTRIBUTEDMPITRAININGTASK']._serialized_start=134 _globals['_DISTRIBUTEDMPITRAININGTASK']._serialized_end=463 _globals['_DISTRIBUTEDMPITRAININGREPLICASPEC']._serialized_start=466 - _globals['_DISTRIBUTEDMPITRAININGREPLICASPEC']._serialized_end=714 + _globals['_DISTRIBUTEDMPITRAININGREPLICASPEC']._serialized_end=782 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.pyi index 6258542993..03fb4a4924 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/mpi_pb2.pyi @@ -1,5 +1,6 @@ from flyteidl.core import tasks_pb2 as _tasks_pb2 from flyteidl.plugins.kubeflow import common_pb2 as _common_pb2 +from flyteidl.plugins import common_pb2 as _common_pb2_1 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -20,15 +21,17 @@ class DistributedMPITrainingTask(_message.Message): def __init__(self, worker_replicas: _Optional[_Union[DistributedMPITrainingReplicaSpec, _Mapping]] = ..., launcher_replicas: _Optional[_Union[DistributedMPITrainingReplicaSpec, _Mapping]] = ..., run_policy: _Optional[_Union[_common_pb2.RunPolicy, _Mapping]] = ..., slots: _Optional[int] = ...) -> None: ... class DistributedMPITrainingReplicaSpec(_message.Message): - __slots__ = ["replicas", "image", "resources", "restart_policy", "command"] + __slots__ = ["replicas", "image", "resources", "restart_policy", "command", "common"] REPLICAS_FIELD_NUMBER: _ClassVar[int] IMAGE_FIELD_NUMBER: _ClassVar[int] RESOURCES_FIELD_NUMBER: _ClassVar[int] RESTART_POLICY_FIELD_NUMBER: _ClassVar[int] COMMAND_FIELD_NUMBER: _ClassVar[int] + COMMON_FIELD_NUMBER: _ClassVar[int] replicas: int image: str resources: _tasks_pb2.Resources - restart_policy: _common_pb2.RestartPolicy + restart_policy: _common_pb2_1.RestartPolicy command: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, replicas: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ..., restart_policy: _Optional[_Union[_common_pb2.RestartPolicy, str]] = ..., command: _Optional[_Iterable[str]] = ...) -> None: ... + common: _common_pb2_1.CommonReplicaSpec + def __init__(self, replicas: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ..., restart_policy: _Optional[_Union[_common_pb2_1.RestartPolicy, str]] = ..., command: _Optional[_Iterable[str]] = ..., common: _Optional[_Union[_common_pb2_1.CommonReplicaSpec, _Mapping]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.py b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.py index 46f574228a..06bf2b934b 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.py @@ -13,9 +13,13 @@ from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2 from flyteidl.plugins.kubeflow import common_pb2 as flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2 +try: + flyteidl_dot_plugins_dot_common__pb2 = flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2.flyteidl_dot_plugins_dot_common__pb2 +except AttributeError: + flyteidl_dot_plugins_dot_common__pb2 = flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2.flyteidl.plugins.common_pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'flyteidl/plugins/kubeflow/pytorch.proto\x12\x19\x66lyteidl.plugins.kubeflow\x1a\x19\x66lyteidl/core/tasks.proto\x1a&flyteidl/plugins/kubeflow/common.proto\"\xc1\x01\n\rElasticConfig\x12!\n\x0crdzv_backend\x18\x01 \x01(\tR\x0brdzvBackend\x12!\n\x0cmin_replicas\x18\x02 \x01(\x05R\x0bminReplicas\x12!\n\x0cmax_replicas\x18\x03 \x01(\x05R\x0bmaxReplicas\x12$\n\x0enproc_per_node\x18\x04 \x01(\x05R\x0cnprocPerNode\x12!\n\x0cmax_restarts\x18\x05 \x01(\x05R\x0bmaxRestarts\"\x8c\x03\n\x1e\x44istributedPyTorchTrainingTask\x12i\n\x0fworker_replicas\x18\x01 \x01(\x0b\x32@.flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpecR\x0eworkerReplicas\x12i\n\x0fmaster_replicas\x18\x02 \x01(\x0b\x32@.flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpecR\x0emasterReplicas\x12\x43\n\nrun_policy\x18\x03 \x01(\x0b\x32$.flyteidl.plugins.kubeflow.RunPolicyR\trunPolicy\x12O\n\x0e\x65lastic_config\x18\x04 \x01(\x0b\x32(.flyteidl.plugins.kubeflow.ElasticConfigR\relasticConfig\"\xe2\x01\n%DistributedPyTorchTrainingReplicaSpec\x12\x1a\n\x08replicas\x18\x01 \x01(\x05R\x08replicas\x12\x14\n\x05image\x18\x02 \x01(\tR\x05image\x12\x36\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresources\x12O\n\x0erestart_policy\x18\x04 \x01(\x0e\x32(.flyteidl.plugins.kubeflow.RestartPolicyR\rrestartPolicyB\xf2\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x0cPytorchProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::Kubeflowb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'flyteidl/plugins/kubeflow/pytorch.proto\x12\x19\x66lyteidl.plugins.kubeflow\x1a\x19\x66lyteidl/core/tasks.proto\x1a&flyteidl/plugins/kubeflow/common.proto\"\xc1\x01\n\rElasticConfig\x12!\n\x0crdzv_backend\x18\x01 \x01(\tR\x0brdzvBackend\x12!\n\x0cmin_replicas\x18\x02 \x01(\x05R\x0bminReplicas\x12!\n\x0cmax_replicas\x18\x03 \x01(\x05R\x0bmaxReplicas\x12$\n\x0enproc_per_node\x18\x04 \x01(\x05R\x0cnprocPerNode\x12!\n\x0cmax_restarts\x18\x05 \x01(\x05R\x0bmaxRestarts\"\x8c\x03\n\x1e\x44istributedPyTorchTrainingTask\x12i\n\x0fworker_replicas\x18\x01 \x01(\x0b\x32@.flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpecR\x0eworkerReplicas\x12i\n\x0fmaster_replicas\x18\x02 \x01(\x0b\x32@.flyteidl.plugins.kubeflow.DistributedPyTorchTrainingReplicaSpecR\x0emasterReplicas\x12\x43\n\nrun_policy\x18\x03 \x01(\x0b\x32$.flyteidl.plugins.kubeflow.RunPolicyR\trunPolicy\x12O\n\x0e\x65lastic_config\x18\x04 \x01(\x0b\x32(.flyteidl.plugins.kubeflow.ElasticConfigR\relasticConfig\"\xa6\x02\n%DistributedPyTorchTrainingReplicaSpec\x12\x1e\n\x08replicas\x18\x01 \x01(\x05\x42\x02\x18\x01R\x08replicas\x12\x18\n\x05image\x18\x02 \x01(\tB\x02\x18\x01R\x05image\x12:\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesB\x02\x18\x01R\tresources\x12J\n\x0erestart_policy\x18\x04 \x01(\x0e\x32\x1f.flyteidl.plugins.RestartPolicyB\x02\x18\x01R\rrestartPolicy\x12;\n\x06\x63ommon\x18\x05 \x01(\x0b\x32#.flyteidl.plugins.CommonReplicaSpecR\x06\x63ommonB\xfb\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x0cPytorchProtoP\x01ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::Kubeflowb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,11 +27,19 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\014PytorchProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' + DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\014PytorchProtoP\001ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['replicas']._options = None + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['replicas']._serialized_options = b'\030\001' + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['image']._options = None + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['image']._serialized_options = b'\030\001' + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['resources']._options = None + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['resources']._serialized_options = b'\030\001' + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['restart_policy']._options = None + _DISTRIBUTEDPYTORCHTRAININGREPLICASPEC.fields_by_name['restart_policy']._serialized_options = b'\030\001' _globals['_ELASTICCONFIG']._serialized_start=138 _globals['_ELASTICCONFIG']._serialized_end=331 _globals['_DISTRIBUTEDPYTORCHTRAININGTASK']._serialized_start=334 _globals['_DISTRIBUTEDPYTORCHTRAININGTASK']._serialized_end=730 _globals['_DISTRIBUTEDPYTORCHTRAININGREPLICASPEC']._serialized_start=733 - _globals['_DISTRIBUTEDPYTORCHTRAININGREPLICASPEC']._serialized_end=959 + _globals['_DISTRIBUTEDPYTORCHTRAININGREPLICASPEC']._serialized_end=1027 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.pyi index ee6599ad82..3c06df0964 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/pytorch_pb2.pyi @@ -1,5 +1,6 @@ from flyteidl.core import tasks_pb2 as _tasks_pb2 from flyteidl.plugins.kubeflow import common_pb2 as _common_pb2 +from flyteidl.plugins import common_pb2 as _common_pb2_1 from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union @@ -33,13 +34,15 @@ class DistributedPyTorchTrainingTask(_message.Message): def __init__(self, worker_replicas: _Optional[_Union[DistributedPyTorchTrainingReplicaSpec, _Mapping]] = ..., master_replicas: _Optional[_Union[DistributedPyTorchTrainingReplicaSpec, _Mapping]] = ..., run_policy: _Optional[_Union[_common_pb2.RunPolicy, _Mapping]] = ..., elastic_config: _Optional[_Union[ElasticConfig, _Mapping]] = ...) -> None: ... class DistributedPyTorchTrainingReplicaSpec(_message.Message): - __slots__ = ["replicas", "image", "resources", "restart_policy"] + __slots__ = ["replicas", "image", "resources", "restart_policy", "common"] REPLICAS_FIELD_NUMBER: _ClassVar[int] IMAGE_FIELD_NUMBER: _ClassVar[int] RESOURCES_FIELD_NUMBER: _ClassVar[int] RESTART_POLICY_FIELD_NUMBER: _ClassVar[int] + COMMON_FIELD_NUMBER: _ClassVar[int] replicas: int image: str resources: _tasks_pb2.Resources - restart_policy: _common_pb2.RestartPolicy - def __init__(self, replicas: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ..., restart_policy: _Optional[_Union[_common_pb2.RestartPolicy, str]] = ...) -> None: ... + restart_policy: _common_pb2_1.RestartPolicy + common: _common_pb2_1.CommonReplicaSpec + def __init__(self, replicas: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ..., restart_policy: _Optional[_Union[_common_pb2_1.RestartPolicy, str]] = ..., common: _Optional[_Union[_common_pb2_1.CommonReplicaSpec, _Mapping]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.py b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.py index f0c086f9e7..57768cd91d 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.py @@ -13,9 +13,13 @@ from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2 from flyteidl.plugins.kubeflow import common_pb2 as flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2 +try: + flyteidl_dot_plugins_dot_common__pb2 = flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2.flyteidl_dot_plugins_dot_common__pb2 +except AttributeError: + flyteidl_dot_plugins_dot_common__pb2 = flyteidl_dot_plugins_dot_kubeflow_dot_common__pb2.flyteidl.plugins.common_pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*flyteidl/plugins/kubeflow/tensorflow.proto\x12\x19\x66lyteidl.plugins.kubeflow\x1a\x19\x66lyteidl/core/tasks.proto\x1a&flyteidl/plugins/kubeflow/common.proto\"\x9c\x04\n!DistributedTensorflowTrainingTask\x12l\n\x0fworker_replicas\x18\x01 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\x0eworkerReplicas\x12\x64\n\x0bps_replicas\x18\x02 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\npsReplicas\x12j\n\x0e\x63hief_replicas\x18\x03 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\rchiefReplicas\x12\x43\n\nrun_policy\x18\x04 \x01(\x0b\x32$.flyteidl.plugins.kubeflow.RunPolicyR\trunPolicy\x12r\n\x12\x65valuator_replicas\x18\x05 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\x11\x65valuatorReplicas\"\xe5\x01\n(DistributedTensorflowTrainingReplicaSpec\x12\x1a\n\x08replicas\x18\x01 \x01(\x05R\x08replicas\x12\x14\n\x05image\x18\x02 \x01(\tR\x05image\x12\x36\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresources\x12O\n\x0erestart_policy\x18\x04 \x01(\x0e\x32(.flyteidl.plugins.kubeflow.RestartPolicyR\rrestartPolicyB\xf5\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x0fTensorflowProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::Kubeflowb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*flyteidl/plugins/kubeflow/tensorflow.proto\x12\x19\x66lyteidl.plugins.kubeflow\x1a\x19\x66lyteidl/core/tasks.proto\x1a&flyteidl/plugins/kubeflow/common.proto\"\x9c\x04\n!DistributedTensorflowTrainingTask\x12l\n\x0fworker_replicas\x18\x01 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\x0eworkerReplicas\x12\x64\n\x0bps_replicas\x18\x02 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\npsReplicas\x12j\n\x0e\x63hief_replicas\x18\x03 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\rchiefReplicas\x12\x43\n\nrun_policy\x18\x04 \x01(\x0b\x32$.flyteidl.plugins.kubeflow.RunPolicyR\trunPolicy\x12r\n\x12\x65valuator_replicas\x18\x05 \x01(\x0b\x32\x43.flyteidl.plugins.kubeflow.DistributedTensorflowTrainingReplicaSpecR\x11\x65valuatorReplicas\"\xa9\x02\n(DistributedTensorflowTrainingReplicaSpec\x12\x1e\n\x08replicas\x18\x01 \x01(\x05\x42\x02\x18\x01R\x08replicas\x12\x18\n\x05image\x18\x02 \x01(\tB\x02\x18\x01R\x05image\x12:\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesB\x02\x18\x01R\tresources\x12J\n\x0erestart_policy\x18\x04 \x01(\x0e\x32\x1f.flyteidl.plugins.RestartPolicyB\x02\x18\x01R\rrestartPolicy\x12;\n\x06\x63ommon\x18\x05 \x01(\x0b\x32#.flyteidl.plugins.CommonReplicaSpecR\x06\x63ommonB\xfe\x01\n\x1d\x63om.flyteidl.plugins.kubeflowB\x0fTensorflowProtoP\x01ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\xa2\x02\x03\x46PK\xaa\x02\x19\x46lyteidl.Plugins.Kubeflow\xca\x02\x19\x46lyteidl\\Plugins\\Kubeflow\xe2\x02%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\xea\x02\x1b\x46lyteidl::Plugins::Kubeflowb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,9 +27,17 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\017TensorflowProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' + DESCRIPTOR._serialized_options = b'\n\035com.flyteidl.plugins.kubeflowB\017TensorflowProtoP\001ZFgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow\242\002\003FPK\252\002\031Flyteidl.Plugins.Kubeflow\312\002\031Flyteidl\\Plugins\\Kubeflow\342\002%Flyteidl\\Plugins\\Kubeflow\\GPBMetadata\352\002\033Flyteidl::Plugins::Kubeflow' + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['replicas']._options = None + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['replicas']._serialized_options = b'\030\001' + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['image']._options = None + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['image']._serialized_options = b'\030\001' + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['resources']._options = None + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['resources']._serialized_options = b'\030\001' + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['restart_policy']._options = None + _DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC.fields_by_name['restart_policy']._serialized_options = b'\030\001' _globals['_DISTRIBUTEDTENSORFLOWTRAININGTASK']._serialized_start=141 _globals['_DISTRIBUTEDTENSORFLOWTRAININGTASK']._serialized_end=681 _globals['_DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC']._serialized_start=684 - _globals['_DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC']._serialized_end=913 + _globals['_DISTRIBUTEDTENSORFLOWTRAININGREPLICASPEC']._serialized_end=981 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.pyi index 4a999f70e8..44e492b624 100644 --- a/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/plugins/kubeflow/tensorflow_pb2.pyi @@ -1,5 +1,6 @@ from flyteidl.core import tasks_pb2 as _tasks_pb2 from flyteidl.plugins.kubeflow import common_pb2 as _common_pb2 +from flyteidl.plugins import common_pb2 as _common_pb2_1 from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union @@ -21,13 +22,15 @@ class DistributedTensorflowTrainingTask(_message.Message): def __init__(self, worker_replicas: _Optional[_Union[DistributedTensorflowTrainingReplicaSpec, _Mapping]] = ..., ps_replicas: _Optional[_Union[DistributedTensorflowTrainingReplicaSpec, _Mapping]] = ..., chief_replicas: _Optional[_Union[DistributedTensorflowTrainingReplicaSpec, _Mapping]] = ..., run_policy: _Optional[_Union[_common_pb2.RunPolicy, _Mapping]] = ..., evaluator_replicas: _Optional[_Union[DistributedTensorflowTrainingReplicaSpec, _Mapping]] = ...) -> None: ... class DistributedTensorflowTrainingReplicaSpec(_message.Message): - __slots__ = ["replicas", "image", "resources", "restart_policy"] + __slots__ = ["replicas", "image", "resources", "restart_policy", "common"] REPLICAS_FIELD_NUMBER: _ClassVar[int] IMAGE_FIELD_NUMBER: _ClassVar[int] RESOURCES_FIELD_NUMBER: _ClassVar[int] RESTART_POLICY_FIELD_NUMBER: _ClassVar[int] + COMMON_FIELD_NUMBER: _ClassVar[int] replicas: int image: str resources: _tasks_pb2.Resources - restart_policy: _common_pb2.RestartPolicy - def __init__(self, replicas: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ..., restart_policy: _Optional[_Union[_common_pb2.RestartPolicy, str]] = ...) -> None: ... + restart_policy: _common_pb2_1.RestartPolicy + common: _common_pb2_1.CommonReplicaSpec + def __init__(self, replicas: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ..., restart_policy: _Optional[_Union[_common_pb2_1.RestartPolicy, str]] = ..., common: _Optional[_Union[_common_pb2_1.CommonReplicaSpec, _Mapping]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_rust/flyteidl.plugins.kubeflow.rs b/flyteidl/gen/pb_rust/flyteidl.plugins.kubeflow.rs index 96d46653da..9eebb7bc9e 100644 --- a/flyteidl/gen/pb_rust/flyteidl.plugins.kubeflow.rs +++ b/flyteidl/gen/pb_rust/flyteidl.plugins.kubeflow.rs @@ -18,35 +18,6 @@ pub struct RunPolicy { } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] -pub enum RestartPolicy { - Never = 0, - OnFailure = 1, - Always = 2, -} -impl RestartPolicy { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - RestartPolicy::Never => "RESTART_POLICY_NEVER", - RestartPolicy::OnFailure => "RESTART_POLICY_ON_FAILURE", - RestartPolicy::Always => "RESTART_POLICY_ALWAYS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RESTART_POLICY_NEVER" => Some(Self::Never), - "RESTART_POLICY_ON_FAILURE" => Some(Self::OnFailure), - "RESTART_POLICY_ALWAYS" => Some(Self::Always), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] pub enum CleanPodPolicy { CleanpodPolicyNone = 0, CleanpodPolicyRunning = 1, @@ -97,21 +68,29 @@ pub struct DistributedMpiTrainingTask { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DistributedMpiTrainingReplicaSpec { + /// 1~4 deprecated. Use common instead. /// Number of replicas + #[deprecated] #[prost(int32, tag="1")] pub replicas: i32, /// Image used for the replica group + #[deprecated] #[prost(string, tag="2")] pub image: ::prost::alloc::string::String, /// Resources required for the replica group + #[deprecated] #[prost(message, optional, tag="3")] pub resources: ::core::option::Option, /// Restart policy determines whether pods will be restarted when they exit - #[prost(enumeration="RestartPolicy", tag="4")] + #[deprecated] + #[prost(enumeration="super::RestartPolicy", tag="4")] pub restart_policy: i32, /// MPI sometimes requires different command set for different replica groups #[prost(string, repeated, tag="5")] pub command: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// The common replica spec + #[prost(message, optional, tag="6")] + pub common: ::core::option::Option, } /// Custom proto for torch elastic config for distributed training using /// @@ -151,18 +130,26 @@ pub struct DistributedPyTorchTrainingTask { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DistributedPyTorchTrainingReplicaSpec { + /// 1~4 deprecated. Use common instead. /// Number of replicas + #[deprecated] #[prost(int32, tag="1")] pub replicas: i32, /// Image used for the replica group + #[deprecated] #[prost(string, tag="2")] pub image: ::prost::alloc::string::String, /// Resources required for the replica group + #[deprecated] #[prost(message, optional, tag="3")] pub resources: ::core::option::Option, - /// RestartPolicy determines whether pods will be restarted when they exit - #[prost(enumeration="RestartPolicy", tag="4")] + /// Restart policy determines whether pods will be restarted when they exit + #[deprecated] + #[prost(enumeration="super::RestartPolicy", tag="4")] pub restart_policy: i32, + /// The common replica spec + #[prost(message, optional, tag="5")] + pub common: ::core::option::Option, } /// Proto for plugin that enables distributed training using #[allow(clippy::derive_partial_eq_without_eq)] @@ -189,17 +176,25 @@ pub struct DistributedTensorflowTrainingTask { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DistributedTensorflowTrainingReplicaSpec { + /// 1~4 deprecated. Use common instead. /// Number of replicas + #[deprecated] #[prost(int32, tag="1")] pub replicas: i32, /// Image used for the replica group + #[deprecated] #[prost(string, tag="2")] pub image: ::prost::alloc::string::String, /// Resources required for the replica group + #[deprecated] #[prost(message, optional, tag="3")] pub resources: ::core::option::Option, - /// RestartPolicy Determines whether pods will be restarted when they exit - #[prost(enumeration="RestartPolicy", tag="4")] + /// Restart policy determines whether pods will be restarted when they exit + #[deprecated] + #[prost(enumeration="super::RestartPolicy", tag="4")] pub restart_policy: i32, + /// The common replica spec + #[prost(message, optional, tag="5")] + pub common: ::core::option::Option, } // @@protoc_insertion_point(module) diff --git a/flyteidl/gen/pb_rust/flyteidl.plugins.rs b/flyteidl/gen/pb_rust/flyteidl.plugins.rs index 0903d1c71a..28c2f77e97 100644 --- a/flyteidl/gen/pb_rust/flyteidl.plugins.rs +++ b/flyteidl/gen/pb_rust/flyteidl.plugins.rs @@ -33,6 +33,51 @@ pub mod array_job { MinSuccessRatio(f32), } } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CommonReplicaSpec { + /// Number of replicas + #[prost(int32, tag="1")] + pub replicas: i32, + /// Image used for the replica group + #[prost(string, tag="2")] + pub image: ::prost::alloc::string::String, + /// Resources required for the replica group + #[prost(message, optional, tag="3")] + pub resources: ::core::option::Option, + /// RestartPolicy determines whether pods will be restarted when they exit + #[prost(enumeration="RestartPolicy", tag="4")] + pub restart_policy: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum RestartPolicy { + Never = 0, + OnFailure = 1, + Always = 2, +} +impl RestartPolicy { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RestartPolicy::Never => "RESTART_POLICY_NEVER", + RestartPolicy::OnFailure => "RESTART_POLICY_ON_FAILURE", + RestartPolicy::Always => "RESTART_POLICY_ALWAYS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RESTART_POLICY_NEVER" => Some(Self::Never), + "RESTART_POLICY_ON_FAILURE" => Some(Self::OnFailure), + "RESTART_POLICY_ALWAYS" => Some(Self::Always), + _ => None, + } + } +} /// Custom Proto for Dask Plugin. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/flyteidl/protos/flyteidl/plugins/common.proto b/flyteidl/protos/flyteidl/plugins/common.proto new file mode 100644 index 0000000000..15f31cf2d2 --- /dev/null +++ b/flyteidl/protos/flyteidl/plugins/common.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package flyteidl.plugins; + +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"; + +import "flyteidl/core/tasks.proto"; + +enum RestartPolicy { + RESTART_POLICY_NEVER = 0; + RESTART_POLICY_ON_FAILURE = 1; + RESTART_POLICY_ALWAYS = 2; +} + +message CommonReplicaSpec { + // Number of replicas + int32 replicas = 1; + + // Image used for the replica group + string image = 2; + + // Resources required for the replica group + core.Resources resources = 3; + + // RestartPolicy determines whether pods will be restarted when they exit + RestartPolicy restart_policy = 4; +} diff --git a/flyteidl/protos/flyteidl/plugins/kubeflow/common.proto b/flyteidl/protos/flyteidl/plugins/kubeflow/common.proto index 6795dca11b..37655caf3d 100644 --- a/flyteidl/protos/flyteidl/plugins/kubeflow/common.proto +++ b/flyteidl/protos/flyteidl/plugins/kubeflow/common.proto @@ -2,14 +2,9 @@ syntax = "proto3"; package flyteidl.plugins.kubeflow; -option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"; +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow"; - -enum RestartPolicy { - RESTART_POLICY_NEVER = 0; - RESTART_POLICY_ON_FAILURE = 1; - RESTART_POLICY_ALWAYS = 2; -} +import public "flyteidl/plugins/common.proto"; enum CleanPodPolicy { CLEANPOD_POLICY_NONE = 0; @@ -30,4 +25,4 @@ message RunPolicy { // Number of retries before marking this job failed. int32 backoff_limit = 4; -} \ No newline at end of file +} diff --git a/flyteidl/protos/flyteidl/plugins/kubeflow/mpi.proto b/flyteidl/protos/flyteidl/plugins/kubeflow/mpi.proto index 6eda161f92..b98e8aad99 100644 --- a/flyteidl/protos/flyteidl/plugins/kubeflow/mpi.proto +++ b/flyteidl/protos/flyteidl/plugins/kubeflow/mpi.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package flyteidl.plugins.kubeflow; -option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"; +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow"; import "flyteidl/core/tasks.proto"; import "flyteidl/plugins/kubeflow/common.proto"; @@ -26,18 +26,22 @@ message DistributedMPITrainingTask { // Replica specification for distributed MPI training message DistributedMPITrainingReplicaSpec { + // 1~4 deprecated. Use common instead. // Number of replicas - int32 replicas = 1; + int32 replicas = 1 [deprecated = true]; // Image used for the replica group - string image = 2; + string image = 2 [deprecated = true]; // Resources required for the replica group - core.Resources resources = 3; - + core.Resources resources = 3 [deprecated = true]; + // Restart policy determines whether pods will be restarted when they exit - RestartPolicy restart_policy = 4; + RestartPolicy restart_policy = 4 [deprecated = true]; // MPI sometimes requires different command set for different replica groups repeated string command = 5; -} \ No newline at end of file + + // The common replica spec + CommonReplicaSpec common = 6; +} diff --git a/flyteidl/protos/flyteidl/plugins/kubeflow/pytorch.proto b/flyteidl/protos/flyteidl/plugins/kubeflow/pytorch.proto index bd3ddbdf97..0433384e75 100644 --- a/flyteidl/protos/flyteidl/plugins/kubeflow/pytorch.proto +++ b/flyteidl/protos/flyteidl/plugins/kubeflow/pytorch.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package flyteidl.plugins.kubeflow; -option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"; +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow"; import "flyteidl/core/tasks.proto"; import "flyteidl/plugins/kubeflow/common.proto"; @@ -35,15 +35,19 @@ message DistributedPyTorchTrainingTask { } message DistributedPyTorchTrainingReplicaSpec { + // 1~4 deprecated. Use common instead. // Number of replicas - int32 replicas = 1; + int32 replicas = 1 [deprecated = true]; // Image used for the replica group - string image = 2; + string image = 2 [deprecated = true]; // Resources required for the replica group - core.Resources resources = 3; - - // RestartPolicy determines whether pods will be restarted when they exit - RestartPolicy restart_policy = 4; + core.Resources resources = 3 [deprecated = true]; + + // Restart policy determines whether pods will be restarted when they exit + RestartPolicy restart_policy = 4 [deprecated = true]; + + // The common replica spec + CommonReplicaSpec common = 5; } diff --git a/flyteidl/protos/flyteidl/plugins/kubeflow/tensorflow.proto b/flyteidl/protos/flyteidl/plugins/kubeflow/tensorflow.proto index 789666b989..251526f7e0 100644 --- a/flyteidl/protos/flyteidl/plugins/kubeflow/tensorflow.proto +++ b/flyteidl/protos/flyteidl/plugins/kubeflow/tensorflow.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package flyteidl.plugins.kubeflow; -option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"; +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins/kubeflow"; import "flyteidl/core/tasks.proto"; import "flyteidl/plugins/kubeflow/common.proto"; @@ -28,15 +28,19 @@ message DistributedTensorflowTrainingTask { } message DistributedTensorflowTrainingReplicaSpec { + // 1~4 deprecated. Use common instead. // Number of replicas - int32 replicas = 1; + int32 replicas = 1 [deprecated = true]; // Image used for the replica group - string image = 2; + string image = 2 [deprecated = true]; // Resources required for the replica group - core.Resources resources = 3; + core.Resources resources = 3 [deprecated = true]; - // RestartPolicy Determines whether pods will be restarted when they exit - RestartPolicy restart_policy = 4; + // Restart policy determines whether pods will be restarted when they exit + RestartPolicy restart_policy = 4 [deprecated = true]; + + // The common replica spec + CommonReplicaSpec common = 5; } diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go index 7e4b32e25e..9d2e4a5aec 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go @@ -294,6 +294,7 @@ type kfDistributedReplicaSpec interface { GetImage() string GetResources() *core.Resources GetRestartPolicy() kfplugins.RestartPolicy + GetCommon() *kfplugins.CommonReplicaSpec } type allowsCommandOverride interface { @@ -301,9 +302,29 @@ type allowsCommandOverride interface { } func ToReplicaSpecWithOverrides(ctx context.Context, taskCtx pluginsCore.TaskExecutionContext, rs kfDistributedReplicaSpec, primaryContainerName string, isMaster bool) (*commonOp.ReplicaSpec, error) { + var replicas int32 + var image string + var resources *core.Resources + var restartPolicy kfplugins.RestartPolicy + + // replicas, image, resources, restartPolicy are deprecated since the common replica spec is introduced. + // Therefore, if the common replica spec is set, use that to get the common fields + common := rs.GetCommon() + if common != nil { + replicas = common.GetReplicas() + image = common.GetImage() + resources = common.GetResources() + restartPolicy = common.GetRestartPolicy() + } else { + replicas = rs.GetReplicas() + image = rs.GetImage() + resources = rs.GetResources() + restartPolicy = rs.GetRestartPolicy() + } + taskCtxOptions := []flytek8s.PluginTaskExecutionContextOption{} - if rs != nil && rs.GetResources() != nil { - resources, err := flytek8s.ToK8sResourceRequirements(rs.GetResources()) + if resources != nil { + resources, err := flytek8s.ToK8sResourceRequirements(resources) if err != nil { return nil, flyteerr.Errorf(flyteerr.BadTaskSpecification, "invalid TaskSpecification on Resources [%v], Err: [%v]", resources, err.Error()) } @@ -321,26 +342,23 @@ func ToReplicaSpecWithOverrides(ctx context.Context, taskCtx pluginsCore.TaskExe replicaSpec.Replicas = &replicas } - if rs != nil { - var command []string - if v, ok := rs.(allowsCommandOverride); ok { - command = v.GetCommand() - } - if err := OverrideContainerSpec( - &replicaSpec.Template.Spec, - primaryContainerName, - rs.GetImage(), - command, - ); err != nil { - return nil, err - } + var command []string + if v, ok := rs.(allowsCommandOverride); ok { + command = v.GetCommand() + } + if err := OverrideContainerSpec( + &replicaSpec.Template.Spec, + primaryContainerName, + image, + command, + ); err != nil { + return nil, err + } - replicaSpec.RestartPolicy = ParseRestartPolicy(rs.GetRestartPolicy()) + replicaSpec.RestartPolicy = ParseRestartPolicy(restartPolicy) - if !isMaster { - replicas := rs.GetReplicas() - replicaSpec.Replicas = &replicas - } + if !isMaster { + replicaSpec.Replicas = &replicas } return replicaSpec, nil diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go index 3c823510ac..900091f78a 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go @@ -594,129 +594,191 @@ func TestReplicaCounts(t *testing.T) { func TestBuildResourceMPIV1(t *testing.T) { launcherCommand := []string{"python", "launcher.py"} workerCommand := []string{"/usr/sbin/sshd", "/.sshd_config"} - taskConfig := &kfplugins.DistributedMPITrainingTask{ - LauncherReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ - Image: testImage, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "250Mi"}, + taskConfigs := []*kfplugins.DistributedMPITrainingTask{ + { + LauncherReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Image: testImage, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "500Mi"}, + Command: launcherCommand, + }, + WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, + Command: workerCommand, }, - Command: launcherCommand, + Slots: int32(1), }, - WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, + { + LauncherReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Image: testImage, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + Command: launcherCommand, + }, + WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, }, + Command: workerCommand, }, - Command: workerCommand, + Slots: int32(1), }, - Slots: int32(1), } - launcherResourceRequirements := &corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("250m"), - corev1.ResourceMemory: resource.MustParse("250Mi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("500Mi"), - }, - } + for _, taskConfig := range taskConfigs { + launcherResourceRequirements := &corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("250m"), + corev1.ResourceMemory: resource.MustParse("250Mi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("500Mi"), + }, + } - workerResourceRequirements := &corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1024m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2048m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), - }, - } + workerResourceRequirements := &corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1024m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2048m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, + } - mpiResourceHandler := mpiOperatorResourceHandler{} + mpiResourceHandler := mpiOperatorResourceHandler{} - taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) - taskTemplate.TaskTypeVersion = 1 + taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) + taskTemplate.TaskTypeVersion = 1 - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) - assert.NoError(t, err) - assert.NotNil(t, resource) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + assert.NoError(t, err) + assert.NotNil(t, resource) - mpiJob, ok := resource.(*kubeflowv1.MPIJob) - assert.True(t, ok) - assert.Equal(t, int32(1), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Replicas) - assert.Equal(t, int32(100), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Replicas) - assert.Equal(t, int32(1), *mpiJob.Spec.SlotsPerWorker) - assert.Equal(t, *launcherResourceRequirements, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Containers[0].Resources) - assert.Equal(t, *workerResourceRequirements, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) - assert.Equal(t, launcherCommand, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Containers[0].Args) - assert.Equal(t, workerCommand, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Args) + mpiJob, ok := resource.(*kubeflowv1.MPIJob) + assert.True(t, ok) + assert.Equal(t, int32(1), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Replicas) + assert.Equal(t, int32(100), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Replicas) + assert.Equal(t, int32(1), *mpiJob.Spec.SlotsPerWorker) + assert.Equal(t, *launcherResourceRequirements, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Containers[0].Resources) + assert.Equal(t, *workerResourceRequirements, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) + assert.Equal(t, launcherCommand, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Containers[0].Args) + assert.Equal(t, workerCommand, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Args) + } } func TestBuildResourceMPIV1WithOnlyWorkerReplica(t *testing.T) { workerCommand := []string{"/usr/sbin/sshd", "/.sshd_config"} - taskConfig := &kfplugins.DistributedMPITrainingTask{ - WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, + taskConfigs := []*kfplugins.DistributedMPITrainingTask{ + { + WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + Command: []string{"/usr/sbin/sshd", "/.sshd_config"}, + }, + Slots: int32(1), + }, + { + WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, }, + Command: []string{"/usr/sbin/sshd", "/.sshd_config"}, }, - Command: []string{"/usr/sbin/sshd", "/.sshd_config"}, + Slots: int32(1), }, - Slots: int32(1), } - workerResourceRequirements := &corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1024m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2048m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), - }, - } + for _, taskConfig := range taskConfigs { + workerResourceRequirements := &corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1024m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2048m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, + } - mpiResourceHandler := mpiOperatorResourceHandler{} + mpiResourceHandler := mpiOperatorResourceHandler{} - taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) - taskTemplate.TaskTypeVersion = 1 + taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) + taskTemplate.TaskTypeVersion = 1 - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) - assert.NoError(t, err) - assert.NotNil(t, resource) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + assert.NoError(t, err) + assert.NotNil(t, resource) - mpiJob, ok := resource.(*kubeflowv1.MPIJob) - assert.True(t, ok) - assert.Equal(t, int32(1), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Replicas) - assert.Equal(t, int32(100), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Replicas) - assert.Equal(t, int32(1), *mpiJob.Spec.SlotsPerWorker) - assert.Equal(t, *workerResourceRequirements, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) - assert.Equal(t, testArgs, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Containers[0].Args) - assert.Equal(t, workerCommand, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Args) + mpiJob, ok := resource.(*kubeflowv1.MPIJob) + assert.True(t, ok) + assert.Equal(t, int32(1), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Replicas) + assert.Equal(t, int32(100), *mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Replicas) + assert.Equal(t, int32(1), *mpiJob.Spec.SlotsPerWorker) + assert.Equal(t, *workerResourceRequirements, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) + assert.Equal(t, testArgs, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Containers[0].Args) + assert.Equal(t, workerCommand, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Containers[0].Args) + } } func TestBuildResourceMPIV1ResourceTolerations(t *testing.T) { @@ -733,50 +795,87 @@ func TestBuildResourceMPIV1ResourceTolerations(t *testing.T) { }, })) - taskConfig := &kfplugins.DistributedMPITrainingTask{ - LauncherReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "250Mi"}, + taskConfigs := []*kfplugins.DistributedMPITrainingTask{ + { + LauncherReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, + WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, }, }, }, - WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + { + LauncherReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + }, + WorkerReplicas: &kfplugins.DistributedMPITrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + }, }, }, }, } - mpiResourceHandler := mpiOperatorResourceHandler{} + for _, taskConfig := range taskConfigs { + mpiResourceHandler := mpiOperatorResourceHandler{} - taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) - taskTemplate.TaskTypeVersion = 1 + taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) + taskTemplate.TaskTypeVersion = 1 - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) - assert.NoError(t, err) - assert.NotNil(t, resource) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + assert.NoError(t, err) + assert.NotNil(t, resource) - mpiJob, ok := resource.(*kubeflowv1.MPIJob) - assert.True(t, ok) + mpiJob, ok := resource.(*kubeflowv1.MPIJob) + assert.True(t, ok) - assert.NotContains(t, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Tolerations, gpuToleration) - assert.Contains(t, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Tolerations, gpuToleration) + assert.NotContains(t, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeLauncher].Template.Spec.Tolerations, gpuToleration) + assert.Contains(t, mpiJob.Spec.MPIReplicaSpecs[kubeflowv1.MPIJobReplicaTypeWorker].Template.Spec.Tolerations, gpuToleration) + } } func TestGetReplicaCount(t *testing.T) { diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go index aea096e4ba..f40f80e1f7 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go @@ -727,187 +727,264 @@ func TestReplicaCounts(t *testing.T) { } func TestBuildResourcePytorchV1(t *testing.T) { - taskConfig := &kfplugins.DistributedPyTorchTrainingTask{ - MasterReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Image: testImageMaster, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "250Mi"}, + taskConfigs := []*kfplugins.DistributedPyTorchTrainingTask{ + { + MasterReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Image: testImageMaster, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "500Mi"}, + RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, + }, + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, }, - RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, }, - WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, + { + MasterReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Image: testImageMaster, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, + }, + RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, }, }, }, } - masterResourceRequirements := &corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("250m"), - corev1.ResourceMemory: resource.MustParse("250Mi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("500Mi"), - }, - } + for _, taskConfig := range taskConfigs { + masterResourceRequirements := &corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("250m"), + corev1.ResourceMemory: resource.MustParse("250Mi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("500Mi"), + }, + } - workerResourceRequirements := &corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1024m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2048m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), - }, - } + workerResourceRequirements := &corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1024m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2048m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, + } - pytorchResourceHandler := pytorchOperatorResourceHandler{} + pytorchResourceHandler := pytorchOperatorResourceHandler{} - taskTemplate := dummyPytorchTaskTemplate("job4", taskConfig) - taskTemplate.TaskTypeVersion = 1 + taskTemplate := dummyPytorchTaskTemplate("job4", taskConfig) + taskTemplate.TaskTypeVersion = 1 - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) - assert.NoError(t, err) - assert.NotNil(t, res) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + assert.NoError(t, err) + assert.NotNil(t, res) - pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) - assert.True(t, ok) + pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) + assert.True(t, ok) - assert.Equal(t, int32(100), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) - assert.Equal(t, int32(1), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Replicas) + assert.Equal(t, int32(100), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) + assert.Equal(t, int32(1), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Replicas) - assert.Equal(t, testImageMaster, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Image) - assert.Equal(t, testImage, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Image) + assert.Equal(t, testImageMaster, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Image) + assert.Equal(t, testImage, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Image) - assert.Equal(t, *masterResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Resources) - assert.Equal(t, *workerResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) + assert.Equal(t, *masterResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Resources) + assert.Equal(t, *workerResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) - assert.Equal(t, commonOp.RestartPolicyAlways, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].RestartPolicy) - assert.Equal(t, commonOp.RestartPolicyNever, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].RestartPolicy) + assert.Equal(t, commonOp.RestartPolicyAlways, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].RestartPolicy) + assert.Equal(t, commonOp.RestartPolicyNever, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].RestartPolicy) - assert.Nil(t, pytorchJob.Spec.RunPolicy.CleanPodPolicy) - assert.Nil(t, pytorchJob.Spec.RunPolicy.BackoffLimit) - assert.Nil(t, pytorchJob.Spec.RunPolicy.TTLSecondsAfterFinished) - assert.Nil(t, pytorchJob.Spec.RunPolicy.ActiveDeadlineSeconds) + assert.Nil(t, pytorchJob.Spec.RunPolicy.CleanPodPolicy) + assert.Nil(t, pytorchJob.Spec.RunPolicy.BackoffLimit) + assert.Nil(t, pytorchJob.Spec.RunPolicy.TTLSecondsAfterFinished) + assert.Nil(t, pytorchJob.Spec.RunPolicy.ActiveDeadlineSeconds) - assert.Nil(t, pytorchJob.Spec.ElasticPolicy) + assert.Nil(t, pytorchJob.Spec.ElasticPolicy) + } } func TestBuildResourcePytorchV1WithRunPolicy(t *testing.T) { - taskConfig := &kfplugins.DistributedPyTorchTrainingTask{ - WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Replicas: 100, + taskConfigs := []*kfplugins.DistributedPyTorchTrainingTask{ + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Replicas: 100, + }, + RunPolicy: &kfplugins.RunPolicy{ + CleanPodPolicy: kfplugins.CleanPodPolicy_CLEANPOD_POLICY_ALL, + BackoffLimit: 100, + ActiveDeadlineSeconds: 1000, + TtlSecondsAfterFinished: 10000, + }, }, - RunPolicy: &kfplugins.RunPolicy{ - CleanPodPolicy: kfplugins.CleanPodPolicy_CLEANPOD_POLICY_ALL, - BackoffLimit: 100, - ActiveDeadlineSeconds: 1000, - TtlSecondsAfterFinished: 10000, + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + }, + }, + RunPolicy: &kfplugins.RunPolicy{ + CleanPodPolicy: kfplugins.CleanPodPolicy_CLEANPOD_POLICY_ALL, + BackoffLimit: 100, + ActiveDeadlineSeconds: 1000, + TtlSecondsAfterFinished: 10000, + }, }, } - pytorchResourceHandler := pytorchOperatorResourceHandler{} - taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) - taskTemplate.TaskTypeVersion = 1 + for _, taskConfig := range taskConfigs { + pytorchResourceHandler := pytorchOperatorResourceHandler{} - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) - assert.NoError(t, err) - assert.NotNil(t, res) + taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) + taskTemplate.TaskTypeVersion = 1 - pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) - assert.True(t, ok) - assert.Equal(t, int32(100), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) - assert.Equal(t, int32(1), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Replicas) - assert.Equal(t, commonOp.CleanPodPolicyAll, *pytorchJob.Spec.RunPolicy.CleanPodPolicy) - assert.Equal(t, int32(100), *pytorchJob.Spec.RunPolicy.BackoffLimit) - assert.Equal(t, int64(1000), *pytorchJob.Spec.RunPolicy.ActiveDeadlineSeconds) - assert.Equal(t, int32(10000), *pytorchJob.Spec.RunPolicy.TTLSecondsAfterFinished) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + assert.NoError(t, err) + assert.NotNil(t, res) + + pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) + assert.True(t, ok) + assert.Equal(t, int32(100), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) + assert.Equal(t, int32(1), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Replicas) + assert.Equal(t, commonOp.CleanPodPolicyAll, *pytorchJob.Spec.RunPolicy.CleanPodPolicy) + assert.Equal(t, int32(100), *pytorchJob.Spec.RunPolicy.BackoffLimit) + assert.Equal(t, int64(1000), *pytorchJob.Spec.RunPolicy.ActiveDeadlineSeconds) + assert.Equal(t, int32(10000), *pytorchJob.Spec.RunPolicy.TTLSecondsAfterFinished) + } } func TestBuildResourcePytorchV1WithOnlyWorkerSpec(t *testing.T) { - taskConfig := &kfplugins.DistributedPyTorchTrainingTask{ - WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, - }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + taskConfigs := []*kfplugins.DistributedPyTorchTrainingTask{ + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, }, }, - } - // Master Replica should use resource from task override if not set - taskOverrideResourceRequirements := &corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1000m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), - }, - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("100m"), - corev1.ResourceMemory: resource.MustParse("512Mi"), - flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, + }, + }, }, } - workerResourceRequirements := &corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1024m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2048m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), - }, - } + for _, taskConfig := range taskConfigs { + // Master Replica should use resource from task override if not set + taskOverrideResourceRequirements := &corev1.ResourceRequirements{ + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1000m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + }, + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("100m"), + corev1.ResourceMemory: resource.MustParse("512Mi"), + flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + }, + } - pytorchResourceHandler := pytorchOperatorResourceHandler{} + workerResourceRequirements := &corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1024m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2048m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, + } - taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) - taskTemplate.TaskTypeVersion = 1 + pytorchResourceHandler := pytorchOperatorResourceHandler{} - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) - assert.NoError(t, err) - assert.NotNil(t, res) + taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) + taskTemplate.TaskTypeVersion = 1 - pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) - assert.True(t, ok) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + assert.NoError(t, err) + assert.NotNil(t, res) - assert.Equal(t, int32(100), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) - assert.Equal(t, int32(1), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Replicas) + pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) + assert.True(t, ok) - assert.Equal(t, testImage, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Image) - assert.Equal(t, testImage, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Image) + assert.Equal(t, int32(100), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) + assert.Equal(t, int32(1), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Replicas) - assert.Equal(t, *taskOverrideResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Resources) - assert.Equal(t, *workerResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) + assert.Equal(t, testImage, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Image) + assert.Equal(t, testImage, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Image) - assert.Equal(t, commonOp.RestartPolicyNever, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].RestartPolicy) - assert.Equal(t, commonOp.RestartPolicyNever, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].RestartPolicy) + assert.Equal(t, *taskOverrideResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Resources) + assert.Equal(t, *workerResourceRequirements, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Resources) - assert.Nil(t, pytorchJob.Spec.ElasticPolicy) + assert.Equal(t, commonOp.RestartPolicyNever, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].RestartPolicy) + assert.Equal(t, commonOp.RestartPolicyNever, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].RestartPolicy) + + assert.Nil(t, pytorchJob.Spec.ElasticPolicy) + } } func TestBuildResourcePytorchV1ResourceTolerations(t *testing.T) { @@ -924,101 +1001,164 @@ func TestBuildResourcePytorchV1ResourceTolerations(t *testing.T) { }, })) - taskConfig := &kfplugins.DistributedPyTorchTrainingTask{ - MasterReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "250Mi"}, + taskConfigs := []*kfplugins.DistributedPyTorchTrainingTask{ + { + MasterReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, }, }, }, - WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + { + MasterReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "250Mi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "500Mi"}, + }, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + }, + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + }, }, }, }, } - pytorchResourceHandler := pytorchOperatorResourceHandler{} + for _, taskConfig := range taskConfigs { + pytorchResourceHandler := pytorchOperatorResourceHandler{} - taskTemplate := dummyPytorchTaskTemplate("job4", taskConfig) - taskTemplate.TaskTypeVersion = 1 + taskTemplate := dummyPytorchTaskTemplate("job4", taskConfig) + taskTemplate.TaskTypeVersion = 1 - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) - assert.NoError(t, err) - assert.NotNil(t, res) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + assert.NoError(t, err) + assert.NotNil(t, res) - pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) - assert.True(t, ok) + pytorchJob, ok := res.(*kubeflowv1.PyTorchJob) + assert.True(t, ok) - assert.NotContains(t, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Tolerations, gpuToleration) - assert.Contains(t, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Tolerations, gpuToleration) + assert.NotContains(t, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeMaster].Template.Spec.Tolerations, gpuToleration) + assert.Contains(t, pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Tolerations, gpuToleration) + } } func TestBuildResourcePytorchV1WithElastic(t *testing.T) { - taskConfig := &kfplugins.DistributedPyTorchTrainingTask{ - WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Replicas: 2, + taskConfigs := []*kfplugins.DistributedPyTorchTrainingTask{ + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Replicas: 2, + }, + ElasticConfig: &kfplugins.ElasticConfig{MinReplicas: 1, MaxReplicas: 2, NprocPerNode: 4, RdzvBackend: "c10d"}, + }, + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 2, + }, + }, + ElasticConfig: &kfplugins.ElasticConfig{MinReplicas: 1, MaxReplicas: 2, NprocPerNode: 4, RdzvBackend: "c10d"}, }, - ElasticConfig: &kfplugins.ElasticConfig{MinReplicas: 1, MaxReplicas: 2, NprocPerNode: 4, RdzvBackend: "c10d"}, } - taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) - taskTemplate.TaskTypeVersion = 1 - pytorchResourceHandler := pytorchOperatorResourceHandler{} - resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) - assert.NoError(t, err) - assert.NotNil(t, resource) + for _, taskConfig := range taskConfigs { + taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) + taskTemplate.TaskTypeVersion = 1 - pytorchJob, ok := resource.(*kubeflowv1.PyTorchJob) - assert.True(t, ok) - assert.Equal(t, int32(2), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) - assert.NotNil(t, pytorchJob.Spec.ElasticPolicy) - assert.Equal(t, int32(1), *pytorchJob.Spec.ElasticPolicy.MinReplicas) - assert.Equal(t, int32(2), *pytorchJob.Spec.ElasticPolicy.MaxReplicas) - assert.Equal(t, int32(4), *pytorchJob.Spec.ElasticPolicy.NProcPerNode) - assert.Equal(t, kubeflowv1.RDZVBackend("c10d"), *pytorchJob.Spec.ElasticPolicy.RDZVBackend) + pytorchResourceHandler := pytorchOperatorResourceHandler{} + resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + assert.NoError(t, err) + assert.NotNil(t, resource) - assert.Equal(t, 1, len(pytorchJob.Spec.PyTorchReplicaSpecs)) - assert.Contains(t, pytorchJob.Spec.PyTorchReplicaSpecs, kubeflowv1.PyTorchJobReplicaTypeWorker) + pytorchJob, ok := resource.(*kubeflowv1.PyTorchJob) + assert.True(t, ok) + assert.Equal(t, int32(2), *pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Replicas) + assert.NotNil(t, pytorchJob.Spec.ElasticPolicy) + assert.Equal(t, int32(1), *pytorchJob.Spec.ElasticPolicy.MinReplicas) + assert.Equal(t, int32(2), *pytorchJob.Spec.ElasticPolicy.MaxReplicas) + assert.Equal(t, int32(4), *pytorchJob.Spec.ElasticPolicy.NProcPerNode) + assert.Equal(t, kubeflowv1.RDZVBackend("c10d"), *pytorchJob.Spec.ElasticPolicy.RDZVBackend) + + assert.Equal(t, 1, len(pytorchJob.Spec.PyTorchReplicaSpecs)) + assert.Contains(t, pytorchJob.Spec.PyTorchReplicaSpecs, kubeflowv1.PyTorchJobReplicaTypeWorker) - var hasContainerWithDefaultPytorchName = false + var hasContainerWithDefaultPytorchName = false - for _, container := range pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers { - if container.Name == kubeflowv1.PytorchJobDefaultContainerName { - hasContainerWithDefaultPytorchName = true + for _, container := range pytorchJob.Spec.PyTorchReplicaSpecs[kubeflowv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers { + if container.Name == kubeflowv1.PytorchJobDefaultContainerName { + hasContainerWithDefaultPytorchName = true + } } - } - assert.True(t, hasContainerWithDefaultPytorchName) + assert.True(t, hasContainerWithDefaultPytorchName) + } } func TestBuildResourcePytorchV1WithZeroWorker(t *testing.T) { - taskConfig := &kfplugins.DistributedPyTorchTrainingTask{ - WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ - Replicas: 0, + taskConfigs := []*kfplugins.DistributedPyTorchTrainingTask{ + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Replicas: 0, + }, + }, + { + WorkerReplicas: &kfplugins.DistributedPyTorchTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 0, + }, + }, }, } - pytorchResourceHandler := pytorchOperatorResourceHandler{} - taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) - taskTemplate.TaskTypeVersion = 1 - _, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) - assert.Error(t, err) + + for _, taskConfig := range taskConfigs { + pytorchResourceHandler := pytorchOperatorResourceHandler{} + + taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) + taskTemplate.TaskTypeVersion = 1 + _, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + assert.Error(t, err) + } } func TestParseElasticConfig(t *testing.T) { diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go index db5fe6a83a..d69fd30b01 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go @@ -100,9 +100,18 @@ func (tensorflowOperatorResourceHandler) BuildResource(ctx context.Context, task for t, cfg := range replicaSpecCfgMap { // Short circuit if replica set has no replicas to avoid unnecessarily // generating pod specs - if cfg.GetReplicas() <= 0 { + var replicas int32 + // replicas is deprecated since the common replica spec is introduced. + // Therefore, if the common replica spec is set, use that to get the common fields + if cfg.GetCommon() != nil { + replicas = cfg.GetCommon().GetReplicas() + } else { + replicas = cfg.GetReplicas() + } + if replicas <= 0 { continue } + rs, err := common.ToReplicaSpecWithOverrides(ctx, taskCtx, cfg, kubeflowv1.TFJobDefaultContainerName, false) if err != nil { return nil, flyteerr.Errorf(flyteerr.BadTaskSpecification, "Unable to create replica spec: [%v]", err.Error()) diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go index 80e95871d1..a85ce8f875 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go @@ -460,55 +460,81 @@ func TestBuildResourceTensorFlowExtendedResources(t *testing.T) { } v0TaskTemplate := dummyTensorFlowTaskTemplate("v0", dummyTensorFlowCustomObj(100, 50, 1, 1)) - v1TaskTemplate := dummyTensorFlowTaskTemplate("v1", &kfplugins.DistributedTensorflowTrainingTask{ - ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 1, - }, - WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 100, - }, - PsReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 50, - }, - EvaluatorReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 1, - }, - }) - v1TaskTemplate.TaskTypeVersion = 1 - testConfigs := []struct { - name string - taskTemplate *core.TaskTemplate - }{ - {"v0", v0TaskTemplate}, - {"v1", v1TaskTemplate}, - } - - for _, tCfg := range testConfigs { - for _, f := range fixtures { - t.Run(tCfg.name+" "+f.name, func(t *testing.T) { - taskTemplate := *tCfg.taskTemplate - taskTemplate.ExtendedResources = f.extendedResourcesBase - tensorflowResourceHandler := tensorflowOperatorResourceHandler{} - taskContext := dummyTensorFlowTaskContext(&taskTemplate, f.resources, f.extendedResourcesOverride) - r, err := tensorflowResourceHandler.BuildResource(context.TODO(), taskContext) - assert.NoError(t, err) - assert.NotNil(t, r) - tensorflowJob, ok := r.(*kubeflowv1.TFJob) - assert.True(t, ok) - - for _, replicaSpec := range tensorflowJob.Spec.TFReplicaSpecs { - assert.EqualValues( - t, - f.expectedNsr, - replicaSpec.Template.Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms, - ) - assert.EqualValues( - t, - f.expectedTol, - replicaSpec.Template.Spec.Tolerations, - ) - } - }) + v1TaskTemplates := []*core.TaskTemplate{ + dummyTensorFlowTaskTemplate("v1", &kfplugins.DistributedTensorflowTrainingTask{ + ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 1, + }, + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 100, + }, + PsReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 50, + }, + EvaluatorReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 1, + }, + }), + dummyTensorFlowTaskTemplate("v1", &kfplugins.DistributedTensorflowTrainingTask{ + ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 1, + }, + }, + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + }, + }, + PsReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 50, + }, + }, + EvaluatorReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 1, + }, + }, + }), + } + for _, v1TaskTemplate := range v1TaskTemplates { + v1TaskTemplate.TaskTypeVersion = 1 + testConfigs := []struct { + name string + taskTemplate *core.TaskTemplate + }{ + {"v0", v0TaskTemplate}, + {"v1", v1TaskTemplate}, + } + + for _, tCfg := range testConfigs { + for _, f := range fixtures { + t.Run(tCfg.name+" "+f.name, func(t *testing.T) { + taskTemplate := *tCfg.taskTemplate + taskTemplate.ExtendedResources = f.extendedResourcesBase + tensorflowResourceHandler := tensorflowOperatorResourceHandler{} + taskContext := dummyTensorFlowTaskContext(&taskTemplate, f.resources, f.extendedResourcesOverride) + r, err := tensorflowResourceHandler.BuildResource(context.TODO(), taskContext) + assert.NoError(t, err) + assert.NotNil(t, r) + tensorflowJob, ok := r.(*kubeflowv1.TFJob) + assert.True(t, ok) + + for _, replicaSpec := range tensorflowJob.Spec.TFReplicaSpecs { + assert.EqualValues( + t, + f.expectedNsr, + replicaSpec.Template.Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms, + ) + assert.EqualValues( + t, + f.expectedTol, + replicaSpec.Template.Spec.Tolerations, + ) + } + }) + } } } } @@ -638,208 +664,307 @@ func TestReplicaCounts(t *testing.T) { } func TestBuildResourceTensorFlowV1(t *testing.T) { - taskConfig := &kfplugins.DistributedTensorflowTrainingTask{ - ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 1, - Image: testImage, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, + taskConfigs := []*kfplugins.DistributedTensorflowTrainingTask{ + { + ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 1, + Image: testImage, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, + }, + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, }, }, - RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, - }, - WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + PsReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 50, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + }, + EvaluatorReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 1, + Image: testImage, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, + RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, + }, + RunPolicy: &kfplugins.RunPolicy{ + CleanPodPolicy: kfplugins.CleanPodPolicy_CLEANPOD_POLICY_ALL, + ActiveDeadlineSeconds: int32(100), }, }, - PsReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 50, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, + { + ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 1, + Image: testImage, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, + RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + }, }, }, - }, - EvaluatorReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 1, - Image: testImage, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, + PsReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 50, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + EvaluatorReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 1, + Image: testImage, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, + RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, }, }, - RestartPolicy: kfplugins.RestartPolicy_RESTART_POLICY_ALWAYS, - }, - RunPolicy: &kfplugins.RunPolicy{ - CleanPodPolicy: kfplugins.CleanPodPolicy_CLEANPOD_POLICY_ALL, - ActiveDeadlineSeconds: int32(100), + RunPolicy: &kfplugins.RunPolicy{ + CleanPodPolicy: kfplugins.CleanPodPolicy_CLEANPOD_POLICY_ALL, + ActiveDeadlineSeconds: int32(100), + }, }, } + for _, taskConfig := range taskConfigs { - resourceRequirementsMap := map[commonOp.ReplicaType]*corev1.ResourceRequirements{ - kubeflowv1.TFJobReplicaTypeChief: { - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("250m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), - }, - }, - kubeflowv1.TFJobReplicaTypeWorker: { - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1024m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2048m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), - flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), - }, - }, - kubeflowv1.TFJobReplicaTypePS: { - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("250m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), + resourceRequirementsMap := map[commonOp.ReplicaType]*corev1.ResourceRequirements{ + kubeflowv1.TFJobReplicaTypeChief: { + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("250m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), + kubeflowv1.TFJobReplicaTypeWorker: { + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1024m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2048m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + }, }, - }, - kubeflowv1.TFJobReplicaTypeEval: { - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("250m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), + kubeflowv1.TFJobReplicaTypePS: { + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("250m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), + kubeflowv1.TFJobReplicaTypeEval: { + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("250m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + }, }, - }, - } + } - tensorflowResourceHandler := tensorflowOperatorResourceHandler{} + tensorflowResourceHandler := tensorflowOperatorResourceHandler{} - taskTemplate := dummyTensorFlowTaskTemplate("v1", taskConfig) - taskTemplate.TaskTypeVersion = 1 + taskTemplate := dummyTensorFlowTaskTemplate("v1", taskConfig) + taskTemplate.TaskTypeVersion = 1 - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) - assert.NoError(t, err) - assert.NotNil(t, resource) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + assert.NoError(t, err) + assert.NotNil(t, resource) - tensorflowJob, ok := resource.(*kubeflowv1.TFJob) - assert.True(t, ok) - assert.Equal(t, int32(100), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeWorker].Replicas) - assert.Equal(t, int32(50), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypePS].Replicas) - assert.Equal(t, int32(1), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeChief].Replicas) - assert.Equal(t, int32(1), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeEval].Replicas) + tensorflowJob, ok := resource.(*kubeflowv1.TFJob) + assert.True(t, ok) + assert.Equal(t, int32(100), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeWorker].Replicas) + assert.Equal(t, int32(50), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypePS].Replicas) + assert.Equal(t, int32(1), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeChief].Replicas) + assert.Equal(t, int32(1), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeEval].Replicas) - for replicaType, replicaSpec := range tensorflowJob.Spec.TFReplicaSpecs { - var hasContainerWithDefaultTensorFlowName = false + for replicaType, replicaSpec := range tensorflowJob.Spec.TFReplicaSpecs { + var hasContainerWithDefaultTensorFlowName = false - for _, container := range replicaSpec.Template.Spec.Containers { - if container.Name == kubeflowv1.TFJobDefaultContainerName { - hasContainerWithDefaultTensorFlowName = true - assert.Equal(t, *resourceRequirementsMap[replicaType], container.Resources) + for _, container := range replicaSpec.Template.Spec.Containers { + if container.Name == kubeflowv1.TFJobDefaultContainerName { + hasContainerWithDefaultTensorFlowName = true + assert.Equal(t, *resourceRequirementsMap[replicaType], container.Resources) + } } - } - assert.True(t, hasContainerWithDefaultTensorFlowName) + assert.True(t, hasContainerWithDefaultTensorFlowName) + } + assert.Equal(t, commonOp.CleanPodPolicyAll, *tensorflowJob.Spec.RunPolicy.CleanPodPolicy) + assert.Equal(t, int64(100), *tensorflowJob.Spec.RunPolicy.ActiveDeadlineSeconds) } - assert.Equal(t, commonOp.CleanPodPolicyAll, *tensorflowJob.Spec.RunPolicy.CleanPodPolicy) - assert.Equal(t, int64(100), *tensorflowJob.Spec.RunPolicy.ActiveDeadlineSeconds) } func TestBuildResourceTensorFlowV1WithOnlyWorker(t *testing.T) { - taskConfig := &kfplugins.DistributedTensorflowTrainingTask{ - WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + taskConfigs := []*kfplugins.DistributedTensorflowTrainingTask{ + { + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + }, + }, + { + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + }, }, }, }, } - resourceRequirementsMap := map[commonOp.ReplicaType]*corev1.ResourceRequirements{ - kubeflowv1.TFJobReplicaTypeWorker: { - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1024m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2048m"), - corev1.ResourceMemory: resource.MustParse("2Gi"), - flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + for _, taskConfig := range taskConfigs { + resourceRequirementsMap := map[commonOp.ReplicaType]*corev1.ResourceRequirements{ + kubeflowv1.TFJobReplicaTypeWorker: { + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1024m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2048m"), + corev1.ResourceMemory: resource.MustParse("2Gi"), + flytek8s.ResourceNvidiaGPU: resource.MustParse("1"), + }, }, - }, - } + } - tensorflowResourceHandler := tensorflowOperatorResourceHandler{} + tensorflowResourceHandler := tensorflowOperatorResourceHandler{} - taskTemplate := dummyTensorFlowTaskTemplate("v1 with only worker replica", taskConfig) - taskTemplate.TaskTypeVersion = 1 + taskTemplate := dummyTensorFlowTaskTemplate("v1 with only worker replica", taskConfig) + taskTemplate.TaskTypeVersion = 1 - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) - assert.NoError(t, err) - assert.NotNil(t, resource) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + assert.NoError(t, err) + assert.NotNil(t, resource) - tensorflowJob, ok := resource.(*kubeflowv1.TFJob) - assert.True(t, ok) - assert.Equal(t, int32(100), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeWorker].Replicas) - assert.Nil(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeChief]) - assert.Nil(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypePS]) + tensorflowJob, ok := resource.(*kubeflowv1.TFJob) + assert.True(t, ok) + assert.Equal(t, int32(100), *tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeWorker].Replicas) + assert.Nil(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeChief]) + assert.Nil(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypePS]) - for replicaType, replicaSpec := range tensorflowJob.Spec.TFReplicaSpecs { - var hasContainerWithDefaultTensorFlowName = false + for replicaType, replicaSpec := range tensorflowJob.Spec.TFReplicaSpecs { + var hasContainerWithDefaultTensorFlowName = false - for _, container := range replicaSpec.Template.Spec.Containers { - if container.Name == kubeflowv1.TFJobDefaultContainerName { - hasContainerWithDefaultTensorFlowName = true - assert.Equal(t, *resourceRequirementsMap[replicaType], container.Resources) + for _, container := range replicaSpec.Template.Spec.Containers { + if container.Name == kubeflowv1.TFJobDefaultContainerName { + hasContainerWithDefaultTensorFlowName = true + assert.Equal(t, *resourceRequirementsMap[replicaType], container.Resources) + } } - } - assert.True(t, hasContainerWithDefaultTensorFlowName) + assert.True(t, hasContainerWithDefaultTensorFlowName) + } } } @@ -857,49 +982,88 @@ func TestBuildResourceTensorFlowV1ResourceTolerations(t *testing.T) { }, })) - taskConfig := &kfplugins.DistributedTensorflowTrainingTask{ - ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 1, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "250m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, + taskConfigs := []*kfplugins.DistributedTensorflowTrainingTask{ + { + ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 1, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "500m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, }, }, }, - WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ - Replicas: 100, - Resources: &core.Resources{ - Requests: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "1024m"}, - {Name: core.Resources_MEMORY, Value: "1Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + { + ChiefReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 1, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "250m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "500m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + }, + }, }, - Limits: []*core.Resources_ResourceEntry{ - {Name: core.Resources_CPU, Value: "2048m"}, - {Name: core.Resources_MEMORY, Value: "2Gi"}, - {Name: core.Resources_GPU, Value: "1"}, + }, + WorkerReplicas: &kfplugins.DistributedTensorflowTrainingReplicaSpec{ + Common: &kfplugins.CommonReplicaSpec{ + Replicas: 100, + Resources: &core.Resources{ + Requests: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "1024m"}, + {Name: core.Resources_MEMORY, Value: "1Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + Limits: []*core.Resources_ResourceEntry{ + {Name: core.Resources_CPU, Value: "2048m"}, + {Name: core.Resources_MEMORY, Value: "2Gi"}, + {Name: core.Resources_GPU, Value: "1"}, + }, + }, }, }, }, } - tensorflowResourceHandler := tensorflowOperatorResourceHandler{} + for _, taskConfig := range taskConfigs { - taskTemplate := dummyTensorFlowTaskTemplate("v1", taskConfig) - taskTemplate.TaskTypeVersion = 1 + tensorflowResourceHandler := tensorflowOperatorResourceHandler{} - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) - assert.NoError(t, err) - assert.NotNil(t, resource) + taskTemplate := dummyTensorFlowTaskTemplate("v1", taskConfig) + taskTemplate.TaskTypeVersion = 1 - tensorflowJob, ok := resource.(*kubeflowv1.TFJob) - assert.True(t, ok) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + assert.NoError(t, err) + assert.NotNil(t, resource) - assert.NotContains(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeChief].Template.Spec.Tolerations, gpuToleration) - assert.Contains(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeWorker].Template.Spec.Tolerations, gpuToleration) + tensorflowJob, ok := resource.(*kubeflowv1.TFJob) + assert.True(t, ok) + + assert.NotContains(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeChief].Template.Spec.Tolerations, gpuToleration) + assert.Contains(t, tensorflowJob.Spec.TFReplicaSpecs[kubeflowv1.TFJobReplicaTypeWorker].Template.Spec.Tolerations, gpuToleration) + } } From 3f4c2c88748a9fe860bc41788902aef80e83bbc3 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Wed, 12 Jun 2024 03:39:54 +0200 Subject: [PATCH 12/30] charts: honor redoc.enabled=false (#5452) also use correct nodeSelector and fix doc Signed-off-by: Felix Ruess --- charts/flyte-deps/README.md | 18 +++++++-------- .../templates/redoc/deployment.yaml | 2 +- .../flyte-deps/templates/redoc/service.yaml | 2 ++ charts/flyte-deps/values.yaml | 18 +++++++-------- charts/flyte/README.md | 18 +++++++-------- charts/flyte/templates/redoc/deployment.yaml | 5 +++-- charts/flyte/templates/redoc/service.yaml | 2 ++ charts/flyte/values.yaml | 18 +++++++-------- .../flyte_sandbox_deps_helm_generated.yaml | 22 ------------------- 9 files changed, 44 insertions(+), 61 deletions(-) diff --git a/charts/flyte-deps/README.md b/charts/flyte-deps/README.md index 014e19c251..9127d8098e 100644 --- a/charts/flyte-deps/README.md +++ b/charts/flyte-deps/README.md @@ -103,19 +103,19 @@ helm upgrade -f values.yaml flyte . | postgres.service | object | `{"annotations":{},"type":"NodePort"}` | Service settings for Postgres | | postgres.tolerations | list | `[]` | tolerations for Postgres deployment | | redis.enabled | bool | `false` | - enable or disable Redis Statefulset installation | -| redoc.affinity | object | `{}` | affinity for Minio deployment | -| redoc.enabled | bool | `false` | - enable or disable Minio deployment installation | +| redoc.affinity | object | `{}` | affinity for redoc deployment | +| redoc.enabled | bool | `false` | - enable or disable redoc deployment installation | | redoc.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | -| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for Minio deployment | +| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for redoc deployment | | redoc.image.tag | string | `"latest"` | Docker image tag | -| redoc.nodeSelector | object | `{}` | nodeSelector for Minio deployment | -| redoc.podAnnotations | object | `{}` | Annotations for Minio pods | -| redoc.replicaCount | int | `1` | Replicas count for Minio deployment | -| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for Minio deployment | +| redoc.nodeSelector | object | `{}` | nodeSelector for redoc deployment | +| redoc.podAnnotations | object | `{}` | Annotations for redoc pods | +| redoc.replicaCount | int | `1` | Replicas count for redoc deployment | +| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for redoc deployment | | redoc.resources.limits | object | `{"cpu":"200m","memory":"512Mi"}` | Limits are the maximum set of resources needed for this pod | | redoc.resources.requests | object | `{"cpu":"10m","memory":"128Mi"}` | Requests are the minimum set of resources needed for this pod | -| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for Minio | -| redoc.tolerations | list | `[]` | tolerations for Minio deployment | +| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for redoc | +| redoc.tolerations | list | `[]` | tolerations for redoc deployment | | sparkoperator | object | `{"enabled":false}` | Optional: Spark Plugin using the Spark Operator | | sparkoperator.enabled | bool | `false` | - enable or disable Sparkoperator deployment installation | | webhook.enabled | bool | `true` | | diff --git a/charts/flyte-deps/templates/redoc/deployment.yaml b/charts/flyte-deps/templates/redoc/deployment.yaml index a2cd199f95..db96f4e2e6 100644 --- a/charts/flyte-deps/templates/redoc/deployment.yaml +++ b/charts/flyte-deps/templates/redoc/deployment.yaml @@ -34,7 +34,7 @@ spec: ports: - containerPort: 8087 resources: {{ toYaml .Values.redoc.resources | nindent 10 }} - {{- with .Values.minio.nodeSelector }} + {{- with .Values.redoc.nodeSelector }} nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.redoc.affinity }} diff --git a/charts/flyte-deps/templates/redoc/service.yaml b/charts/flyte-deps/templates/redoc/service.yaml index 9f9eace073..6924557ccd 100644 --- a/charts/flyte-deps/templates/redoc/service.yaml +++ b/charts/flyte-deps/templates/redoc/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.redoc.enabled }} apiVersion: v1 kind: Service metadata: @@ -17,3 +18,4 @@ spec: port: 87 targetPort: 8087 selector: {{ include "redoc.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/flyte-deps/values.yaml b/charts/flyte-deps/values.yaml index 58aef81360..af6114bc7d 100755 --- a/charts/flyte-deps/values.yaml +++ b/charts/flyte-deps/values.yaml @@ -87,18 +87,18 @@ minio: affinity: {} redoc: - # --- enable or disable Minio deployment installation + # --- enable or disable redoc deployment installation enabled: false - # -- Replicas count for Minio deployment + # -- Replicas count for redoc deployment replicaCount: 1 image: - # -- Docker image for Minio deployment + # -- Docker image for redoc deployment repository: docker.io/redocly/redoc # -- Docker image tag tag: latest # -- Docker image pull policy pullPolicy: IfNotPresent - # -- Default resources requests and limits for Minio deployment + # -- Default resources requests and limits for redoc deployment resources: # -- Requests are the minimum set of resources needed for this pod requests: @@ -108,16 +108,16 @@ redoc: limits: cpu: 200m memory: 512Mi - # -- Service settings for Minio + # -- Service settings for redoc service: type: ClusterIP - # -- Annotations for Minio pods + # -- Annotations for redoc pods podAnnotations: {} - # -- nodeSelector for Minio deployment + # -- nodeSelector for redoc deployment nodeSelector: {} - # -- tolerations for Minio deployment + # -- tolerations for redoc deployment tolerations: [] - # -- affinity for Minio deployment + # -- affinity for redoc deployment affinity: {} # diff --git a/charts/flyte/README.md b/charts/flyte/README.md index 30c060babb..6a14f31f02 100644 --- a/charts/flyte/README.md +++ b/charts/flyte/README.md @@ -235,18 +235,18 @@ helm upgrade -f values-sandbox.yaml flyte . | postgres.tolerations | list | `[]` | tolerations for Postgres deployment | | redis | object | `{"enabled":false}` | --------------------------------------------- REDIS SETTINGS | | redis.enabled | bool | `false` | - enable or disable Redis Statefulset installation | -| redoc.affinity | object | `{}` | affinity for Minio deployment | -| redoc.enabled | bool | `true` | - enable or disable Minio deployment installation | +| redoc.affinity | object | `{}` | affinity for redoc deployment | +| redoc.enabled | bool | `true` | - enable or disable redoc deployment installation | | redoc.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | -| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for Minio deployment | +| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for redoc deployment | | redoc.image.tag | string | `"latest"` | Docker image tag | -| redoc.nodeSelector | object | `{}` | nodeSelector for Minio deployment | -| redoc.podAnnotations | object | `{}` | Annotations for Minio pods | -| redoc.replicaCount | int | `1` | Replicas count for Minio deployment | -| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for Minio deployment | +| redoc.nodeSelector | object | `{}` | nodeSelector for redoc deployment | +| redoc.podAnnotations | object | `{}` | Annotations for redoc pods | +| redoc.replicaCount | int | `1` | Replicas count for redoc deployment | +| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for redoc deployment | | redoc.resources.limits | object | `{"cpu":"200m","memory":"512Mi"}` | Limits are the maximum set of resources needed for this pod | | redoc.resources.requests | object | `{"cpu":"10m","memory":"128Mi"}` | Requests are the minimum set of resources needed for this pod | -| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for Minio | -| redoc.tolerations | list | `[]` | tolerations for Minio deployment | +| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for redoc | +| redoc.tolerations | list | `[]` | tolerations for redoc deployment | | sparkoperator | object | `{"enabled":false}` | Optional: Spark Plugin using the Spark Operator | | sparkoperator.enabled | bool | `false` | - enable or disable Sparkoperator deployment installation | diff --git a/charts/flyte/templates/redoc/deployment.yaml b/charts/flyte/templates/redoc/deployment.yaml index f194672ccf..808c9c42f8 100644 --- a/charts/flyte/templates/redoc/deployment.yaml +++ b/charts/flyte/templates/redoc/deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.redoc.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -33,7 +34,7 @@ spec: ports: - containerPort: 8087 resources: {{ toYaml .Values.redoc.resources | nindent 10 }} - {{- with .Values.minio.nodeSelector }} + {{- with .Values.redoc.nodeSelector }} nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.redoc.affinity }} @@ -42,4 +43,4 @@ spec: {{- with .Values.redoc.tolerations }} tolerations: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} - +{{- end }} diff --git a/charts/flyte/templates/redoc/service.yaml b/charts/flyte/templates/redoc/service.yaml index 9f9eace073..6924557ccd 100644 --- a/charts/flyte/templates/redoc/service.yaml +++ b/charts/flyte/templates/redoc/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.redoc.enabled }} apiVersion: v1 kind: Service metadata: @@ -17,3 +18,4 @@ spec: port: 87 targetPort: 8087 selector: {{ include "redoc.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/flyte/values.yaml b/charts/flyte/values.yaml index 8a28735828..366ae06797 100755 --- a/charts/flyte/values.yaml +++ b/charts/flyte/values.yaml @@ -751,18 +751,18 @@ minio: affinity: {} redoc: - # --- enable or disable Minio deployment installation + # --- enable or disable redoc deployment installation enabled: true - # -- Replicas count for Minio deployment + # -- Replicas count for redoc deployment replicaCount: 1 image: - # -- Docker image for Minio deployment + # -- Docker image for redoc deployment repository: docker.io/redocly/redoc # -- Docker image tag tag: latest # -- Docker image pull policy pullPolicy: IfNotPresent - # -- Default resources requests and limits for Minio deployment + # -- Default resources requests and limits for redoc deployment resources: # -- Requests are the minimum set of resources needed for this pod requests: @@ -772,16 +772,16 @@ redoc: limits: cpu: 200m memory: 512Mi - # -- Service settings for Minio + # -- Service settings for redoc service: type: ClusterIP - # -- Annotations for Minio pods + # -- Annotations for redoc pods podAnnotations: {} - # -- nodeSelector for Minio deployment + # -- nodeSelector for redoc deployment nodeSelector: {} - # -- tolerations for Minio deployment + # -- tolerations for redoc deployment tolerations: [] - # -- affinity for Minio deployment + # -- affinity for redoc deployment affinity: {} # diff --git a/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml b/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml index c5a42c3f6b..b34afed5a5 100644 --- a/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml +++ b/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml @@ -527,28 +527,6 @@ spec: app.kubernetes.io/name: postgres app.kubernetes.io/instance: flyte --- -# Source: flyte-deps/templates/redoc/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: redoc - namespace: flyte - labels: - app.kubernetes.io/name: redoc - app.kubernetes.io/instance: flyte - helm.sh/chart: flyte-deps-v0.1.10 - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - ports: - - name: redoc - protocol: TCP - port: 87 - targetPort: 8087 - selector: - app.kubernetes.io/name: redoc - app.kubernetes.io/instance: flyte ---- # Source: flyte-deps/templates/webhook/service.yaml apiVersion: v1 kind: Service From 9484e368128f40bce85a7560021c505cc3191af4 Mon Sep 17 00:00:00 2001 From: Jason Parraga Date: Wed, 12 Jun 2024 09:11:07 -0700 Subject: [PATCH 13/30] Minor cleanup for Web API plugins (#5472) Signed-off-by: Jason Parraga --- flyteplugins/go/tasks/pluginmachinery/internal/webapi/state.go | 3 --- flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/state.go b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/state.go index 176b627b91..3912507c75 100644 --- a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/state.go +++ b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/state.go @@ -54,9 +54,6 @@ type State struct { // level retries, just errors from hitting API, inside the sync loop SyncFailureCount int `json:"syncFailureCount,omitempty"` - // In creating the resource, this is the number of failures - CreationFailureCount int `json:"creationFailureCount,omitempty"` - // The time the execution first requests for an allocation token AllocationTokenRequestStartTime time.Time `json:"allocationTokenRequestStartTime,omitempty"` diff --git a/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go b/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go index 920040cab0..bd7edaa7a0 100644 --- a/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go @@ -22,7 +22,7 @@ import ( // that the plugin loader will be called before any Handle/Abort/Finalize functions are invoked type PluginLoader func(ctx context.Context, iCtx PluginSetupContext) (AsyncPlugin, error) -// PluginEntry is a structure that is used to indicate to the system a K8s plugin +// PluginEntry is a structure that is used to indicate to the system a WebAPI plugin type PluginEntry struct { // ID/Name of the plugin. This will be used to identify this plugin and has to be unique in the entire system // All functions like enabling and disabling a plugin use this ID From 653ca85ecaf24385823f2190bba3af8e0f9066ce Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:15:40 -0700 Subject: [PATCH 14/30] Bump k3s version to 1.29.0 (#5475) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- docker/sandbox-bundled/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/sandbox-bundled/Dockerfile b/docker/sandbox-bundled/Dockerfile index 7672b2d03d..0e8b0b0855 100644 --- a/docker/sandbox-bundled/Dockerfile +++ b/docker/sandbox-bundled/Dockerfile @@ -25,7 +25,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/r go build -o dist/flyte-sandbox-bootstrap cmd/bootstrap/main.go -FROM rancher/k3s:v1.24.4-k3s1 +FROM rancher/k3s:v1.29.0-k3s1 ARG TARGETARCH From 9b78125ffd84fdad21c8d19f1a496331d3fd20be Mon Sep 17 00:00:00 2001 From: ddl-rliu <140021987+ddl-rliu@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:20:17 -0700 Subject: [PATCH 15/30] fix: Modify the callback URL string in auth flow, to support custom base URLs in deployments (#5192) * x Signed-off-by: ddl-rliu x Signed-off-by: ddl-rliu x Signed-off-by: ddl-rliu * x Signed-off-by: ddl-rliu --------- Signed-off-by: ddl-rliu Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flyteadmin/auth/auth_context.go | 2 +- flyteadmin/auth/auth_context_test.go | 51 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 flyteadmin/auth/auth_context_test.go diff --git a/flyteadmin/auth/auth_context.go b/flyteadmin/auth/auth_context.go index b6fd3dd4da..0e21efacde 100644 --- a/flyteadmin/auth/auth_context.go +++ b/flyteadmin/auth/auth_context.go @@ -29,7 +29,7 @@ const ( ) var ( - callbackRelativeURL = config.MustParseURL("/callback") + callbackRelativeURL = config.MustParseURL("callback") rootRelativeURL = config.MustParseURL("/") ) diff --git a/flyteadmin/auth/auth_context_test.go b/flyteadmin/auth/auth_context_test.go new file mode 100644 index 0000000000..ed34d92026 --- /dev/null +++ b/flyteadmin/auth/auth_context_test.go @@ -0,0 +1,51 @@ +package auth + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "golang.org/x/oauth2" + + "github.com/flyteorg/flyte/flyteadmin/auth/config" +) + +func TestOAuth2ClientConfig(t *testing.T) { + authCtx := Context{ + oauth2Client: &oauth2.Config{}, + } + + type test struct { + name string + url string + expectedRedirectURL string + } + tests := []test{ + { + name: "simple publicUrl", + url: "https://flyte.com", + expectedRedirectURL: "https://flyte.com/callback", + }, + { + name: "custom subpath", + url: "https://flyte.com/custom-subpath/console", + expectedRedirectURL: "https://flyte.com/custom-subpath/callback", + }, + { + name: "complex publicUrl", + url: "https://flyte.com/login?redirect_url=https://flyte.com/console/select-project", + expectedRedirectURL: "https://flyte.com/callback", + }, + { + name: "complex publicUrl with custom subpath", + url: "https://flyte.com/custom-subpath/login?redirect_url=https://flyte.com/custom-subpath/console/select-project", + expectedRedirectURL: "https://flyte.com/custom-subpath/callback", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := authCtx.OAuth2ClientConfig(config.MustParseURL(tt.url)) + assert.Equal(t, tt.expectedRedirectURL, cfg.RedirectURL) + }) + } +} From bba8c11d886b12a9733e46ca319c9550adebcf46 Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Fri, 14 Jun 2024 12:01:51 +0800 Subject: [PATCH 16/30] [flyteagent] Remove redundant code in Agent (#5454) * Remove Redundant code in Agent Signed-off-by: Future-Outlier * improve error messages Signed-off-by: Future-Outlier * change to Signed-off-by: Future-Outlier * Remove defer func() by pingsu's advice. Signed-off-by: Future-Outlier Co-authored-by: pingsutw --------- Signed-off-by: Future-Outlier Co-authored-by: pingsutw --- .../go/tasks/plugins/webapi/agent/client.go | 17 +++++------------ .../go/tasks/plugins/webapi/agent/plugin.go | 7 ++----- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/client.go b/flyteplugins/go/tasks/plugins/webapi/agent/client.go index d8c8b055dc..e698d32121 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/client.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/client.go @@ -62,19 +62,12 @@ func getGrpcConnection(ctx context.Context, agent *Deployment) (*grpc.ClientConn if err != nil { return nil, err } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", agent, cerr) - } - return + + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", agent, cerr) } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", agent, cerr) - } - }() }() return conn, nil diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go index 368dffcef4..99a83aeb3b 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go @@ -183,6 +183,7 @@ func (p Plugin) ExecuteTaskSync( in, err := stream.Recv() if err != nil { + logger.Errorf(ctx, "Failed to write output with err %s", err.Error()) return nil, nil, err } if in.GetHeader() == nil { @@ -193,11 +194,7 @@ func (p Plugin) ExecuteTaskSync( resource := in.GetHeader().GetResource() if err := stream.CloseSend(); err != nil { - return nil, nil, err - } - - if err != nil { - logger.Errorf(ctx, "Failed to write output with err %s", err.Error()) + logger.Errorf(ctx, "Failed to close stream with err %s", err.Error()) return nil, nil, err } From 7d788cbe1e3f395d0e6ad862c4fb310458d09dbf Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:42:44 -0700 Subject: [PATCH 17/30] Add flyteconsole url to FlyteWorkflow CRD (#5449) * Add `ConsoleURL` to `FlyteWorkflow` CRD Signed-off-by: Eduardo Apolinario * Add `ConsoleURL` to flyteadmin config and write it to CRD Signed-off-by: Eduardo Apolinario * Add ConsoleURL to application_config_provider and DeepCopyInto Signed-off-by: Eduardo Apolinario * wip Signed-off-by: Eduardo Apolinario * more wip Signed-off-by: Eduardo Apolinario * Fix flyteplugins unit tests Signed-off-by: Eduardo Apolinario * Fix existing propeller unit tests Signed-off-by: Eduardo Apolinario * Add a few unit tests Signed-off-by: Eduardo Apolinario * Include FLYTE_EXECUTION_URL iff "link_type" is set in the task template Signed-off-by: Eduardo Apolinario * Remove TODOs Signed-off-by: Eduardo Apolinario * Only include consoleURL if task set the relevant bit in its task template Signed-off-by: Eduardo Apolinario * Fix flyteplugins tests Signed-off-by: Eduardo Apolinario * Remove attempt number from the url Signed-off-by: Eduardo Apolinario * Include review feedback Signed-off-by: Eduardo Apolinario --------- Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- .../runtime/application_config_provider.go | 1 + .../interfaces/application_configuration.go | 3 + .../pkg/workflowengine/impl/k8s_executor.go | 4 + .../pluginmachinery/core/exec_metadata.go | 1 + .../core/mocks/task_execution_metadata.go | 32 + .../pluginmachinery/core/template/template.go | 9 +- .../flytek8s/container_helper.go | 7 +- .../flytek8s/container_helper_test.go | 24 +- .../flytek8s/k8s_resource_adds.go | 20 +- .../flytek8s/k8s_resource_adds_test.go | 63 +- .../pluginmachinery/flytek8s/pod_helper.go | 22 +- .../flytek8s/pod_helper_test.go | 69 ++ .../plugins/array/awsbatch/transformer.go | 2 +- .../plugins/array/k8s/management_test.go | 1 + .../go/tasks/plugins/k8s/dask/dask_test.go | 1 + .../plugins/k8s/kfoperators/mpi/mpi_test.go | 1 + .../k8s/kfoperators/pytorch/pytorch_test.go | 1 + .../kfoperators/tensorflow/tensorflow_test.go | 1 + .../tasks/plugins/k8s/pod/container_test.go | 1 + .../go/tasks/plugins/k8s/pod/sidecar_test.go | 1 + .../go/tasks/plugins/k8s/ray/ray_test.go | 1 + .../go/tasks/plugins/k8s/spark/spark_test.go | 1 + flyteplugins/tests/end_to_end.go | 1 + .../kubectl-flyte/cmd/printers/workflow.go | 2 + .../pkg/apis/flyteworkflow/v1alpha1/iface.go | 1 + .../v1alpha1/mocks/ExecutableWorkflow.go | 32 + .../apis/flyteworkflow/v1alpha1/mocks/Meta.go | 32 + .../v1alpha1/mocks/MetaExtended.go | 32 + .../apis/flyteworkflow/v1alpha1/workflow.go | 5 + .../controller/executors/execution_context.go | 2 +- .../executors/mocks/execution_context.go | 892 +++++++++++++----- .../controller/nodes/array/handler_test.go | 26 +- .../controller/nodes/branch/handler_test.go | 8 +- .../pkg/controller/nodes/cache_test.go | 5 +- .../nodes/dynamic/dynamic_workflow_test.go | 26 +- .../controller/nodes/dynamic/handler_test.go | 16 +- .../pkg/controller/nodes/executor_test.go | 40 +- .../pkg/controller/nodes/gate/handler_test.go | 2 +- .../mocks/node_execution_metadata.go | 32 + .../nodes/interfaces/node_exec_context.go | 1 + .../pkg/controller/nodes/resolve_test.go | 2 + .../nodes/subworkflow/handler_test.go | 32 +- .../nodes/subworkflow/launchplan_test.go | 20 +- .../nodes/subworkflow/subworkflow_test.go | 16 +- .../pkg/controller/nodes/task/handler_test.go | 26 +- .../nodes/task/taskexec_context_test.go | 6 +- .../controller/nodes/task/transformer_test.go | 8 +- 47 files changed, 1144 insertions(+), 387 deletions(-) diff --git a/flyteadmin/pkg/runtime/application_config_provider.go b/flyteadmin/pkg/runtime/application_config_provider.go index a16c27e694..e754858b3c 100644 --- a/flyteadmin/pkg/runtime/application_config_provider.go +++ b/flyteadmin/pkg/runtime/application_config_provider.go @@ -33,6 +33,7 @@ var flyteAdminConfig = config.MustRegisterSection(flyteAdmin, &interfaces.Applic MaxParallelism: 25, K8SServiceAccount: "", UseOffloadedWorkflowClosure: false, + ConsoleURL: "", }) var schedulerConfig = config.MustRegisterSection(scheduler, &interfaces.SchedulerConfig{ diff --git a/flyteadmin/pkg/runtime/interfaces/application_configuration.go b/flyteadmin/pkg/runtime/interfaces/application_configuration.go index 3a459209f5..092aa665b6 100644 --- a/flyteadmin/pkg/runtime/interfaces/application_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/application_configuration.go @@ -103,6 +103,9 @@ type ApplicationConfig struct { Envs map[string]string `json:"envs,omitempty"` FeatureGates FeatureGates `json:"featureGates" pflag:",Enable experimental features."` + + // A URL pointing to the flyteconsole instance used to hit this flyteadmin instance. + ConsoleURL string `json:"consoleUrl,omitempty" pflag:",A URL pointing to the flyteconsole instance used to hit this flyteadmin instance."` } func (a *ApplicationConfig) GetRoleNameKey() string { diff --git a/flyteadmin/pkg/workflowengine/impl/k8s_executor.go b/flyteadmin/pkg/workflowengine/impl/k8s_executor.go index f90051fabe..163a58cab3 100644 --- a/flyteadmin/pkg/workflowengine/impl/k8s_executor.go +++ b/flyteadmin/pkg/workflowengine/impl/k8s_executor.go @@ -55,6 +55,10 @@ func (e K8sWorkflowExecutor) Execute(ctx context.Context, data interfaces.Execut flyteWf.Tasks = nil } + if consoleURL := e.config.ApplicationConfiguration().GetTopLevelConfig().ConsoleURL; len(consoleURL) > 0 { + flyteWf.ConsoleURL = consoleURL + } + executionTargetSpec := executioncluster.ExecutionTargetSpec{ Project: data.ExecutionID.Project, Domain: data.ExecutionID.Domain, diff --git a/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go b/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go index 83d7dbcf12..5969d44661 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go @@ -53,4 +53,5 @@ type TaskExecutionMetadata interface { GetPlatformResources() *v1.ResourceRequirements GetInterruptibleFailureThreshold() int32 GetEnvironmentVariables() map[string]string + GetConsoleURL() string } diff --git a/flyteplugins/go/tasks/pluginmachinery/core/mocks/task_execution_metadata.go b/flyteplugins/go/tasks/pluginmachinery/core/mocks/task_execution_metadata.go index b9115f00c6..433816f89c 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/mocks/task_execution_metadata.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/mocks/task_execution_metadata.go @@ -54,6 +54,38 @@ func (_m *TaskExecutionMetadata) GetAnnotations() map[string]string { return r0 } +type TaskExecutionMetadata_GetConsoleURL struct { + *mock.Call +} + +func (_m TaskExecutionMetadata_GetConsoleURL) Return(_a0 string) *TaskExecutionMetadata_GetConsoleURL { + return &TaskExecutionMetadata_GetConsoleURL{Call: _m.Call.Return(_a0)} +} + +func (_m *TaskExecutionMetadata) OnGetConsoleURL() *TaskExecutionMetadata_GetConsoleURL { + c_call := _m.On("GetConsoleURL") + return &TaskExecutionMetadata_GetConsoleURL{Call: c_call} +} + +func (_m *TaskExecutionMetadata) OnGetConsoleURLMatch(matchers ...interface{}) *TaskExecutionMetadata_GetConsoleURL { + c_call := _m.On("GetConsoleURL", matchers...) + return &TaskExecutionMetadata_GetConsoleURL{Call: c_call} +} + +// GetConsoleURL provides a mock function with given fields: +func (_m *TaskExecutionMetadata) GetConsoleURL() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + type TaskExecutionMetadata_GetEnvironmentVariables struct { *mock.Call } diff --git a/flyteplugins/go/tasks/pluginmachinery/core/template/template.go b/flyteplugins/go/tasks/pluginmachinery/core/template/template.go index 82b306ffbe..7a787c5590 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/template/template.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/template/template.go @@ -64,10 +64,11 @@ func (e ErrorCollection) Error() string { // Parameters struct is used by the Templating Engine to replace the templated parameters type Parameters struct { - TaskExecMetadata core.TaskExecutionMetadata - Inputs io.InputReader - OutputPath io.OutputFilePaths - Task core.TaskTemplatePath + TaskExecMetadata core.TaskExecutionMetadata + Inputs io.InputReader + OutputPath io.OutputFilePaths + Task core.TaskTemplatePath + IncludeConsoleURL bool } // Render Evaluates templates in each command with the equivalent value from passed args. Templates are case-insensitive diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go index fdaec7256c..8ad765f72e 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go @@ -292,7 +292,12 @@ func AddFlyteCustomizationsToContainer(ctx context.Context, parameters template. } container.Args = modifiedArgs - container.Env, container.EnvFrom = DecorateEnvVars(ctx, container.Env, parameters.TaskExecMetadata.GetEnvironmentVariables(), parameters.TaskExecMetadata.GetTaskExecutionID()) + // The flyteconsole url is added based on the `IncludeConsoleURL` bit set via the task template + consoleURL := "" + if parameters.IncludeConsoleURL { + consoleURL = parameters.TaskExecMetadata.GetConsoleURL() + } + container.Env, container.EnvFrom = DecorateEnvVars(ctx, container.Env, parameters.TaskExecMetadata.GetEnvironmentVariables(), parameters.TaskExecMetadata.GetTaskExecutionID(), consoleURL) // retrieve platformResources and overrideResources to use when aggregating container resources platformResources := parameters.TaskExecMetadata.GetPlatformResources() diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go index ece0f724c4..6aab57f7b3 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go @@ -404,6 +404,7 @@ func TestToK8sContainer(t *testing.T) { "foo": "bar", }) mockTaskExecMetadata.OnGetNamespace().Return("my-namespace") + mockTaskExecMetadata.OnGetConsoleURL().Return("") tCtx := &mocks.TaskExecutionContext{} tCtx.OnTaskExecutionMetadata().Return(&mockTaskExecMetadata) @@ -447,9 +448,10 @@ func TestToK8sContainer(t *testing.T) { assert.False(t, *container.SecurityContext.AllowPrivilegeEscalation) } -func getTemplateParametersForTest(resourceRequirements, platformResources *v1.ResourceRequirements) template.Parameters { +func getTemplateParametersForTest(resourceRequirements, platformResources *v1.ResourceRequirements, includeConsoleURL bool, consoleURL string) template.Parameters { mockTaskExecMetadata := mocks.TaskExecutionMetadata{} mockTaskExecutionID := mocks.TaskExecutionID{} + mockTaskExecutionID.OnGetUniqueNodeID().Return("unique_node_id") mockTaskExecutionID.OnGetGeneratedName().Return("gen_name") mockTaskExecutionID.OnGetID().Return(core.TaskExecutionIdentifier{ TaskId: &core.Identifier{ @@ -477,6 +479,7 @@ func getTemplateParametersForTest(resourceRequirements, platformResources *v1.Re mockTaskExecMetadata.OnGetPlatformResources().Return(platformResources) mockTaskExecMetadata.OnGetEnvironmentVariables().Return(nil) mockTaskExecMetadata.OnGetNamespace().Return("my-namespace") + mockTaskExecMetadata.OnGetConsoleURL().Return(consoleURL) mockInputReader := mocks2.InputReader{} mockInputPath := storage.DataReference("s3://input/path") @@ -492,9 +495,10 @@ func getTemplateParametersForTest(resourceRequirements, platformResources *v1.Re mockOutputPath.OnGetPreviousCheckpointsPrefix().Return("/prev") return template.Parameters{ - TaskExecMetadata: &mockTaskExecMetadata, - Inputs: &mockInputReader, - OutputPath: &mockOutputPath, + TaskExecMetadata: &mockTaskExecMetadata, + Inputs: &mockInputReader, + OutputPath: &mockOutputPath, + IncludeConsoleURL: includeConsoleURL, } } @@ -506,7 +510,7 @@ func TestAddFlyteCustomizationsToContainer(t *testing.T) { Limits: v1.ResourceList{ v1.ResourceEphemeralStorage: resource.MustParse("2048Mi"), }, - }, nil) + }, nil, false, "") container := &v1.Container{ Command: []string{ "{{ .Input }}", @@ -554,7 +558,7 @@ func TestAddFlyteCustomizationsToContainer_Resources(t *testing.T) { Limits: v1.ResourceList{ v1.ResourceMemory: resource.MustParse("20"), }, - }) + }, false, "") err := AddFlyteCustomizationsToContainer(context.TODO(), templateParameters, ResourceCustomizationModeMergeExistingResources, container) assert.NoError(t, err) assert.True(t, container.Resources.Requests.Cpu().Equal(resource.MustParse("1"))) @@ -577,7 +581,7 @@ func TestAddFlyteCustomizationsToContainer_Resources(t *testing.T) { Limits: v1.ResourceList{ v1.ResourceMemory: resource.MustParse("20"), }, - }) + }, false, "") err := AddFlyteCustomizationsToContainer(context.TODO(), templateParameters, ResourceCustomizationModeMergeExistingResources, container) assert.NoError(t, err) assert.True(t, container.Resources.Requests.Cpu().Equal(resource.MustParse("1"))) @@ -612,7 +616,7 @@ func TestAddFlyteCustomizationsToContainer_Resources(t *testing.T) { v1.ResourceCPU: resource.MustParse("10"), v1.ResourceMemory: resource.MustParse("20"), }, - }) + }, false, "") err := AddFlyteCustomizationsToContainer(context.TODO(), templateParameters, ResourceCustomizationModeMergeExistingResources, container) assert.NoError(t, err) assert.True(t, container.Resources.Requests.Cpu().Equal(resource.MustParse("10"))) @@ -649,7 +653,7 @@ func TestAddFlyteCustomizationsToContainer_Resources(t *testing.T) { templateParameters := getTemplateParametersForTest(&v1.ResourceRequirements{ Requests: overrideRequests, Limits: overrideLimits, - }, &v1.ResourceRequirements{}) + }, &v1.ResourceRequirements{}, false, "") err := AddFlyteCustomizationsToContainer(context.TODO(), templateParameters, ResourceCustomizationModeMergeExistingResources, container) assert.NoError(t, err) @@ -684,7 +688,7 @@ func TestAddFlyteCustomizationsToContainer_ValidateExistingResources(t *testing. v1.ResourceCPU: resource.MustParse("10"), v1.ResourceMemory: resource.MustParse("20"), }, - }) + }, false, "") err := AddFlyteCustomizationsToContainer(context.TODO(), templateParameters, ResourceCustomizationModeEnsureExistingResourcesInRange, container) assert.NoError(t, err) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go index b235725edd..f26146435a 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go @@ -2,8 +2,10 @@ package flytek8s import ( "context" + "fmt" "os" "strconv" + "strings" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" @@ -13,6 +15,10 @@ import ( "github.com/flyteorg/flyte/flytestdlib/contextutils" ) +const ( + flyteExecutionURL = "FLYTE_EXECUTION_URL" +) + func GetContextEnvVars(ownerCtx context.Context) []v1.EnvVar { var envVars []v1.EnvVar @@ -32,7 +38,7 @@ func GetContextEnvVars(ownerCtx context.Context) []v1.EnvVar { return envVars } -func GetExecutionEnvVars(id pluginsCore.TaskExecutionID) []v1.EnvVar { +func GetExecutionEnvVars(id pluginsCore.TaskExecutionID, consoleURL string) []v1.EnvVar { if id == nil || id.GetID().NodeExecutionId == nil || id.GetID().NodeExecutionId.ExecutionId == nil { return []v1.EnvVar{} @@ -69,6 +75,14 @@ func GetExecutionEnvVars(id pluginsCore.TaskExecutionID) []v1.EnvVar { // }, } + if len(consoleURL) > 0 { + consoleURL = strings.TrimRight(consoleURL, "/") + envVars = append(envVars, v1.EnvVar{ + Name: flyteExecutionURL, + Value: fmt.Sprintf("%s/projects/%s/domains/%s/executions/%s/nodeId/%s/nodes", consoleURL, nodeExecutionID.Project, nodeExecutionID.Domain, nodeExecutionID.Name, id.GetUniqueNodeID()), + }) + } + // Task definition Level env variables. if id.GetID().TaskId != nil { taskID := id.GetID().TaskId @@ -113,9 +127,9 @@ func GetExecutionEnvVars(id pluginsCore.TaskExecutionID) []v1.EnvVar { return envVars } -func DecorateEnvVars(ctx context.Context, envVars []v1.EnvVar, taskEnvironmentVariables map[string]string, id pluginsCore.TaskExecutionID) ([]v1.EnvVar, []v1.EnvFromSource) { +func DecorateEnvVars(ctx context.Context, envVars []v1.EnvVar, taskEnvironmentVariables map[string]string, id pluginsCore.TaskExecutionID, consoleURL string) ([]v1.EnvVar, []v1.EnvFromSource) { envVars = append(envVars, GetContextEnvVars(ctx)...) - envVars = append(envVars, GetExecutionEnvVars(id)...) + envVars = append(envVars, GetExecutionEnvVars(id, consoleURL)...) for k, v := range taskEnvironmentVariables { envVars = append(envVars, v1.EnvVar{Name: k, Value: v}) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go index 2093639d97..9a6f302cb9 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go @@ -6,6 +6,7 @@ import ( "reflect" "testing" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" v12 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -18,8 +19,53 @@ import ( func TestGetExecutionEnvVars(t *testing.T) { mock := mockTaskExecutionIdentifier{} - envVars := GetExecutionEnvVars(mock) - assert.Len(t, envVars, 12) + tests := []struct { + name string + expectedEnvVars int + consoleURL string + expectedEnvVar *v12.EnvVar + }{ + { + "no-console-url", + 12, + "", + nil, + }, + { + "with-console-url", + 13, + "scheme://host/path", + &v12.EnvVar{ + Name: "FLYTE_EXECUTION_URL", + Value: "scheme://host/path/projects/proj/domains/domain/executions/name/nodeId/unique-node-id/nodes", + }, + }, + { + "with-console-url-ending-in-single-slash", + 13, + "scheme://host/path/", + &v12.EnvVar{ + Name: "FLYTE_EXECUTION_URL", + Value: "scheme://host/path/projects/proj/domains/domain/executions/name/nodeId/unique-node-id/nodes", + }, + }, + { + "with-console-url-ending-in-multiple-slashes", + 13, + "scheme://host/path////", + &v12.EnvVar{ + Name: "FLYTE_EXECUTION_URL", + Value: "scheme://host/path/projects/proj/domains/domain/executions/name/nodeId/unique-node-id/nodes", + }, + }, + } + for _, tt := range tests { + envVars := GetExecutionEnvVars(mock, tt.consoleURL) + assert.Len(t, envVars, tt.expectedEnvVars) + if tt.expectedEnvVar != nil { + assert.True(t, proto.Equal(&envVars[4], tt.expectedEnvVar)) + } + } } func TestGetTolerationsForResources(t *testing.T) { @@ -257,7 +303,7 @@ func TestDecorateEnvVars(t *testing.T) { defer os.Setenv("value", originalEnvVal) expected := append(defaultEnv, GetContextEnvVars(ctx)...) - expected = append(expected, GetExecutionEnvVars(mockTaskExecutionIdentifier{})...) + expected = append(expected, GetExecutionEnvVars(mockTaskExecutionIdentifier{}, "")...) aggregated := append(expected, v12.EnvVar{Name: "k", Value: "v"}) type args struct { @@ -270,12 +316,13 @@ func TestDecorateEnvVars(t *testing.T) { additionEnvVar map[string]string additionEnvVarFromEnv map[string]string executionEnvVar map[string]string + consoleURL string want []v12.EnvVar }{ - {"no-additional", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, emptyEnvVar, emptyEnvVar, emptyEnvVar, expected}, - {"with-additional", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, additionalEnv, emptyEnvVar, emptyEnvVar, aggregated}, - {"from-env", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, emptyEnvVar, envVarsFromEnv, emptyEnvVar, aggregated}, - {"from-execution-metadata", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, emptyEnvVar, emptyEnvVar, additionalEnv, aggregated}, + {"no-additional", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, emptyEnvVar, emptyEnvVar, emptyEnvVar, "", expected}, + {"with-additional", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, additionalEnv, emptyEnvVar, emptyEnvVar, "", aggregated}, + {"from-env", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, emptyEnvVar, envVarsFromEnv, emptyEnvVar, "", aggregated}, + {"from-execution-metadata", args{envVars: defaultEnv, id: mockTaskExecutionIdentifier{}}, emptyEnvVar, emptyEnvVar, additionalEnv, "", aggregated}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -283,7 +330,7 @@ func TestDecorateEnvVars(t *testing.T) { DefaultEnvVars: tt.additionEnvVar, DefaultEnvVarsFromEnv: tt.additionEnvVarFromEnv, })) - if got, _ := DecorateEnvVars(ctx, tt.args.envVars, tt.executionEnvVar, tt.args.id); !reflect.DeepEqual(got, tt.want) { + if got, _ := DecorateEnvVars(ctx, tt.args.envVars, tt.executionEnvVar, tt.args.id, tt.consoleURL); !reflect.DeepEqual(got, tt.want) { t.Errorf("DecorateEnvVars() = %v, want %v", got, tt.want) } }) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go index e25b3a4994..036d5e80f5 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go @@ -316,6 +316,19 @@ func BuildRawPod(ctx context.Context, tCtx pluginsCore.TaskExecutionContext) (*v return podSpec, &objectMeta, primaryContainerName, nil } +func hasExternalLinkType(taskTemplate *core.TaskTemplate) bool { + if taskTemplate == nil { + return false + } + config := taskTemplate.GetConfig() + if config == nil { + return false + } + // The presence of any "link_type" is sufficient to guarantee that the console URL should be included. + _, exists := config["link_type"] + return exists +} + // ApplyFlytePodConfiguration updates the PodSpec and ObjectMeta with various Flyte configuration. This includes // applying default k8s configuration, applying overrides (resources etc.), injecting copilot containers, and merging with the // configuration PodTemplate (if exists). @@ -328,10 +341,11 @@ func ApplyFlytePodConfiguration(ctx context.Context, tCtx pluginsCore.TaskExecut // add flyte resource customizations to containers templateParameters := template.Parameters{ - Inputs: tCtx.InputReader(), - OutputPath: tCtx.OutputWriter(), - Task: tCtx.TaskReader(), - TaskExecMetadata: tCtx.TaskExecutionMetadata(), + Inputs: tCtx.InputReader(), + OutputPath: tCtx.OutputWriter(), + Task: tCtx.TaskReader(), + TaskExecMetadata: tCtx.TaskExecutionMetadata(), + IncludeConsoleURL: hasExternalLinkType(taskTemplate), } resourceRequests := make([]v1.ResourceRequirements, 0, len(podSpec.Containers)) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go index 7869ed400f..7010247ee5 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go @@ -57,6 +57,7 @@ func dummyTaskExecutionMetadata(resources *v1.ResourceRequirements, extendedReso taskExecutionMetadata.On("IsInterruptible").Return(true) taskExecutionMetadata.OnGetPlatformResources().Return(&v1.ResourceRequirements{}) taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) + taskExecutionMetadata.OnGetConsoleURL().Return("") return taskExecutionMetadata } @@ -2117,3 +2118,71 @@ func TestMergePodSpecs(t *testing.T) { assert.Equal(t, podSpec.Containers[1].Name, defaultContainer.Name) assert.Equal(t, defaultContainerTemplate.TerminationMessagePath, defaultContainer.TerminationMessagePath) } + +func TestAddFlyteCustomizationsToContainer_SetConsoleUrl(t *testing.T) { + tests := []struct { + name string + includeConsoleURL bool + consoleURL string + expectedEnvVar *v1.EnvVar + }{ + { + name: "do not include console url and console url is not set", + includeConsoleURL: false, + consoleURL: "", + expectedEnvVar: nil, + }, + { + name: "include console url but console url is not set", + includeConsoleURL: false, + consoleURL: "", + expectedEnvVar: nil, + }, + { + name: "do not include console url but console url is set", + includeConsoleURL: false, + consoleURL: "gopher://flyte:65535/console", + expectedEnvVar: nil, + }, + { + name: "include console url and console url is set", + includeConsoleURL: true, + consoleURL: "gopher://flyte:65535/console", + expectedEnvVar: &v1.EnvVar{ + Name: flyteExecutionURL, + Value: "gopher://flyte:65535/console/projects/p2/domains/d2/executions/n2/nodeId/unique_node_id/nodes", + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + container := &v1.Container{ + Command: []string{ + "{{ .Input }}", + }, + Args: []string{ + "{{ .OutputPrefix }}", + }, + } + templateParameters := getTemplateParametersForTest(&v1.ResourceRequirements{}, &v1.ResourceRequirements{}, tt.includeConsoleURL, tt.consoleURL) + err := AddFlyteCustomizationsToContainer(context.TODO(), templateParameters, ResourceCustomizationModeAssignResources, container) + assert.NoError(t, err) + if tt.expectedEnvVar == nil { + // Confirm that there is no env var FLYTE_EXECUTION_URL set + for _, envVar := range container.Env { + assert.NotEqual(t, "FLYTE_EXECUTION_URL", envVar.Name) + } + } + if tt.expectedEnvVar != nil { + // Assert that the env var FLYTE_EXECUTION_URL is set if its value is non-nil + for _, envVar := range container.Env { + if envVar.Name == tt.expectedEnvVar.Name { + assert.Equal(t, tt.expectedEnvVar.Value, envVar.Value) + return + } + } + t.Fail() + } + }) + } +} diff --git a/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go b/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go index 68dc88c883..50445d31b0 100644 --- a/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go +++ b/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go @@ -138,7 +138,7 @@ func UpdateBatchInputForArray(_ context.Context, batchInput *batch.SubmitJobInpu func getEnvVarsForTask(ctx context.Context, execID pluginCore.TaskExecutionID, containerEnvVars []*core.KeyValuePair, defaultEnvVars map[string]string) []v1.EnvVar { - envVars, _ := flytek8s.DecorateEnvVars(ctx, flytek8s.ToK8sEnvVar(containerEnvVars), nil, execID) + envVars, _ := flytek8s.DecorateEnvVars(ctx, flytek8s.ToK8sEnvVar(containerEnvVars), nil, execID, "") m := make(map[string]string, len(envVars)) for _, envVar := range envVars { m[envVar.Name] = envVar.Value diff --git a/flyteplugins/go/tasks/plugins/array/k8s/management_test.go b/flyteplugins/go/tasks/plugins/array/k8s/management_test.go index c5d52efda7..7100fbc34c 100644 --- a/flyteplugins/go/tasks/plugins/array/k8s/management_test.go +++ b/flyteplugins/go/tasks/plugins/array/k8s/management_test.go @@ -116,6 +116,7 @@ func getMockTaskExecutionContext(ctx context.Context, parallelism int) *mocks.Ta tMeta.OnGetPlatformResources().Return(&v1.ResourceRequirements{}) tMeta.OnGetInterruptibleFailureThreshold().Return(2) tMeta.OnGetEnvironmentVariables().Return(nil) + tMeta.OnGetConsoleURL().Return("") ow := &mocks2.OutputWriter{} ow.OnGetOutputPrefixPath().Return("/prefix/") diff --git a/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go b/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go index 86ca034e7b..616312ca12 100644 --- a/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go @@ -191,6 +191,7 @@ func dummyDaskTaskContext(taskTemplate *core.TaskTemplate, resources *v1.Resourc taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) taskExecutionMetadata.OnGetK8sServiceAccount().Return(defaultServiceAccountName) taskExecutionMetadata.OnGetNamespace().Return(defaultNamespace) + taskExecutionMetadata.OnGetConsoleURL().Return("") overrides := &mocks.TaskOverrides{} overrides.OnGetResources().Return(resources) overrides.OnGetExtendedResources().Return(extendedResources) diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go index 900091f78a..02224ec8a7 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go @@ -169,6 +169,7 @@ func dummyMPITaskContext(taskTemplate *core.TaskTemplate, resources *corev1.Reso taskExecutionMetadata.OnGetK8sServiceAccount().Return(serviceAccount) taskExecutionMetadata.OnGetPlatformResources().Return(&corev1.ResourceRequirements{}) taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) + taskExecutionMetadata.OnGetConsoleURL().Return("") taskCtx.OnTaskExecutionMetadata().Return(taskExecutionMetadata) return taskCtx } diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go index f40f80e1f7..70fcdcdc5c 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go @@ -175,6 +175,7 @@ func dummyPytorchTaskContext(taskTemplate *core.TaskTemplate, resources *corev1. taskExecutionMetadata.OnGetK8sServiceAccount().Return(serviceAccount) taskExecutionMetadata.OnGetPlatformResources().Return(&corev1.ResourceRequirements{}) taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) + taskExecutionMetadata.OnGetConsoleURL().Return("") taskCtx.OnTaskExecutionMetadata().Return(taskExecutionMetadata) return taskCtx } diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go index a85ce8f875..0cf0f34fd2 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go @@ -170,6 +170,7 @@ func dummyTensorFlowTaskContext(taskTemplate *core.TaskTemplate, resources *core taskExecutionMetadata.OnGetK8sServiceAccount().Return(serviceAccount) taskExecutionMetadata.OnGetPlatformResources().Return(&corev1.ResourceRequirements{}) taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) + taskExecutionMetadata.OnGetConsoleURL().Return("") taskCtx.OnTaskExecutionMetadata().Return(taskExecutionMetadata) return taskCtx } diff --git a/flyteplugins/go/tasks/plugins/k8s/pod/container_test.go b/flyteplugins/go/tasks/plugins/k8s/pod/container_test.go index 9c098bd708..5d89e2f0ec 100644 --- a/flyteplugins/go/tasks/plugins/k8s/pod/container_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/pod/container_test.go @@ -122,6 +122,7 @@ func dummyContainerTaskMetadata(resources *v1.ResourceRequirements, extendedReso taskMetadata.On("GetOverrides").Return(to) taskMetadata.On("IsInterruptible").Return(true) taskMetadata.On("GetEnvironmentVariables").Return(nil) + taskMetadata.OnGetConsoleURL().Return("") return taskMetadata } diff --git a/flyteplugins/go/tasks/plugins/k8s/pod/sidecar_test.go b/flyteplugins/go/tasks/plugins/k8s/pod/sidecar_test.go index 06166d15fb..e6b8b0478b 100644 --- a/flyteplugins/go/tasks/plugins/k8s/pod/sidecar_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/pod/sidecar_test.go @@ -93,6 +93,7 @@ func dummySidecarTaskMetadata(resources *v1.ResourceRequirements, extendedResour to.On("GetContainerImage").Return("") taskMetadata.On("GetOverrides").Return(to) taskMetadata.On("GetEnvironmentVariables").Return(nil) + taskMetadata.On("GetConsoleURL").Return("") return taskMetadata } diff --git a/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go b/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go index cb69e883c2..28f4749625 100644 --- a/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go @@ -159,6 +159,7 @@ func dummyRayTaskContext(taskTemplate *core.TaskTemplate, resources *corev1.Reso RunAs: &core.Identity{K8SServiceAccount: serviceAccount}, }) taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) + taskExecutionMetadata.OnGetConsoleURL().Return("") taskCtx.OnTaskExecutionMetadata().Return(taskExecutionMetadata) return taskCtx } diff --git a/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go b/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go index 561901226a..2b481834db 100644 --- a/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go @@ -405,6 +405,7 @@ func dummySparkTaskContext(taskTemplate *core.TaskTemplate, interruptible bool) taskExecutionMetadata.On("GetPlatformResources").Return(nil) taskExecutionMetadata.On("GetOverrides").Return(overrides) taskExecutionMetadata.On("GetK8sServiceAccount").Return("new-val") + taskExecutionMetadata.On("GetConsoleURL").Return("") taskCtx.On("TaskExecutionMetadata").Return(taskExecutionMetadata) return taskCtx } diff --git a/flyteplugins/tests/end_to_end.go b/flyteplugins/tests/end_to_end.go index 732241953d..b045deae13 100644 --- a/flyteplugins/tests/end_to_end.go +++ b/flyteplugins/tests/end_to_end.go @@ -171,6 +171,7 @@ func RunPluginEndToEndTest(t *testing.T, executor pluginCore.Plugin, template *i tMeta.OnGetPlatformResources().Return(&v1.ResourceRequirements{}) tMeta.OnGetInterruptibleFailureThreshold().Return(2) tMeta.OnGetEnvironmentVariables().Return(nil) + tMeta.OnGetConsoleURL().Return("") catClient := &catalogMocks.Client{} catData := sync.Map{} diff --git a/flytepropeller/cmd/kubectl-flyte/cmd/printers/workflow.go b/flytepropeller/cmd/kubectl-flyte/cmd/printers/workflow.go index ff881c938e..24d750661e 100644 --- a/flytepropeller/cmd/kubectl-flyte/cmd/printers/workflow.go +++ b/flytepropeller/cmd/kubectl-flyte/cmd/printers/workflow.go @@ -47,6 +47,8 @@ func (w *ContextualWorkflow) GetExecutionConfig() v1alpha1.ExecutionConfig { return v1alpha1.ExecutionConfig{} } +func (w *ContextualWorkflow) GetConsoleURL() string { return "" } + type WorkflowPrinter struct { } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go index f92cca4a5a..ef402d724d 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go @@ -511,6 +511,7 @@ type Meta interface { GetEventVersion() EventVersion GetDefinitionVersion() WorkflowDefinitionVersion GetRawOutputDataConfig() RawOutputDataConfig + GetConsoleURL() string } type TaskDetailsGetter interface { diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go index b417e2f892..093a93ac2d 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go @@ -163,6 +163,38 @@ func (_m *ExecutableWorkflow) GetConnections() *v1alpha1.Connections { return r0 } +type ExecutableWorkflow_GetConsoleURL struct { + *mock.Call +} + +func (_m ExecutableWorkflow_GetConsoleURL) Return(_a0 string) *ExecutableWorkflow_GetConsoleURL { + return &ExecutableWorkflow_GetConsoleURL{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableWorkflow) OnGetConsoleURL() *ExecutableWorkflow_GetConsoleURL { + c_call := _m.On("GetConsoleURL") + return &ExecutableWorkflow_GetConsoleURL{Call: c_call} +} + +func (_m *ExecutableWorkflow) OnGetConsoleURLMatch(matchers ...interface{}) *ExecutableWorkflow_GetConsoleURL { + c_call := _m.On("GetConsoleURL", matchers...) + return &ExecutableWorkflow_GetConsoleURL{Call: c_call} +} + +// GetConsoleURL provides a mock function with given fields: +func (_m *ExecutableWorkflow) GetConsoleURL() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + type ExecutableWorkflow_GetCreationTimestamp struct { *mock.Call } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/Meta.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/Meta.go index e99227b099..4e098aab2f 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/Meta.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/Meta.go @@ -52,6 +52,38 @@ func (_m *Meta) GetAnnotations() map[string]string { return r0 } +type Meta_GetConsoleURL struct { + *mock.Call +} + +func (_m Meta_GetConsoleURL) Return(_a0 string) *Meta_GetConsoleURL { + return &Meta_GetConsoleURL{Call: _m.Call.Return(_a0)} +} + +func (_m *Meta) OnGetConsoleURL() *Meta_GetConsoleURL { + c_call := _m.On("GetConsoleURL") + return &Meta_GetConsoleURL{Call: c_call} +} + +func (_m *Meta) OnGetConsoleURLMatch(matchers ...interface{}) *Meta_GetConsoleURL { + c_call := _m.On("GetConsoleURL", matchers...) + return &Meta_GetConsoleURL{Call: c_call} +} + +// GetConsoleURL provides a mock function with given fields: +func (_m *Meta) GetConsoleURL() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + type Meta_GetCreationTimestamp struct { *mock.Call } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go index 50e478b6d4..95915088da 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go @@ -86,6 +86,38 @@ func (_m *MetaExtended) GetAnnotations() map[string]string { return r0 } +type MetaExtended_GetConsoleURL struct { + *mock.Call +} + +func (_m MetaExtended_GetConsoleURL) Return(_a0 string) *MetaExtended_GetConsoleURL { + return &MetaExtended_GetConsoleURL{Call: _m.Call.Return(_a0)} +} + +func (_m *MetaExtended) OnGetConsoleURL() *MetaExtended_GetConsoleURL { + c_call := _m.On("GetConsoleURL") + return &MetaExtended_GetConsoleURL{Call: c_call} +} + +func (_m *MetaExtended) OnGetConsoleURLMatch(matchers ...interface{}) *MetaExtended_GetConsoleURL { + c_call := _m.On("GetConsoleURL", matchers...) + return &MetaExtended_GetConsoleURL{Call: c_call} +} + +// GetConsoleURL provides a mock function with given fields: +func (_m *MetaExtended) GetConsoleURL() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + type MetaExtended_GetCreationTimestamp struct { *mock.Call } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go index 225a49ac3f..1d45dc6578 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go @@ -77,6 +77,9 @@ type FlyteWorkflow struct { // portions of the CRD to an external data store to reduce CRD size. If this exists, FlytePropeller must retrieve // and parse the static data prior to processing. WorkflowClosureReference DataReference `json:"workflowClosureReference,omitempty"` + + // Flyteconsole url + ConsoleURL string `json:"consoleUrl,omitempty"` } func (in *FlyteWorkflow) GetSecurityContext() core.SecurityContext { @@ -102,6 +105,8 @@ func (in *FlyteWorkflow) GetExecutionConfig() ExecutionConfig { return in.ExecutionConfig } +func (in *FlyteWorkflow) GetConsoleURL() string { return in.ConsoleURL } + type WorkflowMeta struct { EventVersion EventVersion `json:"eventVersion,omitempty"` } diff --git a/flytepropeller/pkg/controller/executors/execution_context.go b/flytepropeller/pkg/controller/executors/execution_context.go index 84799a0400..07b5a6c450 100644 --- a/flytepropeller/pkg/controller/executors/execution_context.go +++ b/flytepropeller/pkg/controller/executors/execution_context.go @@ -4,7 +4,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -// go:generate mockery -case=underscore +//go:generate mockery-v2 --case=underscore --with-expecter --name ExecutionContext --output=mocks type TaskDetailsGetter interface { GetTask(id v1alpha1.TaskID) (v1alpha1.ExecutableTask, error) diff --git a/flytepropeller/pkg/controller/executors/mocks/execution_context.go b/flytepropeller/pkg/controller/executors/mocks/execution_context.go index cf9f4bcb49..cbcd501525 100644 --- a/flytepropeller/pkg/controller/executors/mocks/execution_context.go +++ b/flytepropeller/pkg/controller/executors/mocks/execution_context.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.1. DO NOT EDIT. +// Code generated by mockery v2.40.3. DO NOT EDIT. package mocks @@ -20,28 +20,22 @@ type ExecutionContext struct { mock.Mock } -type ExecutionContext_CurrentNodeExecutionCount struct { - *mock.Call -} - -func (_m ExecutionContext_CurrentNodeExecutionCount) Return(_a0 uint32) *ExecutionContext_CurrentNodeExecutionCount { - return &ExecutionContext_CurrentNodeExecutionCount{Call: _m.Call.Return(_a0)} -} - -func (_m *ExecutionContext) OnCurrentNodeExecutionCount() *ExecutionContext_CurrentNodeExecutionCount { - c_call := _m.On("CurrentNodeExecutionCount") - return &ExecutionContext_CurrentNodeExecutionCount{Call: c_call} +type ExecutionContext_Expecter struct { + mock *mock.Mock } -func (_m *ExecutionContext) OnCurrentNodeExecutionCountMatch(matchers ...interface{}) *ExecutionContext_CurrentNodeExecutionCount { - c_call := _m.On("CurrentNodeExecutionCount", matchers...) - return &ExecutionContext_CurrentNodeExecutionCount{Call: c_call} +func (_m *ExecutionContext) EXPECT() *ExecutionContext_Expecter { + return &ExecutionContext_Expecter{mock: &_m.Mock} } // CurrentNodeExecutionCount provides a mock function with given fields: func (_m *ExecutionContext) CurrentNodeExecutionCount() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CurrentNodeExecutionCount") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -52,28 +46,41 @@ func (_m *ExecutionContext) CurrentNodeExecutionCount() uint32 { return r0 } -type ExecutionContext_CurrentParallelism struct { +// ExecutionContext_CurrentNodeExecutionCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CurrentNodeExecutionCount' +type ExecutionContext_CurrentNodeExecutionCount_Call struct { *mock.Call } -func (_m ExecutionContext_CurrentParallelism) Return(_a0 uint32) *ExecutionContext_CurrentParallelism { - return &ExecutionContext_CurrentParallelism{Call: _m.Call.Return(_a0)} +// CurrentNodeExecutionCount is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) CurrentNodeExecutionCount() *ExecutionContext_CurrentNodeExecutionCount_Call { + return &ExecutionContext_CurrentNodeExecutionCount_Call{Call: _e.mock.On("CurrentNodeExecutionCount")} } -func (_m *ExecutionContext) OnCurrentParallelism() *ExecutionContext_CurrentParallelism { - c_call := _m.On("CurrentParallelism") - return &ExecutionContext_CurrentParallelism{Call: c_call} +func (_c *ExecutionContext_CurrentNodeExecutionCount_Call) Run(run func()) *ExecutionContext_CurrentNodeExecutionCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnCurrentParallelismMatch(matchers ...interface{}) *ExecutionContext_CurrentParallelism { - c_call := _m.On("CurrentParallelism", matchers...) - return &ExecutionContext_CurrentParallelism{Call: c_call} +func (_c *ExecutionContext_CurrentNodeExecutionCount_Call) Return(_a0 uint32) *ExecutionContext_CurrentNodeExecutionCount_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_CurrentNodeExecutionCount_Call) RunAndReturn(run func() uint32) *ExecutionContext_CurrentNodeExecutionCount_Call { + _c.Call.Return(run) + return _c } // CurrentParallelism provides a mock function with given fields: func (_m *ExecutionContext) CurrentParallelism() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CurrentParallelism") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -84,28 +91,41 @@ func (_m *ExecutionContext) CurrentParallelism() uint32 { return r0 } -type ExecutionContext_CurrentTaskExecutionCount struct { +// ExecutionContext_CurrentParallelism_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CurrentParallelism' +type ExecutionContext_CurrentParallelism_Call struct { *mock.Call } -func (_m ExecutionContext_CurrentTaskExecutionCount) Return(_a0 uint32) *ExecutionContext_CurrentTaskExecutionCount { - return &ExecutionContext_CurrentTaskExecutionCount{Call: _m.Call.Return(_a0)} +// CurrentParallelism is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) CurrentParallelism() *ExecutionContext_CurrentParallelism_Call { + return &ExecutionContext_CurrentParallelism_Call{Call: _e.mock.On("CurrentParallelism")} +} + +func (_c *ExecutionContext_CurrentParallelism_Call) Run(run func()) *ExecutionContext_CurrentParallelism_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnCurrentTaskExecutionCount() *ExecutionContext_CurrentTaskExecutionCount { - c_call := _m.On("CurrentTaskExecutionCount") - return &ExecutionContext_CurrentTaskExecutionCount{Call: c_call} +func (_c *ExecutionContext_CurrentParallelism_Call) Return(_a0 uint32) *ExecutionContext_CurrentParallelism_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnCurrentTaskExecutionCountMatch(matchers ...interface{}) *ExecutionContext_CurrentTaskExecutionCount { - c_call := _m.On("CurrentTaskExecutionCount", matchers...) - return &ExecutionContext_CurrentTaskExecutionCount{Call: c_call} +func (_c *ExecutionContext_CurrentParallelism_Call) RunAndReturn(run func() uint32) *ExecutionContext_CurrentParallelism_Call { + _c.Call.Return(run) + return _c } // CurrentTaskExecutionCount provides a mock function with given fields: func (_m *ExecutionContext) CurrentTaskExecutionCount() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CurrentTaskExecutionCount") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -116,28 +136,41 @@ func (_m *ExecutionContext) CurrentTaskExecutionCount() uint32 { return r0 } -type ExecutionContext_FindSubWorkflow struct { +// ExecutionContext_CurrentTaskExecutionCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CurrentTaskExecutionCount' +type ExecutionContext_CurrentTaskExecutionCount_Call struct { *mock.Call } -func (_m ExecutionContext_FindSubWorkflow) Return(_a0 v1alpha1.ExecutableSubWorkflow) *ExecutionContext_FindSubWorkflow { - return &ExecutionContext_FindSubWorkflow{Call: _m.Call.Return(_a0)} +// CurrentTaskExecutionCount is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) CurrentTaskExecutionCount() *ExecutionContext_CurrentTaskExecutionCount_Call { + return &ExecutionContext_CurrentTaskExecutionCount_Call{Call: _e.mock.On("CurrentTaskExecutionCount")} } -func (_m *ExecutionContext) OnFindSubWorkflow(subID string) *ExecutionContext_FindSubWorkflow { - c_call := _m.On("FindSubWorkflow", subID) - return &ExecutionContext_FindSubWorkflow{Call: c_call} +func (_c *ExecutionContext_CurrentTaskExecutionCount_Call) Run(run func()) *ExecutionContext_CurrentTaskExecutionCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnFindSubWorkflowMatch(matchers ...interface{}) *ExecutionContext_FindSubWorkflow { - c_call := _m.On("FindSubWorkflow", matchers...) - return &ExecutionContext_FindSubWorkflow{Call: c_call} +func (_c *ExecutionContext_CurrentTaskExecutionCount_Call) Return(_a0 uint32) *ExecutionContext_CurrentTaskExecutionCount_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_CurrentTaskExecutionCount_Call) RunAndReturn(run func() uint32) *ExecutionContext_CurrentTaskExecutionCount_Call { + _c.Call.Return(run) + return _c } // FindSubWorkflow provides a mock function with given fields: subID func (_m *ExecutionContext) FindSubWorkflow(subID string) v1alpha1.ExecutableSubWorkflow { ret := _m.Called(subID) + if len(ret) == 0 { + panic("no return value specified for FindSubWorkflow") + } + var r0 v1alpha1.ExecutableSubWorkflow if rf, ok := ret.Get(0).(func(string) v1alpha1.ExecutableSubWorkflow); ok { r0 = rf(subID) @@ -150,28 +183,42 @@ func (_m *ExecutionContext) FindSubWorkflow(subID string) v1alpha1.ExecutableSub return r0 } -type ExecutionContext_GetAnnotations struct { +// ExecutionContext_FindSubWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindSubWorkflow' +type ExecutionContext_FindSubWorkflow_Call struct { *mock.Call } -func (_m ExecutionContext_GetAnnotations) Return(_a0 map[string]string) *ExecutionContext_GetAnnotations { - return &ExecutionContext_GetAnnotations{Call: _m.Call.Return(_a0)} +// FindSubWorkflow is a helper method to define mock.On call +// - subID string +func (_e *ExecutionContext_Expecter) FindSubWorkflow(subID interface{}) *ExecutionContext_FindSubWorkflow_Call { + return &ExecutionContext_FindSubWorkflow_Call{Call: _e.mock.On("FindSubWorkflow", subID)} } -func (_m *ExecutionContext) OnGetAnnotations() *ExecutionContext_GetAnnotations { - c_call := _m.On("GetAnnotations") - return &ExecutionContext_GetAnnotations{Call: c_call} +func (_c *ExecutionContext_FindSubWorkflow_Call) Run(run func(subID string)) *ExecutionContext_FindSubWorkflow_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c } -func (_m *ExecutionContext) OnGetAnnotationsMatch(matchers ...interface{}) *ExecutionContext_GetAnnotations { - c_call := _m.On("GetAnnotations", matchers...) - return &ExecutionContext_GetAnnotations{Call: c_call} +func (_c *ExecutionContext_FindSubWorkflow_Call) Return(_a0 v1alpha1.ExecutableSubWorkflow) *ExecutionContext_FindSubWorkflow_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_FindSubWorkflow_Call) RunAndReturn(run func(string) v1alpha1.ExecutableSubWorkflow) *ExecutionContext_FindSubWorkflow_Call { + _c.Call.Return(run) + return _c } // GetAnnotations provides a mock function with given fields: func (_m *ExecutionContext) GetAnnotations() map[string]string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAnnotations") + } + var r0 map[string]string if rf, ok := ret.Get(0).(func() map[string]string); ok { r0 = rf() @@ -184,28 +231,86 @@ func (_m *ExecutionContext) GetAnnotations() map[string]string { return r0 } -type ExecutionContext_GetCreationTimestamp struct { +// ExecutionContext_GetAnnotations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnnotations' +type ExecutionContext_GetAnnotations_Call struct { *mock.Call } -func (_m ExecutionContext_GetCreationTimestamp) Return(_a0 v1.Time) *ExecutionContext_GetCreationTimestamp { - return &ExecutionContext_GetCreationTimestamp{Call: _m.Call.Return(_a0)} +// GetAnnotations is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetAnnotations() *ExecutionContext_GetAnnotations_Call { + return &ExecutionContext_GetAnnotations_Call{Call: _e.mock.On("GetAnnotations")} +} + +func (_c *ExecutionContext_GetAnnotations_Call) Run(run func()) *ExecutionContext_GetAnnotations_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetCreationTimestamp() *ExecutionContext_GetCreationTimestamp { - c_call := _m.On("GetCreationTimestamp") - return &ExecutionContext_GetCreationTimestamp{Call: c_call} +func (_c *ExecutionContext_GetAnnotations_Call) Return(_a0 map[string]string) *ExecutionContext_GetAnnotations_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetCreationTimestampMatch(matchers ...interface{}) *ExecutionContext_GetCreationTimestamp { - c_call := _m.On("GetCreationTimestamp", matchers...) - return &ExecutionContext_GetCreationTimestamp{Call: c_call} +func (_c *ExecutionContext_GetAnnotations_Call) RunAndReturn(run func() map[string]string) *ExecutionContext_GetAnnotations_Call { + _c.Call.Return(run) + return _c +} + +// GetConsoleURL provides a mock function with given fields: +func (_m *ExecutionContext) GetConsoleURL() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetConsoleURL") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// ExecutionContext_GetConsoleURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConsoleURL' +type ExecutionContext_GetConsoleURL_Call struct { + *mock.Call +} + +// GetConsoleURL is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetConsoleURL() *ExecutionContext_GetConsoleURL_Call { + return &ExecutionContext_GetConsoleURL_Call{Call: _e.mock.On("GetConsoleURL")} +} + +func (_c *ExecutionContext_GetConsoleURL_Call) Run(run func()) *ExecutionContext_GetConsoleURL_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionContext_GetConsoleURL_Call) Return(_a0 string) *ExecutionContext_GetConsoleURL_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetConsoleURL_Call) RunAndReturn(run func() string) *ExecutionContext_GetConsoleURL_Call { + _c.Call.Return(run) + return _c } // GetCreationTimestamp provides a mock function with given fields: func (_m *ExecutionContext) GetCreationTimestamp() v1.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCreationTimestamp") + } + var r0 v1.Time if rf, ok := ret.Get(0).(func() v1.Time); ok { r0 = rf() @@ -216,28 +321,41 @@ func (_m *ExecutionContext) GetCreationTimestamp() v1.Time { return r0 } -type ExecutionContext_GetDefinitionVersion struct { +// ExecutionContext_GetCreationTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCreationTimestamp' +type ExecutionContext_GetCreationTimestamp_Call struct { *mock.Call } -func (_m ExecutionContext_GetDefinitionVersion) Return(_a0 v1alpha1.WorkflowDefinitionVersion) *ExecutionContext_GetDefinitionVersion { - return &ExecutionContext_GetDefinitionVersion{Call: _m.Call.Return(_a0)} +// GetCreationTimestamp is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetCreationTimestamp() *ExecutionContext_GetCreationTimestamp_Call { + return &ExecutionContext_GetCreationTimestamp_Call{Call: _e.mock.On("GetCreationTimestamp")} } -func (_m *ExecutionContext) OnGetDefinitionVersion() *ExecutionContext_GetDefinitionVersion { - c_call := _m.On("GetDefinitionVersion") - return &ExecutionContext_GetDefinitionVersion{Call: c_call} +func (_c *ExecutionContext_GetCreationTimestamp_Call) Run(run func()) *ExecutionContext_GetCreationTimestamp_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetDefinitionVersionMatch(matchers ...interface{}) *ExecutionContext_GetDefinitionVersion { - c_call := _m.On("GetDefinitionVersion", matchers...) - return &ExecutionContext_GetDefinitionVersion{Call: c_call} +func (_c *ExecutionContext_GetCreationTimestamp_Call) Return(_a0 v1.Time) *ExecutionContext_GetCreationTimestamp_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetCreationTimestamp_Call) RunAndReturn(run func() v1.Time) *ExecutionContext_GetCreationTimestamp_Call { + _c.Call.Return(run) + return _c } // GetDefinitionVersion provides a mock function with given fields: func (_m *ExecutionContext) GetDefinitionVersion() v1alpha1.WorkflowDefinitionVersion { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetDefinitionVersion") + } + var r0 v1alpha1.WorkflowDefinitionVersion if rf, ok := ret.Get(0).(func() v1alpha1.WorkflowDefinitionVersion); ok { r0 = rf() @@ -248,28 +366,41 @@ func (_m *ExecutionContext) GetDefinitionVersion() v1alpha1.WorkflowDefinitionVe return r0 } -type ExecutionContext_GetEventVersion struct { +// ExecutionContext_GetDefinitionVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefinitionVersion' +type ExecutionContext_GetDefinitionVersion_Call struct { *mock.Call } -func (_m ExecutionContext_GetEventVersion) Return(_a0 v1alpha1.EventVersion) *ExecutionContext_GetEventVersion { - return &ExecutionContext_GetEventVersion{Call: _m.Call.Return(_a0)} +// GetDefinitionVersion is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetDefinitionVersion() *ExecutionContext_GetDefinitionVersion_Call { + return &ExecutionContext_GetDefinitionVersion_Call{Call: _e.mock.On("GetDefinitionVersion")} } -func (_m *ExecutionContext) OnGetEventVersion() *ExecutionContext_GetEventVersion { - c_call := _m.On("GetEventVersion") - return &ExecutionContext_GetEventVersion{Call: c_call} +func (_c *ExecutionContext_GetDefinitionVersion_Call) Run(run func()) *ExecutionContext_GetDefinitionVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetEventVersionMatch(matchers ...interface{}) *ExecutionContext_GetEventVersion { - c_call := _m.On("GetEventVersion", matchers...) - return &ExecutionContext_GetEventVersion{Call: c_call} +func (_c *ExecutionContext_GetDefinitionVersion_Call) Return(_a0 v1alpha1.WorkflowDefinitionVersion) *ExecutionContext_GetDefinitionVersion_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetDefinitionVersion_Call) RunAndReturn(run func() v1alpha1.WorkflowDefinitionVersion) *ExecutionContext_GetDefinitionVersion_Call { + _c.Call.Return(run) + return _c } // GetEventVersion provides a mock function with given fields: func (_m *ExecutionContext) GetEventVersion() v1alpha1.EventVersion { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetEventVersion") + } + var r0 v1alpha1.EventVersion if rf, ok := ret.Get(0).(func() v1alpha1.EventVersion); ok { r0 = rf() @@ -280,28 +411,41 @@ func (_m *ExecutionContext) GetEventVersion() v1alpha1.EventVersion { return r0 } -type ExecutionContext_GetExecutionConfig struct { +// ExecutionContext_GetEventVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEventVersion' +type ExecutionContext_GetEventVersion_Call struct { *mock.Call } -func (_m ExecutionContext_GetExecutionConfig) Return(_a0 v1alpha1.ExecutionConfig) *ExecutionContext_GetExecutionConfig { - return &ExecutionContext_GetExecutionConfig{Call: _m.Call.Return(_a0)} +// GetEventVersion is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetEventVersion() *ExecutionContext_GetEventVersion_Call { + return &ExecutionContext_GetEventVersion_Call{Call: _e.mock.On("GetEventVersion")} +} + +func (_c *ExecutionContext_GetEventVersion_Call) Run(run func()) *ExecutionContext_GetEventVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetExecutionConfig() *ExecutionContext_GetExecutionConfig { - c_call := _m.On("GetExecutionConfig") - return &ExecutionContext_GetExecutionConfig{Call: c_call} +func (_c *ExecutionContext_GetEventVersion_Call) Return(_a0 v1alpha1.EventVersion) *ExecutionContext_GetEventVersion_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetExecutionConfigMatch(matchers ...interface{}) *ExecutionContext_GetExecutionConfig { - c_call := _m.On("GetExecutionConfig", matchers...) - return &ExecutionContext_GetExecutionConfig{Call: c_call} +func (_c *ExecutionContext_GetEventVersion_Call) RunAndReturn(run func() v1alpha1.EventVersion) *ExecutionContext_GetEventVersion_Call { + _c.Call.Return(run) + return _c } // GetExecutionConfig provides a mock function with given fields: func (_m *ExecutionContext) GetExecutionConfig() v1alpha1.ExecutionConfig { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetExecutionConfig") + } + var r0 v1alpha1.ExecutionConfig if rf, ok := ret.Get(0).(func() v1alpha1.ExecutionConfig); ok { r0 = rf() @@ -312,28 +456,41 @@ func (_m *ExecutionContext) GetExecutionConfig() v1alpha1.ExecutionConfig { return r0 } -type ExecutionContext_GetExecutionID struct { +// ExecutionContext_GetExecutionConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExecutionConfig' +type ExecutionContext_GetExecutionConfig_Call struct { *mock.Call } -func (_m ExecutionContext_GetExecutionID) Return(_a0 v1alpha1.WorkflowExecutionIdentifier) *ExecutionContext_GetExecutionID { - return &ExecutionContext_GetExecutionID{Call: _m.Call.Return(_a0)} +// GetExecutionConfig is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetExecutionConfig() *ExecutionContext_GetExecutionConfig_Call { + return &ExecutionContext_GetExecutionConfig_Call{Call: _e.mock.On("GetExecutionConfig")} +} + +func (_c *ExecutionContext_GetExecutionConfig_Call) Run(run func()) *ExecutionContext_GetExecutionConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetExecutionID() *ExecutionContext_GetExecutionID { - c_call := _m.On("GetExecutionID") - return &ExecutionContext_GetExecutionID{Call: c_call} +func (_c *ExecutionContext_GetExecutionConfig_Call) Return(_a0 v1alpha1.ExecutionConfig) *ExecutionContext_GetExecutionConfig_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetExecutionIDMatch(matchers ...interface{}) *ExecutionContext_GetExecutionID { - c_call := _m.On("GetExecutionID", matchers...) - return &ExecutionContext_GetExecutionID{Call: c_call} +func (_c *ExecutionContext_GetExecutionConfig_Call) RunAndReturn(run func() v1alpha1.ExecutionConfig) *ExecutionContext_GetExecutionConfig_Call { + _c.Call.Return(run) + return _c } // GetExecutionID provides a mock function with given fields: func (_m *ExecutionContext) GetExecutionID() v1alpha1.WorkflowExecutionIdentifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetExecutionID") + } + var r0 v1alpha1.WorkflowExecutionIdentifier if rf, ok := ret.Get(0).(func() v1alpha1.WorkflowExecutionIdentifier); ok { r0 = rf() @@ -344,28 +501,41 @@ func (_m *ExecutionContext) GetExecutionID() v1alpha1.WorkflowExecutionIdentifie return r0 } -type ExecutionContext_GetID struct { +// ExecutionContext_GetExecutionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExecutionID' +type ExecutionContext_GetExecutionID_Call struct { *mock.Call } -func (_m ExecutionContext_GetID) Return(_a0 string) *ExecutionContext_GetID { - return &ExecutionContext_GetID{Call: _m.Call.Return(_a0)} +// GetExecutionID is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetExecutionID() *ExecutionContext_GetExecutionID_Call { + return &ExecutionContext_GetExecutionID_Call{Call: _e.mock.On("GetExecutionID")} } -func (_m *ExecutionContext) OnGetID() *ExecutionContext_GetID { - c_call := _m.On("GetID") - return &ExecutionContext_GetID{Call: c_call} +func (_c *ExecutionContext_GetExecutionID_Call) Run(run func()) *ExecutionContext_GetExecutionID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetIDMatch(matchers ...interface{}) *ExecutionContext_GetID { - c_call := _m.On("GetID", matchers...) - return &ExecutionContext_GetID{Call: c_call} +func (_c *ExecutionContext_GetExecutionID_Call) Return(_a0 v1alpha1.WorkflowExecutionIdentifier) *ExecutionContext_GetExecutionID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetExecutionID_Call) RunAndReturn(run func() v1alpha1.WorkflowExecutionIdentifier) *ExecutionContext_GetExecutionID_Call { + _c.Call.Return(run) + return _c } // GetID provides a mock function with given fields: func (_m *ExecutionContext) GetID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -376,28 +546,41 @@ func (_m *ExecutionContext) GetID() string { return r0 } -type ExecutionContext_GetK8sWorkflowID struct { +// ExecutionContext_GetID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetID' +type ExecutionContext_GetID_Call struct { *mock.Call } -func (_m ExecutionContext_GetK8sWorkflowID) Return(_a0 types.NamespacedName) *ExecutionContext_GetK8sWorkflowID { - return &ExecutionContext_GetK8sWorkflowID{Call: _m.Call.Return(_a0)} +// GetID is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetID() *ExecutionContext_GetID_Call { + return &ExecutionContext_GetID_Call{Call: _e.mock.On("GetID")} +} + +func (_c *ExecutionContext_GetID_Call) Run(run func()) *ExecutionContext_GetID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetK8sWorkflowID() *ExecutionContext_GetK8sWorkflowID { - c_call := _m.On("GetK8sWorkflowID") - return &ExecutionContext_GetK8sWorkflowID{Call: c_call} +func (_c *ExecutionContext_GetID_Call) Return(_a0 string) *ExecutionContext_GetID_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetK8sWorkflowIDMatch(matchers ...interface{}) *ExecutionContext_GetK8sWorkflowID { - c_call := _m.On("GetK8sWorkflowID", matchers...) - return &ExecutionContext_GetK8sWorkflowID{Call: c_call} +func (_c *ExecutionContext_GetID_Call) RunAndReturn(run func() string) *ExecutionContext_GetID_Call { + _c.Call.Return(run) + return _c } // GetK8sWorkflowID provides a mock function with given fields: func (_m *ExecutionContext) GetK8sWorkflowID() types.NamespacedName { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetK8sWorkflowID") + } + var r0 types.NamespacedName if rf, ok := ret.Get(0).(func() types.NamespacedName); ok { r0 = rf() @@ -408,28 +591,41 @@ func (_m *ExecutionContext) GetK8sWorkflowID() types.NamespacedName { return r0 } -type ExecutionContext_GetLabels struct { +// ExecutionContext_GetK8sWorkflowID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetK8sWorkflowID' +type ExecutionContext_GetK8sWorkflowID_Call struct { *mock.Call } -func (_m ExecutionContext_GetLabels) Return(_a0 map[string]string) *ExecutionContext_GetLabels { - return &ExecutionContext_GetLabels{Call: _m.Call.Return(_a0)} +// GetK8sWorkflowID is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetK8sWorkflowID() *ExecutionContext_GetK8sWorkflowID_Call { + return &ExecutionContext_GetK8sWorkflowID_Call{Call: _e.mock.On("GetK8sWorkflowID")} +} + +func (_c *ExecutionContext_GetK8sWorkflowID_Call) Run(run func()) *ExecutionContext_GetK8sWorkflowID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetLabels() *ExecutionContext_GetLabels { - c_call := _m.On("GetLabels") - return &ExecutionContext_GetLabels{Call: c_call} +func (_c *ExecutionContext_GetK8sWorkflowID_Call) Return(_a0 types.NamespacedName) *ExecutionContext_GetK8sWorkflowID_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetLabelsMatch(matchers ...interface{}) *ExecutionContext_GetLabels { - c_call := _m.On("GetLabels", matchers...) - return &ExecutionContext_GetLabels{Call: c_call} +func (_c *ExecutionContext_GetK8sWorkflowID_Call) RunAndReturn(run func() types.NamespacedName) *ExecutionContext_GetK8sWorkflowID_Call { + _c.Call.Return(run) + return _c } // GetLabels provides a mock function with given fields: func (_m *ExecutionContext) GetLabels() map[string]string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetLabels") + } + var r0 map[string]string if rf, ok := ret.Get(0).(func() map[string]string); ok { r0 = rf() @@ -442,28 +638,41 @@ func (_m *ExecutionContext) GetLabels() map[string]string { return r0 } -type ExecutionContext_GetName struct { +// ExecutionContext_GetLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLabels' +type ExecutionContext_GetLabels_Call struct { *mock.Call } -func (_m ExecutionContext_GetName) Return(_a0 string) *ExecutionContext_GetName { - return &ExecutionContext_GetName{Call: _m.Call.Return(_a0)} +// GetLabels is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetLabels() *ExecutionContext_GetLabels_Call { + return &ExecutionContext_GetLabels_Call{Call: _e.mock.On("GetLabels")} } -func (_m *ExecutionContext) OnGetName() *ExecutionContext_GetName { - c_call := _m.On("GetName") - return &ExecutionContext_GetName{Call: c_call} +func (_c *ExecutionContext_GetLabels_Call) Run(run func()) *ExecutionContext_GetLabels_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetNameMatch(matchers ...interface{}) *ExecutionContext_GetName { - c_call := _m.On("GetName", matchers...) - return &ExecutionContext_GetName{Call: c_call} +func (_c *ExecutionContext_GetLabels_Call) Return(_a0 map[string]string) *ExecutionContext_GetLabels_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetLabels_Call) RunAndReturn(run func() map[string]string) *ExecutionContext_GetLabels_Call { + _c.Call.Return(run) + return _c } // GetName provides a mock function with given fields: func (_m *ExecutionContext) GetName() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetName") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -474,28 +683,41 @@ func (_m *ExecutionContext) GetName() string { return r0 } -type ExecutionContext_GetNamespace struct { +// ExecutionContext_GetName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetName' +type ExecutionContext_GetName_Call struct { *mock.Call } -func (_m ExecutionContext_GetNamespace) Return(_a0 string) *ExecutionContext_GetNamespace { - return &ExecutionContext_GetNamespace{Call: _m.Call.Return(_a0)} +// GetName is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetName() *ExecutionContext_GetName_Call { + return &ExecutionContext_GetName_Call{Call: _e.mock.On("GetName")} } -func (_m *ExecutionContext) OnGetNamespace() *ExecutionContext_GetNamespace { - c_call := _m.On("GetNamespace") - return &ExecutionContext_GetNamespace{Call: c_call} +func (_c *ExecutionContext_GetName_Call) Run(run func()) *ExecutionContext_GetName_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetNamespaceMatch(matchers ...interface{}) *ExecutionContext_GetNamespace { - c_call := _m.On("GetNamespace", matchers...) - return &ExecutionContext_GetNamespace{Call: c_call} +func (_c *ExecutionContext_GetName_Call) Return(_a0 string) *ExecutionContext_GetName_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetName_Call) RunAndReturn(run func() string) *ExecutionContext_GetName_Call { + _c.Call.Return(run) + return _c } // GetNamespace provides a mock function with given fields: func (_m *ExecutionContext) GetNamespace() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetNamespace") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -506,28 +728,41 @@ func (_m *ExecutionContext) GetNamespace() string { return r0 } -type ExecutionContext_GetOnFailurePolicy struct { +// ExecutionContext_GetNamespace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNamespace' +type ExecutionContext_GetNamespace_Call struct { *mock.Call } -func (_m ExecutionContext_GetOnFailurePolicy) Return(_a0 v1alpha1.WorkflowOnFailurePolicy) *ExecutionContext_GetOnFailurePolicy { - return &ExecutionContext_GetOnFailurePolicy{Call: _m.Call.Return(_a0)} +// GetNamespace is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetNamespace() *ExecutionContext_GetNamespace_Call { + return &ExecutionContext_GetNamespace_Call{Call: _e.mock.On("GetNamespace")} +} + +func (_c *ExecutionContext_GetNamespace_Call) Run(run func()) *ExecutionContext_GetNamespace_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetOnFailurePolicy() *ExecutionContext_GetOnFailurePolicy { - c_call := _m.On("GetOnFailurePolicy") - return &ExecutionContext_GetOnFailurePolicy{Call: c_call} +func (_c *ExecutionContext_GetNamespace_Call) Return(_a0 string) *ExecutionContext_GetNamespace_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetOnFailurePolicyMatch(matchers ...interface{}) *ExecutionContext_GetOnFailurePolicy { - c_call := _m.On("GetOnFailurePolicy", matchers...) - return &ExecutionContext_GetOnFailurePolicy{Call: c_call} +func (_c *ExecutionContext_GetNamespace_Call) RunAndReturn(run func() string) *ExecutionContext_GetNamespace_Call { + _c.Call.Return(run) + return _c } // GetOnFailurePolicy provides a mock function with given fields: func (_m *ExecutionContext) GetOnFailurePolicy() v1alpha1.WorkflowOnFailurePolicy { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetOnFailurePolicy") + } + var r0 v1alpha1.WorkflowOnFailurePolicy if rf, ok := ret.Get(0).(func() v1alpha1.WorkflowOnFailurePolicy); ok { r0 = rf() @@ -538,28 +773,41 @@ func (_m *ExecutionContext) GetOnFailurePolicy() v1alpha1.WorkflowOnFailurePolic return r0 } -type ExecutionContext_GetOwnerReference struct { +// ExecutionContext_GetOnFailurePolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOnFailurePolicy' +type ExecutionContext_GetOnFailurePolicy_Call struct { *mock.Call } -func (_m ExecutionContext_GetOwnerReference) Return(_a0 v1.OwnerReference) *ExecutionContext_GetOwnerReference { - return &ExecutionContext_GetOwnerReference{Call: _m.Call.Return(_a0)} +// GetOnFailurePolicy is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetOnFailurePolicy() *ExecutionContext_GetOnFailurePolicy_Call { + return &ExecutionContext_GetOnFailurePolicy_Call{Call: _e.mock.On("GetOnFailurePolicy")} +} + +func (_c *ExecutionContext_GetOnFailurePolicy_Call) Run(run func()) *ExecutionContext_GetOnFailurePolicy_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetOwnerReference() *ExecutionContext_GetOwnerReference { - c_call := _m.On("GetOwnerReference") - return &ExecutionContext_GetOwnerReference{Call: c_call} +func (_c *ExecutionContext_GetOnFailurePolicy_Call) Return(_a0 v1alpha1.WorkflowOnFailurePolicy) *ExecutionContext_GetOnFailurePolicy_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetOwnerReferenceMatch(matchers ...interface{}) *ExecutionContext_GetOwnerReference { - c_call := _m.On("GetOwnerReference", matchers...) - return &ExecutionContext_GetOwnerReference{Call: c_call} +func (_c *ExecutionContext_GetOnFailurePolicy_Call) RunAndReturn(run func() v1alpha1.WorkflowOnFailurePolicy) *ExecutionContext_GetOnFailurePolicy_Call { + _c.Call.Return(run) + return _c } // GetOwnerReference provides a mock function with given fields: func (_m *ExecutionContext) GetOwnerReference() v1.OwnerReference { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetOwnerReference") + } + var r0 v1.OwnerReference if rf, ok := ret.Get(0).(func() v1.OwnerReference); ok { r0 = rf() @@ -570,28 +818,41 @@ func (_m *ExecutionContext) GetOwnerReference() v1.OwnerReference { return r0 } -type ExecutionContext_GetParentInfo struct { +// ExecutionContext_GetOwnerReference_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOwnerReference' +type ExecutionContext_GetOwnerReference_Call struct { *mock.Call } -func (_m ExecutionContext_GetParentInfo) Return(_a0 executors.ImmutableParentInfo) *ExecutionContext_GetParentInfo { - return &ExecutionContext_GetParentInfo{Call: _m.Call.Return(_a0)} +// GetOwnerReference is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetOwnerReference() *ExecutionContext_GetOwnerReference_Call { + return &ExecutionContext_GetOwnerReference_Call{Call: _e.mock.On("GetOwnerReference")} } -func (_m *ExecutionContext) OnGetParentInfo() *ExecutionContext_GetParentInfo { - c_call := _m.On("GetParentInfo") - return &ExecutionContext_GetParentInfo{Call: c_call} +func (_c *ExecutionContext_GetOwnerReference_Call) Run(run func()) *ExecutionContext_GetOwnerReference_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetParentInfoMatch(matchers ...interface{}) *ExecutionContext_GetParentInfo { - c_call := _m.On("GetParentInfo", matchers...) - return &ExecutionContext_GetParentInfo{Call: c_call} +func (_c *ExecutionContext_GetOwnerReference_Call) Return(_a0 v1.OwnerReference) *ExecutionContext_GetOwnerReference_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetOwnerReference_Call) RunAndReturn(run func() v1.OwnerReference) *ExecutionContext_GetOwnerReference_Call { + _c.Call.Return(run) + return _c } // GetParentInfo provides a mock function with given fields: func (_m *ExecutionContext) GetParentInfo() executors.ImmutableParentInfo { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetParentInfo") + } + var r0 executors.ImmutableParentInfo if rf, ok := ret.Get(0).(func() executors.ImmutableParentInfo); ok { r0 = rf() @@ -604,28 +865,41 @@ func (_m *ExecutionContext) GetParentInfo() executors.ImmutableParentInfo { return r0 } -type ExecutionContext_GetRawOutputDataConfig struct { +// ExecutionContext_GetParentInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentInfo' +type ExecutionContext_GetParentInfo_Call struct { *mock.Call } -func (_m ExecutionContext_GetRawOutputDataConfig) Return(_a0 v1alpha1.RawOutputDataConfig) *ExecutionContext_GetRawOutputDataConfig { - return &ExecutionContext_GetRawOutputDataConfig{Call: _m.Call.Return(_a0)} +// GetParentInfo is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetParentInfo() *ExecutionContext_GetParentInfo_Call { + return &ExecutionContext_GetParentInfo_Call{Call: _e.mock.On("GetParentInfo")} +} + +func (_c *ExecutionContext_GetParentInfo_Call) Run(run func()) *ExecutionContext_GetParentInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetRawOutputDataConfig() *ExecutionContext_GetRawOutputDataConfig { - c_call := _m.On("GetRawOutputDataConfig") - return &ExecutionContext_GetRawOutputDataConfig{Call: c_call} +func (_c *ExecutionContext_GetParentInfo_Call) Return(_a0 executors.ImmutableParentInfo) *ExecutionContext_GetParentInfo_Call { + _c.Call.Return(_a0) + return _c } -func (_m *ExecutionContext) OnGetRawOutputDataConfigMatch(matchers ...interface{}) *ExecutionContext_GetRawOutputDataConfig { - c_call := _m.On("GetRawOutputDataConfig", matchers...) - return &ExecutionContext_GetRawOutputDataConfig{Call: c_call} +func (_c *ExecutionContext_GetParentInfo_Call) RunAndReturn(run func() executors.ImmutableParentInfo) *ExecutionContext_GetParentInfo_Call { + _c.Call.Return(run) + return _c } // GetRawOutputDataConfig provides a mock function with given fields: func (_m *ExecutionContext) GetRawOutputDataConfig() v1alpha1.RawOutputDataConfig { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRawOutputDataConfig") + } + var r0 v1alpha1.RawOutputDataConfig if rf, ok := ret.Get(0).(func() v1alpha1.RawOutputDataConfig); ok { r0 = rf() @@ -636,28 +910,41 @@ func (_m *ExecutionContext) GetRawOutputDataConfig() v1alpha1.RawOutputDataConfi return r0 } -type ExecutionContext_GetSecurityContext struct { +// ExecutionContext_GetRawOutputDataConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRawOutputDataConfig' +type ExecutionContext_GetRawOutputDataConfig_Call struct { *mock.Call } -func (_m ExecutionContext_GetSecurityContext) Return(_a0 core.SecurityContext) *ExecutionContext_GetSecurityContext { - return &ExecutionContext_GetSecurityContext{Call: _m.Call.Return(_a0)} +// GetRawOutputDataConfig is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetRawOutputDataConfig() *ExecutionContext_GetRawOutputDataConfig_Call { + return &ExecutionContext_GetRawOutputDataConfig_Call{Call: _e.mock.On("GetRawOutputDataConfig")} } -func (_m *ExecutionContext) OnGetSecurityContext() *ExecutionContext_GetSecurityContext { - c_call := _m.On("GetSecurityContext") - return &ExecutionContext_GetSecurityContext{Call: c_call} +func (_c *ExecutionContext_GetRawOutputDataConfig_Call) Run(run func()) *ExecutionContext_GetRawOutputDataConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetSecurityContextMatch(matchers ...interface{}) *ExecutionContext_GetSecurityContext { - c_call := _m.On("GetSecurityContext", matchers...) - return &ExecutionContext_GetSecurityContext{Call: c_call} +func (_c *ExecutionContext_GetRawOutputDataConfig_Call) Return(_a0 v1alpha1.RawOutputDataConfig) *ExecutionContext_GetRawOutputDataConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetRawOutputDataConfig_Call) RunAndReturn(run func() v1alpha1.RawOutputDataConfig) *ExecutionContext_GetRawOutputDataConfig_Call { + _c.Call.Return(run) + return _c } // GetSecurityContext provides a mock function with given fields: func (_m *ExecutionContext) GetSecurityContext() core.SecurityContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetSecurityContext") + } + var r0 core.SecurityContext if rf, ok := ret.Get(0).(func() core.SecurityContext); ok { r0 = rf() @@ -668,28 +955,41 @@ func (_m *ExecutionContext) GetSecurityContext() core.SecurityContext { return r0 } -type ExecutionContext_GetServiceAccountName struct { +// ExecutionContext_GetSecurityContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSecurityContext' +type ExecutionContext_GetSecurityContext_Call struct { *mock.Call } -func (_m ExecutionContext_GetServiceAccountName) Return(_a0 string) *ExecutionContext_GetServiceAccountName { - return &ExecutionContext_GetServiceAccountName{Call: _m.Call.Return(_a0)} +// GetSecurityContext is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetSecurityContext() *ExecutionContext_GetSecurityContext_Call { + return &ExecutionContext_GetSecurityContext_Call{Call: _e.mock.On("GetSecurityContext")} } -func (_m *ExecutionContext) OnGetServiceAccountName() *ExecutionContext_GetServiceAccountName { - c_call := _m.On("GetServiceAccountName") - return &ExecutionContext_GetServiceAccountName{Call: c_call} +func (_c *ExecutionContext_GetSecurityContext_Call) Run(run func()) *ExecutionContext_GetSecurityContext_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetServiceAccountNameMatch(matchers ...interface{}) *ExecutionContext_GetServiceAccountName { - c_call := _m.On("GetServiceAccountName", matchers...) - return &ExecutionContext_GetServiceAccountName{Call: c_call} +func (_c *ExecutionContext_GetSecurityContext_Call) Return(_a0 core.SecurityContext) *ExecutionContext_GetSecurityContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetSecurityContext_Call) RunAndReturn(run func() core.SecurityContext) *ExecutionContext_GetSecurityContext_Call { + _c.Call.Return(run) + return _c } // GetServiceAccountName provides a mock function with given fields: func (_m *ExecutionContext) GetServiceAccountName() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetServiceAccountName") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -700,29 +1000,46 @@ func (_m *ExecutionContext) GetServiceAccountName() string { return r0 } -type ExecutionContext_GetTask struct { +// ExecutionContext_GetServiceAccountName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetServiceAccountName' +type ExecutionContext_GetServiceAccountName_Call struct { *mock.Call } -func (_m ExecutionContext_GetTask) Return(_a0 v1alpha1.ExecutableTask, _a1 error) *ExecutionContext_GetTask { - return &ExecutionContext_GetTask{Call: _m.Call.Return(_a0, _a1)} +// GetServiceAccountName is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) GetServiceAccountName() *ExecutionContext_GetServiceAccountName_Call { + return &ExecutionContext_GetServiceAccountName_Call{Call: _e.mock.On("GetServiceAccountName")} } -func (_m *ExecutionContext) OnGetTask(id string) *ExecutionContext_GetTask { - c_call := _m.On("GetTask", id) - return &ExecutionContext_GetTask{Call: c_call} +func (_c *ExecutionContext_GetServiceAccountName_Call) Run(run func()) *ExecutionContext_GetServiceAccountName_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnGetTaskMatch(matchers ...interface{}) *ExecutionContext_GetTask { - c_call := _m.On("GetTask", matchers...) - return &ExecutionContext_GetTask{Call: c_call} +func (_c *ExecutionContext_GetServiceAccountName_Call) Return(_a0 string) *ExecutionContext_GetServiceAccountName_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_GetServiceAccountName_Call) RunAndReturn(run func() string) *ExecutionContext_GetServiceAccountName_Call { + _c.Call.Return(run) + return _c } // GetTask provides a mock function with given fields: id func (_m *ExecutionContext) GetTask(id string) (v1alpha1.ExecutableTask, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for GetTask") + } + var r0 v1alpha1.ExecutableTask + var r1 error + if rf, ok := ret.Get(0).(func(string) (v1alpha1.ExecutableTask, error)); ok { + return rf(id) + } if rf, ok := ret.Get(0).(func(string) v1alpha1.ExecutableTask); ok { r0 = rf(id) } else { @@ -731,7 +1048,6 @@ func (_m *ExecutionContext) GetTask(id string) (v1alpha1.ExecutableTask, error) } } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(id) } else { @@ -741,28 +1057,42 @@ func (_m *ExecutionContext) GetTask(id string) (v1alpha1.ExecutableTask, error) return r0, r1 } -type ExecutionContext_IncrementNodeExecutionCount struct { +// ExecutionContext_GetTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTask' +type ExecutionContext_GetTask_Call struct { *mock.Call } -func (_m ExecutionContext_IncrementNodeExecutionCount) Return(_a0 uint32) *ExecutionContext_IncrementNodeExecutionCount { - return &ExecutionContext_IncrementNodeExecutionCount{Call: _m.Call.Return(_a0)} +// GetTask is a helper method to define mock.On call +// - id string +func (_e *ExecutionContext_Expecter) GetTask(id interface{}) *ExecutionContext_GetTask_Call { + return &ExecutionContext_GetTask_Call{Call: _e.mock.On("GetTask", id)} +} + +func (_c *ExecutionContext_GetTask_Call) Run(run func(id string)) *ExecutionContext_GetTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c } -func (_m *ExecutionContext) OnIncrementNodeExecutionCount() *ExecutionContext_IncrementNodeExecutionCount { - c_call := _m.On("IncrementNodeExecutionCount") - return &ExecutionContext_IncrementNodeExecutionCount{Call: c_call} +func (_c *ExecutionContext_GetTask_Call) Return(_a0 v1alpha1.ExecutableTask, _a1 error) *ExecutionContext_GetTask_Call { + _c.Call.Return(_a0, _a1) + return _c } -func (_m *ExecutionContext) OnIncrementNodeExecutionCountMatch(matchers ...interface{}) *ExecutionContext_IncrementNodeExecutionCount { - c_call := _m.On("IncrementNodeExecutionCount", matchers...) - return &ExecutionContext_IncrementNodeExecutionCount{Call: c_call} +func (_c *ExecutionContext_GetTask_Call) RunAndReturn(run func(string) (v1alpha1.ExecutableTask, error)) *ExecutionContext_GetTask_Call { + _c.Call.Return(run) + return _c } // IncrementNodeExecutionCount provides a mock function with given fields: func (_m *ExecutionContext) IncrementNodeExecutionCount() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IncrementNodeExecutionCount") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -773,28 +1103,41 @@ func (_m *ExecutionContext) IncrementNodeExecutionCount() uint32 { return r0 } -type ExecutionContext_IncrementParallelism struct { +// ExecutionContext_IncrementNodeExecutionCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementNodeExecutionCount' +type ExecutionContext_IncrementNodeExecutionCount_Call struct { *mock.Call } -func (_m ExecutionContext_IncrementParallelism) Return(_a0 uint32) *ExecutionContext_IncrementParallelism { - return &ExecutionContext_IncrementParallelism{Call: _m.Call.Return(_a0)} +// IncrementNodeExecutionCount is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) IncrementNodeExecutionCount() *ExecutionContext_IncrementNodeExecutionCount_Call { + return &ExecutionContext_IncrementNodeExecutionCount_Call{Call: _e.mock.On("IncrementNodeExecutionCount")} } -func (_m *ExecutionContext) OnIncrementParallelism() *ExecutionContext_IncrementParallelism { - c_call := _m.On("IncrementParallelism") - return &ExecutionContext_IncrementParallelism{Call: c_call} +func (_c *ExecutionContext_IncrementNodeExecutionCount_Call) Run(run func()) *ExecutionContext_IncrementNodeExecutionCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnIncrementParallelismMatch(matchers ...interface{}) *ExecutionContext_IncrementParallelism { - c_call := _m.On("IncrementParallelism", matchers...) - return &ExecutionContext_IncrementParallelism{Call: c_call} +func (_c *ExecutionContext_IncrementNodeExecutionCount_Call) Return(_a0 uint32) *ExecutionContext_IncrementNodeExecutionCount_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_IncrementNodeExecutionCount_Call) RunAndReturn(run func() uint32) *ExecutionContext_IncrementNodeExecutionCount_Call { + _c.Call.Return(run) + return _c } // IncrementParallelism provides a mock function with given fields: func (_m *ExecutionContext) IncrementParallelism() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IncrementParallelism") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -805,28 +1148,41 @@ func (_m *ExecutionContext) IncrementParallelism() uint32 { return r0 } -type ExecutionContext_IncrementTaskExecutionCount struct { +// ExecutionContext_IncrementParallelism_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementParallelism' +type ExecutionContext_IncrementParallelism_Call struct { *mock.Call } -func (_m ExecutionContext_IncrementTaskExecutionCount) Return(_a0 uint32) *ExecutionContext_IncrementTaskExecutionCount { - return &ExecutionContext_IncrementTaskExecutionCount{Call: _m.Call.Return(_a0)} +// IncrementParallelism is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) IncrementParallelism() *ExecutionContext_IncrementParallelism_Call { + return &ExecutionContext_IncrementParallelism_Call{Call: _e.mock.On("IncrementParallelism")} } -func (_m *ExecutionContext) OnIncrementTaskExecutionCount() *ExecutionContext_IncrementTaskExecutionCount { - c_call := _m.On("IncrementTaskExecutionCount") - return &ExecutionContext_IncrementTaskExecutionCount{Call: c_call} +func (_c *ExecutionContext_IncrementParallelism_Call) Run(run func()) *ExecutionContext_IncrementParallelism_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnIncrementTaskExecutionCountMatch(matchers ...interface{}) *ExecutionContext_IncrementTaskExecutionCount { - c_call := _m.On("IncrementTaskExecutionCount", matchers...) - return &ExecutionContext_IncrementTaskExecutionCount{Call: c_call} +func (_c *ExecutionContext_IncrementParallelism_Call) Return(_a0 uint32) *ExecutionContext_IncrementParallelism_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_IncrementParallelism_Call) RunAndReturn(run func() uint32) *ExecutionContext_IncrementParallelism_Call { + _c.Call.Return(run) + return _c } // IncrementTaskExecutionCount provides a mock function with given fields: func (_m *ExecutionContext) IncrementTaskExecutionCount() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IncrementTaskExecutionCount") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -837,28 +1193,41 @@ func (_m *ExecutionContext) IncrementTaskExecutionCount() uint32 { return r0 } -type ExecutionContext_IsInterruptible struct { +// ExecutionContext_IncrementTaskExecutionCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementTaskExecutionCount' +type ExecutionContext_IncrementTaskExecutionCount_Call struct { *mock.Call } -func (_m ExecutionContext_IsInterruptible) Return(_a0 bool) *ExecutionContext_IsInterruptible { - return &ExecutionContext_IsInterruptible{Call: _m.Call.Return(_a0)} +// IncrementTaskExecutionCount is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) IncrementTaskExecutionCount() *ExecutionContext_IncrementTaskExecutionCount_Call { + return &ExecutionContext_IncrementTaskExecutionCount_Call{Call: _e.mock.On("IncrementTaskExecutionCount")} } -func (_m *ExecutionContext) OnIsInterruptible() *ExecutionContext_IsInterruptible { - c_call := _m.On("IsInterruptible") - return &ExecutionContext_IsInterruptible{Call: c_call} +func (_c *ExecutionContext_IncrementTaskExecutionCount_Call) Run(run func()) *ExecutionContext_IncrementTaskExecutionCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c } -func (_m *ExecutionContext) OnIsInterruptibleMatch(matchers ...interface{}) *ExecutionContext_IsInterruptible { - c_call := _m.On("IsInterruptible", matchers...) - return &ExecutionContext_IsInterruptible{Call: c_call} +func (_c *ExecutionContext_IncrementTaskExecutionCount_Call) Return(_a0 uint32) *ExecutionContext_IncrementTaskExecutionCount_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_IncrementTaskExecutionCount_Call) RunAndReturn(run func() uint32) *ExecutionContext_IncrementTaskExecutionCount_Call { + _c.Call.Return(run) + return _c } // IsInterruptible provides a mock function with given fields: func (_m *ExecutionContext) IsInterruptible() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsInterruptible") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -868,3 +1237,44 @@ func (_m *ExecutionContext) IsInterruptible() bool { return r0 } + +// ExecutionContext_IsInterruptible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInterruptible' +type ExecutionContext_IsInterruptible_Call struct { + *mock.Call +} + +// IsInterruptible is a helper method to define mock.On call +func (_e *ExecutionContext_Expecter) IsInterruptible() *ExecutionContext_IsInterruptible_Call { + return &ExecutionContext_IsInterruptible_Call{Call: _e.mock.On("IsInterruptible")} +} + +func (_c *ExecutionContext_IsInterruptible_Call) Run(run func()) *ExecutionContext_IsInterruptible_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionContext_IsInterruptible_Call) Return(_a0 bool) *ExecutionContext_IsInterruptible_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionContext_IsInterruptible_Call) RunAndReturn(run func() bool) *ExecutionContext_IsInterruptible_Call { + _c.Call.Return(run) + return _c +} + +// NewExecutionContext creates a new instance of ExecutionContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewExecutionContext(t interface { + mock.TestingT + Cleanup(func()) +}) *ExecutionContext { + mock := &ExecutionContext{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/flytepropeller/pkg/controller/nodes/array/handler_test.go b/flytepropeller/pkg/controller/nodes/array/handler_test.go index ba0815fee6..e906318975 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/array/handler_test.go @@ -91,11 +91,11 @@ func createNodeExecutionContext(dataStore *storage.DataStore, eventRecorder inte // ExecutionContext executionContext := &execmocks.ExecutionContext{} - executionContext.OnGetEventVersion().Return(1) - executionContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{ + executionContext.EXPECT().GetEventVersion().Return(1) + executionContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{ MaxParallelism: maxParallelism, }) - executionContext.OnGetExecutionID().Return( + executionContext.EXPECT().GetExecutionID().Return( v1alpha1.ExecutionID{ WorkflowExecutionIdentifier: &idlcore.WorkflowExecutionIdentifier{ Project: "project", @@ -103,15 +103,15 @@ func createNodeExecutionContext(dataStore *storage.DataStore, eventRecorder inte Name: "name", }, }) - executionContext.OnGetLabels().Return(nil) - executionContext.OnGetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{}) - executionContext.OnIsInterruptible().Return(false) - executionContext.OnGetParentInfo().Return(nil) + executionContext.EXPECT().GetLabels().Return(nil) + executionContext.EXPECT().GetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{}) + executionContext.EXPECT().IsInterruptible().Return(false) + executionContext.EXPECT().GetParentInfo().Return(nil) outputVariableMap := make(map[string]*idlcore.Variable) for _, outputVariable := range outputVariables { outputVariableMap[outputVariable] = &idlcore.Variable{} } - executionContext.OnGetTaskMatch(taskRef).Return( + executionContext.EXPECT().GetTask(taskRef).Return( &v1alpha1.TaskSpec{ TaskTemplate: &idlcore.TaskTemplate{ Interface: &idlcore.TypedInterface{ @@ -123,12 +123,12 @@ func createNodeExecutionContext(dataStore *storage.DataStore, eventRecorder inte }, nil, ) - executionContext.OnCurrentParallelism().Return(currentParallelism) + executionContext.EXPECT().CurrentParallelism().Return(currentParallelism) executionContext.On("IncrementParallelism").Run(func(args mock.Arguments) {}).Return(currentParallelism) - executionContext.OnIncrementNodeExecutionCount().Return(1) - executionContext.OnIncrementTaskExecutionCount().Return(1) - executionContext.OnCurrentNodeExecutionCount().Return(1) - executionContext.OnCurrentTaskExecutionCount().Return(1) + executionContext.EXPECT().IncrementNodeExecutionCount().Return(1) + executionContext.EXPECT().IncrementTaskExecutionCount().Return(1) + executionContext.EXPECT().CurrentNodeExecutionCount().Return(1) + executionContext.EXPECT().CurrentTaskExecutionCount().Return(1) nCtx.OnExecutionContext().Return(executionContext) // EventsRecorder diff --git a/flytepropeller/pkg/controller/nodes/branch/handler_test.go b/flytepropeller/pkg/controller/nodes/branch/handler_test.go index dfe0338fc1..b26dd004c4 100644 --- a/flytepropeller/pkg/controller/nodes/branch/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/branch/handler_test.go @@ -181,7 +181,7 @@ func TestBranchHandler_RecurseDownstream(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetParentInfo().Return(parentInfo{}) + eCtx.EXPECT().GetParentInfo().Return(parentInfo{}) mockNodeLookup := &execMocks.NodeLookup{} if len(test.upstreamNodeID) > 0 { @@ -305,7 +305,7 @@ func TestBranchHandler_AbortNode(t *testing.T) { mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("err")) eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetParentInfo().Return(nil) + eCtx.EXPECT().GetParentInfo().Return(nil) nCtx, _ := createNodeContext(v1alpha1.BranchNodeError, nil, n, nil, nil, eCtx) branch := New(mockNodeExecutor, eventConfig, promutils.NewTestScope()) err := branch.Abort(ctx, nCtx, "") @@ -317,7 +317,7 @@ func TestBranchHandler_AbortNode(t *testing.T) { mockNodeLookup := &execMocks.NodeLookup{} mockNodeLookup.OnToNodeMatch(mock.Anything).Return(nil, nil) eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetParentInfo().Return(parentInfo{}) + eCtx.EXPECT().GetParentInfo().Return(parentInfo{}) nCtx, s := createNodeContext(v1alpha1.BranchNodeSuccess, &n1, n, nil, mockNodeLookup, eCtx) newParentInfo, _ := common.CreateParentInfo(parentInfo{}, nCtx.NodeID(), nCtx.CurrentAttempt()) expectedExecContext := executors.NewExecutionContextWithParentInfo(nCtx.ExecutionContext(), newParentInfo) @@ -378,7 +378,7 @@ func TestBranchHandler_HandleNode(t *testing.T) { n.OnGetBranchNode().Return(nil) n.OnGetID().Return("n1") eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetParentInfo().Return(nil) + eCtx.EXPECT().GetParentInfo().Return(nil) nCtx, _ := createNodeContext(v1alpha1.BranchNodeSuccess, &childNodeID, n, inputs, nil, eCtx) s, err := branch.Handle(ctx, nCtx) diff --git a/flytepropeller/pkg/controller/nodes/cache_test.go b/flytepropeller/pkg/controller/nodes/cache_test.go index 1f2c615af2..05d6ecfeaa 100644 --- a/flytepropeller/pkg/controller/nodes/cache_test.go +++ b/flytepropeller/pkg/controller/nodes/cache_test.go @@ -61,8 +61,8 @@ func setupCacheableNodeExecutionContext(dataStore *storage.DataStore, taskTempla mockParentInfo.OnGetUniqueIDMatch().Return(uniqueID) mockExecutionContext := &executorsmocks.ExecutionContext{} - mockExecutionContext.OnGetParentInfoMatch(mock.Anything).Return(mockParentInfo) - mockExecutionContext.OnGetExecutionConfigMatch().Return(v1alpha1.ExecutionConfig{}) + mockExecutionContext.EXPECT().GetParentInfo().Return(mockParentInfo) + mockExecutionContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) mockNodeExecutionMetadata := &interfacesmocks.NodeExecutionMetadata{} mockNodeExecutionMetadata.OnGetOwnerID().Return( @@ -75,6 +75,7 @@ func setupCacheableNodeExecutionContext(dataStore *storage.DataStore, taskTempla NodeId: nodeID, }, ) + mockNodeExecutionMetadata.OnGetConsoleURL().Return("") var taskReader interfaces.TaskReader if taskTemplate != nil { diff --git a/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go b/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go index 389ea0439b..526f41977a 100644 --- a/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go +++ b/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go @@ -193,8 +193,8 @@ func Test_dynamicNodeHandler_buildContextualDynamicWorkflow_withLaunchPlans(t *t immutableParentInfo := mocks4.ImmutableParentInfo{} immutableParentInfo.OnGetUniqueID().Return("c1") immutableParentInfo.OnCurrentAttempt().Return(uint32(2)) - execContext.OnGetParentInfo().Return(&immutableParentInfo) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion1) + execContext.EXPECT().GetParentInfo().Return(&immutableParentInfo) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion1) nCtx.OnExecutionContext().Return(execContext) dCtx, err := d.buildContextualDynamicWorkflow(ctx, nCtx) @@ -262,8 +262,8 @@ func Test_dynamicNodeHandler_buildContextualDynamicWorkflow_withLaunchPlans(t *t } execContext := &mocks4.ExecutionContext{} - execContext.OnGetParentInfo().Return(nil) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) + execContext.EXPECT().GetParentInfo().Return(nil) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) nCtx.OnExecutionContext().Return(execContext) dCtx, err := d.buildContextualDynamicWorkflow(ctx, nCtx) @@ -330,8 +330,8 @@ func Test_dynamicNodeHandler_buildContextualDynamicWorkflow_withLaunchPlans(t *t metrics: newMetrics(promutils.NewTestScope()), } execContext := &mocks4.ExecutionContext{} - execContext.OnGetParentInfo().Return(nil) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) + execContext.EXPECT().GetParentInfo().Return(nil) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) nCtx.OnExecutionContext().Return(execContext) _, err = d.buildContextualDynamicWorkflow(ctx, nCtx) @@ -417,8 +417,8 @@ func Test_dynamicNodeHandler_buildContextualDynamicWorkflow_withLaunchPlans(t *t immutableParentInfo := mocks4.ImmutableParentInfo{} immutableParentInfo.OnGetUniqueID().Return("c1") immutableParentInfo.OnCurrentAttempt().Return(uint32(2)) - execContext.OnGetParentInfo().Return(&immutableParentInfo) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion1) + execContext.EXPECT().GetParentInfo().Return(&immutableParentInfo) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion1) nCtx.OnExecutionContext().Return(execContext) dCtx, err := d.buildContextualDynamicWorkflow(ctx, nCtx) @@ -471,8 +471,8 @@ func Test_dynamicNodeHandler_buildContextualDynamicWorkflow_withLaunchPlans(t *t immutableParentInfo := mocks4.ImmutableParentInfo{} immutableParentInfo.OnGetUniqueID().Return("c1") immutableParentInfo.OnCurrentAttempt().Return(uint32(2)) - execContext.OnGetParentInfo().Return(&immutableParentInfo) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion1) + execContext.EXPECT().GetParentInfo().Return(&immutableParentInfo) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion1) nCtx.OnExecutionContext().Return(execContext) _, err := d.buildContextualDynamicWorkflow(ctx, nCtx) @@ -560,9 +560,9 @@ func Test_dynamicNodeHandler_buildContextualDynamicWorkflow_withLaunchPlans(t *t immutableParentInfo := mocks4.ImmutableParentInfo{} immutableParentInfo.OnGetUniqueID().Return("c1") immutableParentInfo.OnCurrentAttempt().Return(uint32(2)) - execContext.OnGetParentInfo().Return(&immutableParentInfo) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion1) - execContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{ + execContext.EXPECT().GetParentInfo().Return(&immutableParentInfo) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion1) + execContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{ RecoveryExecution: v1alpha1.WorkflowExecutionIdentifier{}, }) nCtx.OnExecutionContext().Return(execContext) diff --git a/flytepropeller/pkg/controller/nodes/dynamic/handler_test.go b/flytepropeller/pkg/controller/nodes/dynamic/handler_test.go index bab7b48f1b..16acd4b699 100644 --- a/flytepropeller/pkg/controller/nodes/dynamic/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/dynamic/handler_test.go @@ -576,12 +576,12 @@ func Test_dynamicNodeHandler_Handle_SubTaskV1(t *testing.T) { assert.NoError(t, nCtx.DataStore().WriteProtobuf(context.TODO(), endF, storage.Options{}, &core.LiteralMap{})) } execContext := executorMocks.ExecutionContext{} - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion1) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion1) immutableParentInfo := executorMocks.ImmutableParentInfo{} immutableParentInfo.OnGetUniqueID().Return("c1") immutableParentInfo.OnCurrentAttempt().Return(uint32(2)) - execContext.OnGetParentInfo().Return(&immutableParentInfo) - execContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + execContext.EXPECT().GetParentInfo().Return(&immutableParentInfo) + execContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) nCtx.OnExecutionContext().Return(&execContext) d := New(h, n, mockLPLauncher, eventConfig, promutils.NewTestScope()) got, err := d.Handle(context.TODO(), nCtx) @@ -766,9 +766,9 @@ func Test_dynamicNodeHandler_Handle_SubTask(t *testing.T) { assert.NoError(t, nCtx.DataStore().WriteProtobuf(context.TODO(), endF, storage.Options{}, &core.LiteralMap{})) } execContext := executorMocks.ExecutionContext{} - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) - execContext.OnGetParentInfo().Return(nil) - execContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) + execContext.EXPECT().GetParentInfo().Return(nil) + execContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) nCtx.OnExecutionContext().Return(&execContext) d := New(h, n, mockLPLauncher, eventConfig, promutils.NewTestScope()) got, err := d.Handle(context.TODO(), nCtx) @@ -913,8 +913,8 @@ func TestDynamicNodeTaskNodeHandler_Finalize(t *testing.T) { nCtx.OnEnqueueOwnerFunc().Return(func() error { return nil }) nCtx.OnDataStore().Return(dataStore) execContext := executorMocks.ExecutionContext{} - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) - execContext.OnGetParentInfo().Return(nil) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) + execContext.EXPECT().GetParentInfo().Return(nil) nCtx.OnExecutionContext().Return(&execContext) endNodeStatus := &flyteMocks.ExecutableNodeStatus{} diff --git a/flytepropeller/pkg/controller/nodes/executor_test.go b/flytepropeller/pkg/controller/nodes/executor_test.go index 227f3e5f1b..194458d2b8 100644 --- a/flytepropeller/pkg/controller/nodes/executor_test.go +++ b/flytepropeller/pkg/controller/nodes/executor_test.go @@ -1299,18 +1299,20 @@ func TestNodeExecutor_RecursiveNodeHandler_BranchNode(t *testing.T) { tid := "tid" eCtx := &mocks4.ExecutionContext{} - eCtx.OnGetTask(tid).Return(tk, nil) - eCtx.OnIsInterruptible().Return(true) - eCtx.OnGetExecutionID().Return(v1alpha1.WorkflowExecutionIdentifier{WorkflowExecutionIdentifier: &core.WorkflowExecutionIdentifier{}}) - eCtx.OnGetLabels().Return(nil) - eCtx.OnGetEventVersion().Return(v1alpha1.EventVersion0) - eCtx.OnGetParentInfo().Return(nil) - eCtx.OnGetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{ + eCtx.EXPECT().GetTask(tid).Return(tk, nil) + + eCtx.EXPECT().IsInterruptible().Return(true) + eCtx.EXPECT().GetExecutionID().Return(v1alpha1.WorkflowExecutionIdentifier{WorkflowExecutionIdentifier: &core.WorkflowExecutionIdentifier{}}) + eCtx.EXPECT().GetLabels().Return(nil) + eCtx.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) + eCtx.EXPECT().GetParentInfo().Return(nil) + eCtx.EXPECT().GetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{ RawOutputDataConfig: &admin.RawOutputDataConfig{OutputLocationPrefix: ""}, }) - eCtx.OnIncrementParallelism().Return(0) - eCtx.OnCurrentParallelism().Return(0) - eCtx.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + eCtx.EXPECT().IncrementParallelism().Return(0) + eCtx.EXPECT().CurrentParallelism().Return(0) + eCtx.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + eCtx.EXPECT().GetConsoleURL().Return("") branchTakenNodeID := "branchTakenNode" branchTakenNode := &mocks.ExecutableNode{} @@ -1674,12 +1676,12 @@ func TestNodeExecutor_AbortHandler(t *testing.T) { dag.OnFromNode(id).Return(make([]string, 0), nil) execContext := mocks4.ExecutionContext{} - execContext.OnIsInterruptible().Return(false) + execContext.EXPECT().IsInterruptible().Return(false) r := v1alpha1.RawOutputDataConfig{} - execContext.OnGetRawOutputDataConfig().Return(r) - execContext.OnGetExecutionID().Return(v1alpha1.WorkflowExecutionIdentifier{}) - execContext.OnGetLabels().Return(nil) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) + execContext.EXPECT().GetRawOutputDataConfig().Return(r) + execContext.EXPECT().GetExecutionID().Return(v1alpha1.WorkflowExecutionIdentifier{}) + execContext.EXPECT().GetLabels().Return(nil) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) assert.NoError(t, nExec.AbortHandler(ctx, &execContext, &dag, nl, n, "aborting")) }) @@ -2040,12 +2042,12 @@ func TestRecover(t *testing.T) { } execContext := &mocks4.ExecutionContext{} - execContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{ + execContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{ RecoveryExecution: v1alpha1.WorkflowExecutionIdentifier{ WorkflowExecutionIdentifier: recoveryID, }, }) - execContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) + execContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) nm := &nodemocks.NodeExecutionMetadata{} nm.OnGetNodeExecutionID().Return(&core.NodeExecutionIdentifier{ @@ -2477,10 +2479,10 @@ func TestIsMaxParallelismAchieved(t *testing.T) { // Creates an execution context for the test createExecContext := func(maxParallelism, currentParallelism uint32) executors.ExecutionContext { m := &mocks4.ExecutionContext{} - m.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{ + m.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{ MaxParallelism: maxParallelism, }) - m.OnCurrentParallelism().Return(currentParallelism) + m.EXPECT().CurrentParallelism().Return(currentParallelism) return m } diff --git a/flytepropeller/pkg/controller/nodes/gate/handler_test.go b/flytepropeller/pkg/controller/nodes/gate/handler_test.go index 488cb58a07..d988e8cb74 100644 --- a/flytepropeller/pkg/controller/nodes/gate/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/gate/handler_test.go @@ -106,7 +106,7 @@ func createNodeExecutionContext(gateNode *v1alpha1.GateNodeSpec) *nodeMocks.Node dataStore, _ := storage.NewDataStore(&storage.Config{Type: storage.TypeMemory}, promutils.NewTestScope()) eCtx := &executormocks.ExecutionContext{} - eCtx.OnGetExecutionID().Return(wfExecID) + eCtx.EXPECT().GetExecutionID().Return(wfExecID) nCtx := &nodeMocks.NodeExecutionContext{} nCtx.OnNodeExecutionMetadata().Return(nm) diff --git a/flytepropeller/pkg/controller/nodes/interfaces/mocks/node_execution_metadata.go b/flytepropeller/pkg/controller/nodes/interfaces/mocks/node_execution_metadata.go index c78bdfb557..26b41cc94b 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/mocks/node_execution_metadata.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/mocks/node_execution_metadata.go @@ -51,6 +51,38 @@ func (_m *NodeExecutionMetadata) GetAnnotations() map[string]string { return r0 } +type NodeExecutionMetadata_GetConsoleURL struct { + *mock.Call +} + +func (_m NodeExecutionMetadata_GetConsoleURL) Return(_a0 string) *NodeExecutionMetadata_GetConsoleURL { + return &NodeExecutionMetadata_GetConsoleURL{Call: _m.Call.Return(_a0)} +} + +func (_m *NodeExecutionMetadata) OnGetConsoleURL() *NodeExecutionMetadata_GetConsoleURL { + c_call := _m.On("GetConsoleURL") + return &NodeExecutionMetadata_GetConsoleURL{Call: c_call} +} + +func (_m *NodeExecutionMetadata) OnGetConsoleURLMatch(matchers ...interface{}) *NodeExecutionMetadata_GetConsoleURL { + c_call := _m.On("GetConsoleURL", matchers...) + return &NodeExecutionMetadata_GetConsoleURL{Call: c_call} +} + +// GetConsoleURL provides a mock function with given fields: +func (_m *NodeExecutionMetadata) GetConsoleURL() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + type NodeExecutionMetadata_GetInterruptibleFailureThreshold struct { *mock.Call } diff --git a/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go b/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go index b6a33a4e35..1ea60f89b0 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go @@ -39,6 +39,7 @@ type NodeExecutionMetadata interface { GetSecurityContext() core.SecurityContext IsInterruptible() bool GetInterruptibleFailureThreshold() int32 + GetConsoleURL() string } type NodeExecutionContext interface { diff --git a/flytepropeller/pkg/controller/nodes/resolve_test.go b/flytepropeller/pkg/controller/nodes/resolve_test.go index 19a8be1e7d..10b9e4e45d 100644 --- a/flytepropeller/pkg/controller/nodes/resolve_test.go +++ b/flytepropeller/pkg/controller/nodes/resolve_test.go @@ -172,6 +172,8 @@ func (d *dummyBaseWorkflow) GetExecutionConfig() v1alpha1.ExecutionConfig { return v1alpha1.ExecutionConfig{} } +func (d *dummyBaseWorkflow) GetConsoleURL() string { return "" } + func createDummyBaseWorkflow(dataStore *storage.DataStore) *dummyBaseWorkflow { return &dummyBaseWorkflow{ ID: "w1", diff --git a/flytepropeller/pkg/controller/nodes/subworkflow/handler_test.go b/flytepropeller/pkg/controller/nodes/subworkflow/handler_test.go index c47c39cde8..cd67b96466 100644 --- a/flytepropeller/pkg/controller/nodes/subworkflow/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/subworkflow/handler_test.go @@ -112,16 +112,16 @@ func createNodeContextWithVersion(phase v1alpha1.WorkflowNodePhase, n v1alpha1.E nCtx.OnNodeStateWriter().Return(state) ex := &execMocks.ExecutionContext{} - ex.OnGetEventVersion().Return(version) - ex.OnGetParentInfo().Return(nil) - ex.OnGetName().Return("name") - ex.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) - ex.OnIncrementParallelism().Return(1) - ex.OnGetSecurityContext().Return(core.SecurityContext{}) - ex.OnGetAnnotations().Return(nil) - ex.OnGetLabels().Return(nil) - ex.OnGetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{}) - ex.OnGetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + ex.EXPECT().GetEventVersion().Return(version) + ex.EXPECT().GetParentInfo().Return(nil) + ex.EXPECT().GetName().Return("name") + ex.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + ex.EXPECT().IncrementParallelism().Return(1) + ex.EXPECT().GetSecurityContext().Return(core.SecurityContext{}) + ex.EXPECT().GetAnnotations().Return(nil) + ex.EXPECT().GetLabels().Return(nil) + ex.EXPECT().GetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{}) + ex.EXPECT().GetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) nCtx.OnExecutionContext().Return(ex) @@ -329,9 +329,9 @@ func TestWorkflowNodeHandler_AbortNode(t *testing.T) { ).Return(nil) eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + eCtx.EXPECT().GetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + eCtx.EXPECT().GetName().Return("test") nCtx.OnExecutionContext().Return(eCtx) - eCtx.OnGetName().Return("test") err := h.Abort(ctx, nCtx, "test") assert.NoError(t, err) }) @@ -351,9 +351,9 @@ func TestWorkflowNodeHandler_AbortNode(t *testing.T) { ).Return(nil) eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + eCtx.EXPECT().GetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + eCtx.EXPECT().GetName().Return("test") nCtx.OnExecutionContext().Return(eCtx) - eCtx.OnGetName().Return("test") err := h.Abort(ctx, nCtx, "test") assert.NoError(t, err) }) @@ -372,9 +372,9 @@ func TestWorkflowNodeHandler_AbortNode(t *testing.T) { nCtx := createNodeContext(v1alpha1.WorkflowNodePhaseExecuting, mockNode, mockNodeStatus) eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + eCtx.EXPECT().GetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + eCtx.EXPECT().GetName().Return("test") nCtx.OnExecutionContext().Return(eCtx) - eCtx.OnGetName().Return("test") err := h.Abort(ctx, nCtx, "test") assert.Error(t, err) diff --git a/flytepropeller/pkg/controller/nodes/subworkflow/launchplan_test.go b/flytepropeller/pkg/controller/nodes/subworkflow/launchplan_test.go index 2e042d72a4..96acf46d78 100644 --- a/flytepropeller/pkg/controller/nodes/subworkflow/launchplan_test.go +++ b/flytepropeller/pkg/controller/nodes/subworkflow/launchplan_test.go @@ -245,19 +245,19 @@ func TestSubWorkflowHandler_StartLaunchPlan(t *testing.T) { nCtx.OnNodeExecutionMetadata().Return(nm) ectx := &execMocks.ExecutionContext{} - ectx.OnGetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) - ectx.OnGetEventVersion().Return(1) - ectx.OnGetParentInfo().Return(nil) - ectx.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{ + ectx.EXPECT().GetDefinitionVersion().Return(v1alpha1.WorkflowDefinitionVersion1) + ectx.EXPECT().GetEventVersion().Return(1) + ectx.EXPECT().GetParentInfo().Return(nil) + ectx.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{ RecoveryExecution: v1alpha1.WorkflowExecutionIdentifier{ WorkflowExecutionIdentifier: recoveredExecID, }, }) - ectx.OnIncrementParallelism().Return(1) - ectx.OnGetSecurityContext().Return(core.SecurityContext{}) - ectx.OnGetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{}) - ectx.OnGetLabels().Return(nil) - ectx.OnGetAnnotations().Return(nil) + ectx.EXPECT().IncrementParallelism().Return(1) + ectx.EXPECT().GetSecurityContext().Return(core.SecurityContext{}) + ectx.EXPECT().GetRawOutputDataConfig().Return(v1alpha1.RawOutputDataConfig{}) + ectx.EXPECT().GetLabels().Return(nil) + ectx.EXPECT().GetAnnotations().Return(nil) nCtx.OnExecutionContext().Return(ectx) nCtx.OnCurrentAttempt().Return(uint32(1)) @@ -671,7 +671,7 @@ func TestLaunchPlanHandler_HandleAbort(t *testing.T) { } nCtx := createNodeContext(v1alpha1.WorkflowNodePhaseExecuting, mockNode, mockNodeStatus) eCtx := &execMocks.ExecutionContext{} - eCtx.OnGetName().Return("name") + eCtx.EXPECT().GetName().Return("name") nCtx.OnExecutionContext().Return(eCtx) err := h.HandleAbort(ctx, nCtx, "some reason") assert.NoError(t, err) diff --git a/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go b/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go index dc00efacdc..02de593463 100644 --- a/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go +++ b/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go @@ -30,7 +30,7 @@ func TestGetSubWorkflow(t *testing.T) { ectx := &execMocks.ExecutionContext{} swf := &coreMocks.ExecutableSubWorkflow{} - ectx.OnFindSubWorkflow("x").Return(swf) + ectx.EXPECT().FindSubWorkflow("x").Return(swf) nCtx := &mocks.NodeExecutionContext{} nCtx.OnNode().Return(node) @@ -60,7 +60,7 @@ func TestGetSubWorkflow(t *testing.T) { swf := &coreMocks.ExecutableSubWorkflow{} swf.OnGetOnFailureNode().Return(failureNode) - ectx.OnFindSubWorkflow("x").Return(swf) + ectx.EXPECT().FindSubWorkflow("x").Return(swf) nCtx := &mocks.NodeExecutionContext{} nCtx.OnNode().Return(node) @@ -82,7 +82,7 @@ func TestGetSubWorkflow(t *testing.T) { ectx := &execMocks.ExecutionContext{} - ectx.OnFindSubWorkflow("x").Return(nil) + ectx.EXPECT().FindSubWorkflow("x").Return(nil) nCtx := &mocks.NodeExecutionContext{} nCtx.OnNode().Return(node) @@ -107,7 +107,7 @@ func Test_subworkflowHandler_HandleAbort(t *testing.T) { swf := &coreMocks.ExecutableSubWorkflow{} ectx := &execMocks.ExecutionContext{} - ectx.OnFindSubWorkflow("x").Return(swf) + ectx.EXPECT().FindSubWorkflow("x").Return(swf) ns := &coreMocks.ExecutableNodeStatus{} nCtx := &mocks.NodeExecutionContext{} @@ -138,8 +138,8 @@ func Test_subworkflowHandler_HandleAbort(t *testing.T) { swf.OnStartNode().Return(&coreMocks.ExecutableNode{}) ectx := &execMocks.ExecutionContext{} - ectx.OnFindSubWorkflow("x").Return(swf) - ectx.OnGetParentInfo().Return(nil) + ectx.EXPECT().FindSubWorkflow("x").Return(swf) + ectx.EXPECT().GetParentInfo().Return(nil) ns := &coreMocks.ExecutableNodeStatus{} nCtx := &mocks.NodeExecutionContext{} @@ -172,8 +172,8 @@ func Test_subworkflowHandler_HandleAbort(t *testing.T) { swf.OnStartNode().Return(&coreMocks.ExecutableNode{}) ectx := &execMocks.ExecutionContext{} - ectx.OnFindSubWorkflow("x").Return(swf) - ectx.OnGetParentInfo().Return(nil) + ectx.EXPECT().FindSubWorkflow("x").Return(swf) + ectx.EXPECT().GetParentInfo().Return(nil) ns := &coreMocks.ExecutableNodeStatus{} nCtx := &mocks.NodeExecutionContext{} diff --git a/flytepropeller/pkg/controller/nodes/task/handler_test.go b/flytepropeller/pkg/controller/nodes/task/handler_test.go index f0e177838f..27e377236f 100644 --- a/flytepropeller/pkg/controller/nodes/task/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/task/handler_test.go @@ -499,11 +499,11 @@ func Test_task_Handle_NoCatalog(t *testing.T) { nCtx.OnOutputShardSelector().Return(ioutils.NewConstantShardSelector([]string{"x"})) executionContext := &mocks.ExecutionContext{} - executionContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) - executionContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) - executionContext.OnGetParentInfo().Return(nil) + executionContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + executionContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) + executionContext.EXPECT().GetParentInfo().Return(nil) if allowIncrementParallelism { - executionContext.OnIncrementParallelism().Return(1) + executionContext.EXPECT().IncrementParallelism().Return(1) } nCtx.OnExecutionContext().Return(executionContext) @@ -811,9 +811,9 @@ func Test_task_Abort(t *testing.T) { nCtx.OnEventsRecorder().Return(ev) executionContext := &mocks.ExecutionContext{} - executionContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) - executionContext.OnGetParentInfo().Return(nil) - executionContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) + executionContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + executionContext.EXPECT().GetParentInfo().Return(nil) + executionContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) nCtx.OnExecutionContext().Return(executionContext) nCtx.OnRawOutputPrefix().Return("s3://sandbox/") @@ -972,9 +972,9 @@ func Test_task_Abort_v1(t *testing.T) { nCtx.OnEventsRecorder().Return(ev) executionContext := &mocks.ExecutionContext{} - executionContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) - executionContext.OnGetParentInfo().Return(nil) - executionContext.OnGetEventVersion().Return(v1alpha1.EventVersion1) + executionContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + executionContext.EXPECT().GetParentInfo().Return(nil) + executionContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion1) nCtx.OnExecutionContext().Return(executionContext) nCtx.OnRawOutputPrefix().Return("s3://sandbox/") @@ -1153,9 +1153,9 @@ func Test_task_Finalize(t *testing.T) { nCtx.OnEnqueueOwnerFunc().Return(nil) executionContext := &mocks.ExecutionContext{} - executionContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) - executionContext.OnGetParentInfo().Return(nil) - executionContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) + executionContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + executionContext.EXPECT().GetParentInfo().Return(nil) + executionContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) nCtx.OnExecutionContext().Return(executionContext) nCtx.OnRawOutputPrefix().Return("s3://sandbox/") diff --git a/flytepropeller/pkg/controller/nodes/task/taskexec_context_test.go b/flytepropeller/pkg/controller/nodes/task/taskexec_context_test.go index e798f82a04..5f5f3d68c5 100644 --- a/flytepropeller/pkg/controller/nodes/task/taskexec_context_test.go +++ b/flytepropeller/pkg/controller/nodes/task/taskexec_context_test.go @@ -93,9 +93,9 @@ func dummyNodeExecutionContext(t *testing.T, parentInfo executors.ImmutableParen nCtx.OnEnqueueOwnerFunc().Return(nil) executionContext := &mocks2.ExecutionContext{} - executionContext.OnGetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) - executionContext.OnGetParentInfo().Return(parentInfo) - executionContext.OnGetEventVersion().Return(eventVersion) + executionContext.EXPECT().GetExecutionConfig().Return(v1alpha1.ExecutionConfig{}) + executionContext.EXPECT().GetParentInfo().Return(parentInfo) + executionContext.EXPECT().GetEventVersion().Return(eventVersion) nCtx.OnExecutionContext().Return(executionContext) ds, err := storage.NewDataStore( diff --git a/flytepropeller/pkg/controller/nodes/task/transformer_test.go b/flytepropeller/pkg/controller/nodes/task/transformer_test.go index db89dda3e6..0fdab91907 100644 --- a/flytepropeller/pkg/controller/nodes/task/transformer_test.go +++ b/flytepropeller/pkg/controller/nodes/task/transformer_test.go @@ -60,8 +60,8 @@ func TestToTaskExecutionEvent(t *testing.T) { nodeExecutionMetadata.OnIsInterruptible().Return(true) mockExecContext := &mocks2.ExecutionContext{} - mockExecContext.OnGetEventVersion().Return(v1alpha1.EventVersion0) - mockExecContext.OnGetParentInfo().Return(nil) + mockExecContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion0) + mockExecContext.EXPECT().GetParentInfo().Return(nil) tID := &pluginMocks.TaskExecutionID{} generatedName := "generated_name" @@ -252,11 +252,11 @@ func TestToTaskExecutionEventWithParent(t *testing.T) { nodeExecutionMetadata.OnIsInterruptible().Return(true) mockExecContext := &mocks2.ExecutionContext{} - mockExecContext.OnGetEventVersion().Return(v1alpha1.EventVersion1) + mockExecContext.EXPECT().GetEventVersion().Return(v1alpha1.EventVersion1) mockParentInfo := &mocks2.ImmutableParentInfo{} mockParentInfo.OnGetUniqueID().Return("np1") mockParentInfo.OnCurrentAttempt().Return(uint32(2)) - mockExecContext.OnGetParentInfo().Return(mockParentInfo) + mockExecContext.EXPECT().GetParentInfo().Return(mockParentInfo) tID := &pluginMocks.TaskExecutionID{} generatedName := "generated_name" From 02bf85f8955126012c489c7d45af5d97f4af81c1 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Fri, 14 Jun 2024 13:41:19 -0500 Subject: [PATCH 18/30] deep copying arraynode tasktemplate interface (#5479) Signed-off-by: Daniel Rammer --- .../nodes/array/node_execution_context.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/flytepropeller/pkg/controller/nodes/array/node_execution_context.go b/flytepropeller/pkg/controller/nodes/array/node_execution_context.go index 6ef7bb01c1..b2c9619695 100644 --- a/flytepropeller/pkg/controller/nodes/array/node_execution_context.go +++ b/flytepropeller/pkg/controller/nodes/array/node_execution_context.go @@ -50,14 +50,14 @@ type arrayTaskReader struct { } func (a *arrayTaskReader) Read(ctx context.Context) (*core.TaskTemplate, error) { - taskTemplate, err := a.TaskReader.Read(ctx) + originalTaskTemplate, err := a.TaskReader.Read(ctx) if err != nil { return nil, err } // convert output list variable to singular outputVariables := make(map[string]*core.Variable) - for key, value := range taskTemplate.Interface.Outputs.Variables { + for key, value := range originalTaskTemplate.Interface.Outputs.Variables { switch v := value.Type.Type.(type) { case *core.LiteralType_CollectionType: outputVariables[key] = &core.Variable{ @@ -69,10 +69,14 @@ func (a *arrayTaskReader) Read(ctx context.Context) (*core.TaskTemplate, error) } } - taskTemplate.Interface.Outputs = &core.VariableMap{ - Variables: outputVariables, + taskTemplate := *originalTaskTemplate + taskTemplate.Interface = &core.TypedInterface{ + Inputs: originalTaskTemplate.Interface.Inputs, + Outputs: &core.VariableMap{ + Variables: outputVariables, + }, } - return taskTemplate, nil + return &taskTemplate, nil } type arrayNodeExecutionContext struct { From 59e18d11038fa322319fe2ef427f62413d5142bc Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Sun, 16 Jun 2024 09:35:34 +0800 Subject: [PATCH 19/30] Remove end2end.yml (#5034) --- .github/workflows/end2end.yml | 124 ---------------------------------- 1 file changed, 124 deletions(-) delete mode 100644 .github/workflows/end2end.yml diff --git a/.github/workflows/end2end.yml b/.github/workflows/end2end.yml deleted file mode 100644 index d7cf8182c0..0000000000 --- a/.github/workflows/end2end.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: End to End tests - -on: - workflow_call: - inputs: - priorities: - description: "Priorities of tests to register (comma-separated)" - required: true - type: string - cache_key: - description: "Cache key for docker image" - required: true - type: string -jobs: - endtoend: - name: End to End tests - runs-on: ubuntu-latest - env: - FLYTESNACKS_VERSION: "" - steps: - - name: Set latest Flytesnacks release - if: ${{ env.FLYTESNACKS_VERSION == '' }} - run: | - FLYTESNACKS_VERSION="$(curl --silent https://api.github.com/repos/flyteorg/flytesnacks/releases/latest | jq -r .tag_name)" - echo "FLYTESNACKS_VERSION=${FLYTESNACKS_VERSION}" >> ${GITHUB_ENV} - - name: Checkout - uses: actions/checkout@v4 - - uses: unionai/flytectl-setup-action@v0.0.3 - name: Setup flytectl - - uses: actions/setup-python@v3 - with: - python-version: 3.11 - - id: load-docker-cache-datacatalog - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-datacatalog - key: ${{ inputs.cache_key }}-datacatalog - - id: load-docker-cache-flyteadmin - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-flyteadmin - key: ${{ inputs.cache_key }}-flyteadmin - - id: load-docker-cache-flytecopilot - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-flytecopilot - key: ${{ inputs.cache_key }}-flytecopilot - - id: load-docker-cache-flytepropeller - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-flytepropeller - key: ${{ inputs.cache_key }}-flytepropeller - - name: Create Sandbox Cluster - run: | - cp /tmp/tmp/docker-images-datacatalog/snapshot-datacatalog.tar snapshot-datacatalog.tar - cp /tmp/tmp/docker-images-flyteadmin/snapshot-flyteadmin.tar snapshot-flyteadmin.tar - cp /tmp/tmp/docker-images-flytecopilot/snapshot-flytecopilot.tar snapshot-flytecopilot.tar - cp /tmp/tmp/docker-images-flytepropeller/snapshot-flytepropeller.tar snapshot-flytepropeller.tar - flytectl config init - flytectl sandbox start --source=$(pwd) - - name: Prime docker cache - run: | - flytectl sandbox exec -- docker load -i /root/snapshot-datacatalog.tar - flytectl sandbox exec -- docker load -i /root/snapshot-flyteadmin.tar - flytectl sandbox exec -- docker load -i /root/snapshot-flytecopilot.tar - flytectl sandbox exec -- docker load -i /root/snapshot-flytepropeller.tar - - name: Setup Flytekit - run: | - python -m pip install --upgrade pip - pip install flytekit flytekitplugins-deck-standard - pip freeze - - name: Checkout flytesnacks - if: ${{ inputs.priorities == 'P0' }} - uses: actions/checkout@v4 - with: - repository: flyteorg/flytesnacks - path: flytesnacks - ref: ${{ env.FLYTESNACKS_VERSION }} - - name: Register P0 tests - if: ${{ inputs.priorities == 'P0' }} - run: | - while read -r line; - do - pyflyte --config ./boilerplate/flyte/end2end/functional-test-config.yaml \ - register \ - --project flytesnacks \ - --domain development \ - --image cr.flyte.org/flyteorg/flytekit:py3.11-latest \ - --version ${{ env.FLYTESNACKS_VERSION }} \ - flytesnacks/$line; - done < flytesnacks/flyte_tests.txt - - name: Register all flytesnacks examples - if: ${{ inputs.priorities != 'P0' }} - uses: unionai/flyte-register-action@v0.0.2 - with: - flytesnacks: true - project: flytesnacks - version: ${{ env.FLYTESNACKS_VERSION }} - domain: development - # - name: Pre Upgrade Tests - # if: ${{ github.event.repository.name == 'flyteadmin' }} - # env: - # PRIORITIES: "${{ inputs.priorities }}" - # run: | - # make end2end_execute - - name: Upgrade Helm charts - run: | - flytectl sandbox exec -- helm repo add flyteorg https://flyteorg.github.io/flyte - flytectl sandbox exec -- helm repo update - flytectl sandbox exec -- helm upgrade flyte -n flyte-core --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte-core -f /flyteorg/share/flyte/values-sandbox.yaml --wait --set datacatalog.image.repository=${{ github.repository_owner }}/datacalog,datacatalog.image.tag=latest - # TODO(monorepo): the following commands are not correct. - # we have to separate the calls to replace the images into different commands. - # flytectl sandbox exec -- helm upgrade flyte -n flyte-core --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte-core -f /flyteorg/share/flyte/values-sandbox.yaml --wait \ - # --set datacatalog.image.repository=${{ github.repository_owner }}/datacalog,datacatalog.image.tag=latest - # --set flyteadmin.image.repository=${{ github.repository_owner }}/datacalog,flyteadmin.image.tag=latest - # --set flytecopilot.image.repository=${{ github.repository_owner }}/datacalog,flytecopilot.image.tag=latest - # --set flytepropeller.image.repository=${{ github.repository_owner }}/datacalog,flytepropeller.image.tag=latest - - flytectl sandbox exec -- k3s kubectl get pods -n flyte -oyaml - - name: Post Upgrade Tests - env: - PRIORITIES: "${{ inputs.priorities }}" - run: | - make end2end_execute From 1abdd9478945a644284da1ad4457a9481a59a1dd Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 17 Jun 2024 15:40:14 +0800 Subject: [PATCH 20/30] fix(migrations): Correct NULL to empty string in SQL insert (#5482) --- .github/workflows/single-binary.yml | 2 +- flyteadmin/pkg/repositories/config/migrations.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/single-binary.yml b/.github/workflows/single-binary.yml index 81103b95fe..47b86a7dc3 100644 --- a/.github/workflows/single-binary.yml +++ b/.github/workflows/single-binary.yml @@ -174,7 +174,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install flytekit flytekitplugins-deck-standard + pip install flytekit flytekitplugins-deck-standard "numpy<2.0.0" pip freeze - name: Checkout flytesnacks uses: actions/checkout@v4 diff --git a/flyteadmin/pkg/repositories/config/migrations.go b/flyteadmin/pkg/repositories/config/migrations.go index a2b39000d2..27da97f29c 100644 --- a/flyteadmin/pkg/repositories/config/migrations.go +++ b/flyteadmin/pkg/repositories/config/migrations.go @@ -1250,7 +1250,7 @@ var ContinuedMigrations = []*gormigrate.Migration{ // Drop execution_admin_tags and admin_tags tables, and create a new table execution_tags // to store tags associated with executions. sql := "INSERT INTO execution_tags (execution_project, execution_domain, execution_name, created_at, updated_at, deleted_at, key, value)" + - " SELECT execution_project, execution_domain, execution_name, created_at, updated_at, deleted_at, name as key, null as value" + + " SELECT execution_project, execution_domain, execution_name, created_at, updated_at, deleted_at, name as key, '' as value" + " FROM execution_admin_tags" + " INNER JOIN admin_tags a on execution_admin_tags.admin_tag_id = a.id;" if err := tx.Exec(sql).Error; err != nil { From 791471c2ec580400ba6a9936dc0d5fd8896173bd Mon Sep 17 00:00:00 2001 From: Dennis Keck <26092524+fellhorn@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:27:45 +0200 Subject: [PATCH 21/30] Fix: Make 'flytectl compile' consider launchplans used within workflows (#5463) * Fix: Make 'flytectl compile' consider launchplans used within workflows Signed-off-by: Dennis Keck <26092524+fellhorn@users.noreply.github.com> * Add raw file for test Signed-off-by: Dennis Keck <26092524+fellhorn@users.noreply.github.com> * Add documentation on how to create a package Signed-off-by: Dennis Keck <26092524+fellhorn@users.noreply.github.com> --------- Signed-off-by: Dennis Keck <26092524+fellhorn@users.noreply.github.com> --- flytectl/cmd/compile/compile.go | 74 +++++++++++++++--- flytectl/cmd/compile/compile_test.go | 5 ++ .../cmd/compile/testdata/launchplan-in-wf.py | 16 ++++ .../cmd/compile/testdata/launchplan-in-wf.tgz | Bin 0 -> 875 bytes 4 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 flytectl/cmd/compile/testdata/launchplan-in-wf.py create mode 100644 flytectl/cmd/compile/testdata/launchplan-in-wf.tgz diff --git a/flytectl/cmd/compile/compile.go b/flytectl/cmd/compile/compile.go index 972c553e97..60235c1b91 100644 --- a/flytectl/cmd/compile/compile.go +++ b/flytectl/cmd/compile/compile.go @@ -80,21 +80,16 @@ func compileFromPackage(packagePath string) error { return err } - // compile workflows - for wfName, workflow := range workflows { + var providers []common.InterfaceProvider + var compiledWorkflows = map[string]*core.CompiledWorkflowClosure{} - fmt.Println("\nCompiling workflow:", wfName) - plan := plans[wfName] + // compile workflows + for _, workflow := range workflows { + providers, err = handleWorkflow(workflow, compiledTasks, compiledWorkflows, providers, plans, workflows) - _, err := compiler.CompileWorkflow(workflow.Template, - workflow.SubWorkflows, - compiledTasks, - []common.InterfaceProvider{compiler.NewLaunchPlanInterfaceProvider(*plan)}) if err != nil { - fmt.Println(":( Error Compiling workflow:", wfName) return err } - } fmt.Println("All Workflows compiled successfully!") @@ -105,6 +100,65 @@ func compileFromPackage(packagePath string) error { return nil } +func handleWorkflow( + workflow *admin.WorkflowSpec, + compiledTasks []*core.CompiledTask, + compiledWorkflows map[string]*core.CompiledWorkflowClosure, + compiledLaunchPlanProviders []common.InterfaceProvider, + plans map[string]*admin.LaunchPlan, + workflows map[string]*admin.WorkflowSpec) ([]common.InterfaceProvider, error) { + reqs, _ := compiler.GetRequirements(workflow.Template, workflow.SubWorkflows) + wfName := workflow.Template.Id.Name + + // Check if all the subworkflows referenced by launchplan are compiled + for i := range reqs.GetRequiredLaunchPlanIds() { + lpID := &reqs.GetRequiredLaunchPlanIds()[i] + lpWfName := plans[lpID.Name].Spec.WorkflowId.Name + missingWorkflow := workflows[lpWfName] + if compiledWorkflows[lpWfName] == nil { + // Recursively compile the missing workflow first + err := error(nil) + compiledLaunchPlanProviders, err = handleWorkflow(missingWorkflow, compiledTasks, compiledWorkflows, compiledLaunchPlanProviders, plans, workflows) + if err != nil { + return nil, err + } + } + } + + fmt.Println("\nCompiling workflow:", wfName) + + wf, err := compiler.CompileWorkflow(workflow.Template, + workflow.SubWorkflows, + compiledTasks, + compiledLaunchPlanProviders) + + if err != nil { + fmt.Println(":( Error Compiling workflow:", wfName) + return nil, err + } + compiledWorkflows[wfName] = wf + + // Update the expected inputs and outputs for the launchplans which reference this workflow + for _, plan := range plans { + if plan.Spec.WorkflowId.Name == wfName { + plan.Closure.ExpectedOutputs = wf.Primary.Template.Interface.Outputs + newMap := make(map[string]*core.Parameter) + + for key, value := range wf.Primary.Template.Interface.Inputs.Variables { + newMap[key] = &core.Parameter{ + Var: value, + } + } + plan.Closure.ExpectedInputs = &core.ParameterMap{ + Parameters: newMap, + } + compiledLaunchPlanProviders = append(compiledLaunchPlanProviders, compiler.NewLaunchPlanInterfaceProvider(*plan)) + } + } + + return compiledLaunchPlanProviders, nil +} + const ( compileShort = `Validate flyte packages without registration needed.` compileLong = ` diff --git a/flytectl/cmd/compile/compile_test.go b/flytectl/cmd/compile/compile_test.go index 4004ca897b..2d91260aff 100644 --- a/flytectl/cmd/compile/compile_test.go +++ b/flytectl/cmd/compile/compile_test.go @@ -43,6 +43,8 @@ func TestCompileCommand(t *testing.T) { assert.NotNil(t, err, "calling compile with Empty file flag does not error") } +// New packages can be created by using the following command +// pyflyte --pkgs package -f func TestCompilePackage(t *testing.T) { // valid package contains two workflows // with three tasks @@ -69,4 +71,7 @@ func TestCompilePackage(t *testing.T) { err = compileFromPackage("testdata/invalidworkflow.tgz") assert.NotNil(t, err, "unable to handle invalid workflow") + // testing workflows with launchplans used within workflow + err = compileFromPackage("testdata/launchplan-in-wf.tgz") + assert.Nil(t, err, "unable to compile workflow with launchplans used within workflow") } diff --git a/flytectl/cmd/compile/testdata/launchplan-in-wf.py b/flytectl/cmd/compile/testdata/launchplan-in-wf.py new file mode 100644 index 0000000000..8a54c69f28 --- /dev/null +++ b/flytectl/cmd/compile/testdata/launchplan-in-wf.py @@ -0,0 +1,16 @@ +# Tests that a LaunchPlan with inputs can be used in a workflow for flytectl compile +from flytekit import LaunchPlan, task, workflow + +@task +def my_task(num: int) -> int: + return num + 1 + + +@workflow +def inner_workflow(num: int) -> int: + return my_task(num=num) + + +@workflow +def outer_workflow() -> int: + return LaunchPlan.get_or_create(inner_workflow, "name_override", default_inputs={"num": 42})() diff --git a/flytectl/cmd/compile/testdata/launchplan-in-wf.tgz b/flytectl/cmd/compile/testdata/launchplan-in-wf.tgz new file mode 100644 index 0000000000000000000000000000000000000000..b297277ce0b807eb705c203a0fcd6039e6072e4d GIT binary patch literal 875 zcmV-x1C;z9iwFq$#%5*$|7L7?bY(4YVPk7yXJsyQXLxo6{H z=8ny4ICHO|NA&39nbZHwof;3&qoBmxbyO5hyJ-*mnW8d=4*Mttx}DGo#O2ZRM70iE zq1)o`n8n^IjF~#4n#xSm!U*{P(e0ieH0n*i*P*>S^}8Vt#$C2b+g~4M{hOvfJTl8r zlE(;DH4)QIjTyS8Sxl^di&+*rRMK4kHST$C=kB=s#-AwoX9geSv!%T`Ujqq|0!Gpn z-oRO3k@7g3&q$(GdXKZ7A{Fq4>v@UzGExv($2qUtl9ut32rpN5@OC~|TKAk5xBUwq z1a6I&x1#f5l8??K+7(2WNVb@Rb(t0v{15&I|36zad*UbA)*i(8f9HRu8&m$*RRjE= zj{j%1EPc6UM=)u4u_M^WBsTmGUX3;cN!^!_iYn+wM(A9G!YTv*ga4n9|Ct5;eW`M<$t@_!xtpN{{3WfrmhYb@cd*!KzB&sGFJM49{=UTF>N(CIYFh-}2uR>+HJ zlDdzJ`An%WalPwk2|-B!{15(z{2xdOV{ZLlOU3_8wWj^ADh&LeivJHp{y(?)PZzmA zfFR=s|AYS_{|BBHihWxmX0wO94RD|TEo(aeHw?oB|EJ>r-?=&Y_*#1qp8K9Wd_Z<3 zNo4uUj502fcia$-&6xyZw^9E{ovbC)EYM$Zdhp#G>V35PW$_qvq8W*_36m9T9E09q_u_C);8$?m3G(L`+eZ1E)8Nt2v=F z3NDIZF?1S@oQQ$(oNZaIp7Uy>?Yo{hw-cU|JrR7fHK&O8LKG%+&u49sK`~^8cyg|H&fv z2X=8G-T|y9{tZyfKve($0000000000000000000000000007{z`2$XxUKs#T006ft Bt-$~Q literal 0 HcmV?d00001 From de415af92102c745dc30df0abbb00136765b98d6 Mon Sep 17 00:00:00 2001 From: Trevor McGuire <78115767+trevormcguire@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:22:57 -0400 Subject: [PATCH 22/30] include group in apiVersion in plugin_collector (#5457) Signed-off-by: Trevor McGuire --- .../pkg/controller/nodes/task/k8s/plugin_collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytepropeller/pkg/controller/nodes/task/k8s/plugin_collector.go b/flytepropeller/pkg/controller/nodes/task/k8s/plugin_collector.go index caf7c81721..f0681a6bca 100644 --- a/flytepropeller/pkg/controller/nodes/task/k8s/plugin_collector.go +++ b/flytepropeller/pkg/controller/nodes/task/k8s/plugin_collector.go @@ -52,7 +52,7 @@ func (r *ResourceLevelMonitor) collect(ctx context.Context) { list := metav1.PartialObjectMetadataList{ TypeMeta: metav1.TypeMeta{ Kind: r.gvk.Kind, - APIVersion: r.gvk.Version, + APIVersion: r.gvk.GroupVersion().String(), }, } if err := r.cache.List(ctx, &list); err != nil { From 8c8e4f8eb9a391adbf4935fa71847eb350f0de65 Mon Sep 17 00:00:00 2001 From: "Fabio M. Graetz, Ph.D" Date: Mon, 17 Jun 2024 21:59:20 +0200 Subject: [PATCH 23/30] Feat: Allow controlling in which task phases log links are shown (#4726) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add ShowWhilePending arg to TaskLog flyteidl message Signed-off-by: Fabio Graetz * Allow showing specific logs already during queued phase Signed-off-by: Fabio Graetz * Use core.PhaseInfoQueuedWithTaskInfo instead of core.PhaseInfoQueued in plugins so log links are available Signed-off-by: Fabio Graetz * Bump phase version in pytorch plugin Signed-off-by: Fabio Graetz * Fix nil containerId in pending phase Signed-off-by: Fabio Graetz * Undo changes from rebase in ray.go Signed-off-by: Fabio Graetz * Regenerate protos Signed-off-by: Fabio Graetz * Fix after rebasing Signed-off-by: Fabio Graetz * Add HideOnceFinished option to TaskLog proto message Signed-off-by: Fabio Graetz * Hide certain logs once finished Signed-off-by: Fabio Graetz * Move log link filtering (by phase) from propeller to admin Signed-off-by: Fabio Graetz * Move bumping of plugin state phase version into function Signed-off-by: Fabio Graetz * Move helper function which bumps phase version to k8s plugin package Signed-off-by: Fabio Graetz * Consistently bump phase version when reason changes in pod, pytorch, tensorflow, and mpi plugins Signed-off-by: Fabio Graetz * Make controlling lifetime of log links work with dask plugin Signed-off-by: Fabio Graetz * Make controlling lifetime of log links work with ray plugin Signed-off-by: Fabio Graetz * Make controlling lifetime of log links work with spark plugin Signed-off-by: Fabio Graetz * Don't return pluginsCore.PhaseInfoUndefined but already known phaseInfo if we fail to update the phase version Signed-off-by: Fabio Graetz * Remove now obsolete logic to check whether dask job is queued Signed-off-by: Fabio Graetz * Adapt docstring explaining why we treat queued and init phase the same while filtering log links Signed-off-by: Fabio Graetz * Make propeller tests pass Signed-off-by: Fabio Graetz * Make pluginmachinery/flytek8s tests pass Signed-off-by: Fabio Graetz * Fix dask, pytorch, tensorflow, and mpi tests Signed-off-by: Fabio Graetz * Make log link filtering by phase work for map tasks Signed-off-by: Fabio Graetz * Add tests for filtering log links when updating task execution Signed-off-by: Fabio Graetz * Show All user logs while queueing phase as before Signed-off-by: Fabio Graetz * Fix spark tests Signed-off-by: Fabio Graetz * Fix after rebase Signed-off-by: Fabio Graetz * Fix flyteidl go.mod Signed-off-by: Fabio Graetz * Fix mpi test Signed-off-by: Fabio Graetz * Add tests for PR #4726 (#5200) * Add tests to ensure the phase version is bumped in kubeflow plugin if reason changes within the same phase Signed-off-by: Fabio Graetz * Test that ray and dask plugins bump phase version in GetTaskPhase Signed-off-by: Fabio Graetz * Test phase version increase when reason changes for spark plugin Signed-off-by: Fabio Graetz * Fix ray tests after rebase Signed-off-by: Fabio Graetz * Make lint pass Signed-off-by: Fabio Graetz --------- Signed-off-by: Fabio Graetz * Update flyteplugins/go/tasks/logs/logging_utils.go Signed-off-by: Fabio M. Graetz, Ph.D. Signed-off-by: Fabio Graetz * Update go.mod after flyteidl make generate Signed-off-by: Fabio Graetz * Restrict numpy version in single binary e2e tests Signed-off-by: Fabio Graetz --------- Signed-off-by: Fabio Graetz Signed-off-by: Fabio M. Graetz, Ph.D. Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Co-authored-by: Fabio Grätz Co-authored-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> --- .../transformers/task_execution.go | 37 ++- .../transformers/task_execution_test.go | 296 ++++++++++++++++++ flyteidl/clients/go/assets/admin.swagger.json | 6 + .../gen/pb-es/flyteidl/core/execution_pb.ts | 12 + .../gen/pb-go/flyteidl/core/execution.pb.go | 98 +++--- .../flyteidl/service/admin.swagger.json | 6 + .../flyteidl/service/agent.swagger.json | 6 + flyteidl/gen/pb-js/flyteidl.d.ts | 12 + flyteidl/gen/pb-js/flyteidl.js | 34 ++ .../pb_python/flyteidl/core/execution_pb2.py | 20 +- .../pb_python/flyteidl/core/execution_pb2.pyi | 8 +- flyteidl/gen/pb_rust/flyteidl.core.rs | 4 + flyteidl/go.mod | 4 +- flyteidl/go.sum | 1 + flyteidl/protos/flyteidl/core/execution.proto | 2 + flyteplugins/go/tasks/logs/logging_utils.go | 6 +- .../go/tasks/pluginmachinery/core/phase.go | 2 +- .../pluginmachinery/flytek8s/pod_helper.go | 15 +- .../flytek8s/pod_helper_test.go | 36 +-- .../go/tasks/pluginmachinery/k8s/plugin.go | 22 ++ .../tasks/pluginmachinery/tasklog/plugin.go | 2 + .../tasks/pluginmachinery/tasklog/template.go | 8 +- .../go/tasks/plugins/k8s/dask/dask.go | 54 ++-- .../go/tasks/plugins/k8s/dask/dask_test.go | 57 +++- .../k8s/kfoperators/common/common_operator.go | 6 +- .../tasks/plugins/k8s/kfoperators/mpi/mpi.go | 9 +- .../plugins/k8s/kfoperators/mpi/mpi_test.go | 56 +++- .../k8s/kfoperators/pytorch/pytorch.go | 9 +- .../k8s/kfoperators/pytorch/pytorch_test.go | 64 +++- .../k8s/kfoperators/tensorflow/tensorflow.go | 9 +- .../kfoperators/tensorflow/tensorflow_test.go | 52 ++- .../go/tasks/plugins/k8s/pod/plugin.go | 14 +- flyteplugins/go/tasks/plugins/k8s/ray/ray.go | 21 +- .../go/tasks/plugins/k8s/ray/ray_test.go | 46 ++- .../go/tasks/plugins/k8s/spark/spark.go | 107 ++++--- .../go/tasks/plugins/k8s/spark/spark_test.go | 56 +++- .../go/tasks/plugins/webapi/agent/plugin.go | 2 +- .../tasks/plugins/webapi/bigquery/plugin.go | 2 +- .../nodes/task/k8s/plugin_manager_test.go | 5 +- 39 files changed, 953 insertions(+), 253 deletions(-) diff --git a/flyteadmin/pkg/repositories/transformers/task_execution.go b/flyteadmin/pkg/repositories/transformers/task_execution.go index cedf7c1f13..9f24ed2aa4 100644 --- a/flyteadmin/pkg/repositories/transformers/task_execution.go +++ b/flyteadmin/pkg/repositories/transformers/task_execution.go @@ -372,6 +372,31 @@ func mergeMetadata(existing, latest *event.TaskExecutionMetadata) *event.TaskExe return existing } +func filterExternalResourceLogsByPhase(externalResources []*event.ExternalResourceInfo, phase core.TaskExecution_Phase) { + for _, externalResource := range externalResources { + externalResource.Logs = filterLogsByPhase(externalResource.Logs, phase) + } +} + +func filterLogsByPhase(logs []*core.TaskLog, phase core.TaskExecution_Phase) []*core.TaskLog { + filteredLogs := make([]*core.TaskLog, 0, len(logs)) + + for _, l := range logs { + if common.IsTaskExecutionTerminal(phase) && l.HideOnceFinished { + continue + } + // Some plugins like e.g. Dask, Ray start with or very quickly transition to core.TaskExecution_INITIALIZING + // once the CR has been created even though the underlying pods are still pending. We thus treat queued and + // initializing the same here. + if (phase == core.TaskExecution_QUEUED || phase == core.TaskExecution_INITIALIZING) && !l.ShowWhilePending { + continue + } + filteredLogs = append(filteredLogs, l) + + } + return filteredLogs +} + func UpdateTaskExecutionModel(ctx context.Context, request *admin.TaskExecutionEventRequest, taskExecutionModel *models.TaskExecution, inlineEventDataPolicy interfaces.InlineEventDataPolicy, storageClient *storage.DataStore) error { err := handleTaskExecutionInputs(ctx, taskExecutionModel, request, storageClient) @@ -384,6 +409,7 @@ func UpdateTaskExecutionModel(ctx context.Context, request *admin.TaskExecutionE return errors.NewFlyteAdminErrorf(codes.Internal, "failed to unmarshal task execution closure with error: %+v", err) } + isPhaseChange := taskExecutionModel.Phase != request.Event.Phase.String() existingTaskPhase := taskExecutionModel.Phase taskExecutionModel.Phase = request.Event.Phase.String() taskExecutionModel.PhaseVersion = request.Event.PhaseVersion @@ -393,7 +419,11 @@ func UpdateTaskExecutionModel(ctx context.Context, request *admin.TaskExecutionE reportedAt = request.Event.OccurredAt } taskExecutionClosure.UpdatedAt = reportedAt - taskExecutionClosure.Logs = mergeLogs(taskExecutionClosure.Logs, request.Event.Logs) + + mergedLogs := mergeLogs(taskExecutionClosure.Logs, request.Event.Logs) + filteredLogs := filterLogsByPhase(mergedLogs, request.Event.Phase) + taskExecutionClosure.Logs = filteredLogs + if len(request.Event.Reasons) > 0 { for _, reason := range request.Event.Reasons { taskExecutionClosure.Reasons = append( @@ -437,6 +467,11 @@ func UpdateTaskExecutionModel(ctx context.Context, request *admin.TaskExecutionE return errors.NewFlyteAdminErrorf(codes.Internal, "failed to merge task event custom_info with error: %v", err) } taskExecutionClosure.Metadata = mergeMetadata(taskExecutionClosure.Metadata, request.Event.Metadata) + + if isPhaseChange && taskExecutionClosure.Metadata != nil && len(taskExecutionClosure.Metadata.ExternalResources) > 0 { + filterExternalResourceLogsByPhase(taskExecutionClosure.Metadata.ExternalResources, request.Event.Phase) + } + if request.Event.EventVersion > taskExecutionClosure.EventVersion { taskExecutionClosure.EventVersion = request.Event.EventVersion } diff --git a/flyteadmin/pkg/repositories/transformers/task_execution_test.go b/flyteadmin/pkg/repositories/transformers/task_execution_test.go index 71ff3c60e3..e1e0fd973e 100644 --- a/flyteadmin/pkg/repositories/transformers/task_execution_test.go +++ b/flyteadmin/pkg/repositories/transformers/task_execution_test.go @@ -652,6 +652,183 @@ func TestUpdateTaskExecutionModelRunningToFailed(t *testing.T) { } +func TestUpdateTaskExecutionModelFilterLogLinks(t *testing.T) { + existingClosure := &admin.TaskExecutionClosure{ + Phase: core.TaskExecution_QUEUED, + StartedAt: taskEventOccurredAtProto, + CreatedAt: taskEventOccurredAtProto, + UpdatedAt: taskEventOccurredAtProto, + Logs: []*core.TaskLog{}, + Reason: "task submitted to k8s", + Reasons: []*admin.Reason{ + { + OccurredAt: taskEventOccurredAtProto, + Message: "task submitted to k8s", + }, + }, + } + + closureBytes, err := proto.Marshal(existingClosure) + assert.Nil(t, err) + + existingTaskExecution := models.TaskExecution{ + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: sampleTaskID.Project, + Domain: sampleTaskID.Domain, + Name: sampleTaskID.Name, + Version: sampleTaskID.Version, + }, + NodeExecutionKey: models.NodeExecutionKey{ + NodeID: sampleNodeExecID.NodeId, + ExecutionKey: models.ExecutionKey{ + Project: sampleNodeExecID.ExecutionId.Project, + Domain: sampleNodeExecID.ExecutionId.Domain, + Name: sampleNodeExecID.ExecutionId.Name, + }, + }, + RetryAttempt: &retryAttemptValue, + }, + Phase: "TaskExecutionPhase_TASK_PHASE_QUEUED", + InputURI: "input uri", + Closure: closureBytes, + StartedAt: &taskEventOccurredAt, + TaskExecutionCreatedAt: &taskEventOccurredAt, + TaskExecutionUpdatedAt: &taskEventOccurredAt, + } + + occuredAt := taskEventOccurredAt.Add(time.Minute) + occuredAtProto, err := ptypes.TimestampProto(occuredAt) + assert.Nil(t, err) + + updatedEventRequest := &admin.TaskExecutionEventRequest{ + Event: &event.TaskExecutionEvent{ + TaskId: sampleTaskID, + ParentNodeExecutionId: sampleNodeExecID, + Phase: core.TaskExecution_QUEUED, + OccurredAt: occuredAtProto, + Logs: []*core.TaskLog{ + { + Uri: "uri-show-pending", + ShowWhilePending: true, + }, + { + Uri: "uri-default", + }, + }, + Reason: "task update", + }, + } + + err = UpdateTaskExecutionModel(context.TODO(), updatedEventRequest, &existingTaskExecution, + interfaces.InlineEventDataPolicyStoreInline, commonMocks.GetMockStorageClient()) + assert.Nil(t, err) + + updatedClosure := &admin.TaskExecutionClosure{} + err = proto.Unmarshal(existingTaskExecution.Closure, updatedClosure) + assert.Nil(t, err) + + assert.Equal(t, updatedClosure.Logs, []*core.TaskLog{ + { + Uri: "uri-show-pending", + ShowWhilePending: true, + }, + }, + ) + +} + +func TestUpdateTaskExecutionModelFilterLogLinksArray(t *testing.T) { + existingClosure := &admin.TaskExecutionClosure{ + Phase: core.TaskExecution_RUNNING, + StartedAt: taskEventOccurredAtProto, + CreatedAt: taskEventOccurredAtProto, + UpdatedAt: taskEventOccurredAtProto, + Logs: []*core.TaskLog{}, + Reason: "task started", + Reasons: []*admin.Reason{ + { + OccurredAt: taskEventOccurredAtProto, + Message: "task started", + }, + }, + Metadata: &event.TaskExecutionMetadata{ + ExternalResources: []*event.ExternalResourceInfo{ + { + Logs: []*core.TaskLog{ + { + Uri: "uri-default", + }, + { + Uri: "uri-hide-finished", + HideOnceFinished: true, + }, + }, + }, + }, + }, + } + + closureBytes, err := proto.Marshal(existingClosure) + assert.Nil(t, err) + + existingTaskExecution := models.TaskExecution{ + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: sampleTaskID.Project, + Domain: sampleTaskID.Domain, + Name: sampleTaskID.Name, + Version: sampleTaskID.Version, + }, + NodeExecutionKey: models.NodeExecutionKey{ + NodeID: sampleNodeExecID.NodeId, + ExecutionKey: models.ExecutionKey{ + Project: sampleNodeExecID.ExecutionId.Project, + Domain: sampleNodeExecID.ExecutionId.Domain, + Name: sampleNodeExecID.ExecutionId.Name, + }, + }, + RetryAttempt: &retryAttemptValue, + }, + Phase: "TaskExecutionPhase_TASK_PHASE_RUNNING", + InputURI: "input uri", + Closure: closureBytes, + StartedAt: &taskEventOccurredAt, + TaskExecutionCreatedAt: &taskEventOccurredAt, + TaskExecutionUpdatedAt: &taskEventOccurredAt, + } + + occuredAt := taskEventOccurredAt.Add(time.Minute) + occuredAtProto, err := ptypes.TimestampProto(occuredAt) + assert.Nil(t, err) + + failedEventRequest := &admin.TaskExecutionEventRequest{ + Event: &event.TaskExecutionEvent{ + TaskId: sampleTaskID, + ParentNodeExecutionId: sampleNodeExecID, + Phase: core.TaskExecution_FAILED, + OccurredAt: occuredAtProto, + Reason: "something went wrong", + }, + } + + err = UpdateTaskExecutionModel(context.TODO(), failedEventRequest, &existingTaskExecution, + interfaces.InlineEventDataPolicyStoreInline, commonMocks.GetMockStorageClient()) + assert.Nil(t, err) + + updatedClosure := &admin.TaskExecutionClosure{} + err = proto.Unmarshal(existingTaskExecution.Closure, updatedClosure) + assert.Nil(t, err) + + assert.Equal(t, updatedClosure.Metadata.ExternalResources[0].Logs, []*core.TaskLog{ + { + Uri: "uri-default", + }, + }, + ) + +} + func TestUpdateTaskExecutionModelSingleEvents(t *testing.T) { existingClosure := &admin.TaskExecutionClosure{ Phase: core.TaskExecution_RUNNING, @@ -1208,6 +1385,125 @@ func TestMergeLogs(t *testing.T) { } } +func TestFilterLogsByPhase(t *testing.T) { + type testCase struct { + existing []*core.TaskLog + expected []*core.TaskLog + phase core.TaskExecution_Phase + name string + } + + testCases := []testCase{ + { + existing: []*core.TaskLog{ + { + Uri: "default-uri", + ShowWhilePending: false, + HideOnceFinished: false, + }, + { + Uri: "show-pending-uri", + ShowWhilePending: true, + HideOnceFinished: false, + }, + { + Uri: "hide-finished-uri", + ShowWhilePending: false, + HideOnceFinished: true, + }, + }, + expected: []*core.TaskLog{ + { + Uri: "show-pending-uri", + ShowWhilePending: true, + HideOnceFinished: false, + }, + }, + phase: core.TaskExecution_QUEUED, + name: "Filtered logs in QUEUED phase", + }, + { + existing: []*core.TaskLog{ + { + Uri: "default-uri", + ShowWhilePending: false, + HideOnceFinished: false, + }, + { + Uri: "show-pending-uri", + ShowWhilePending: true, + HideOnceFinished: false, + }, + { + Uri: "hide-finished-uri", + ShowWhilePending: false, + HideOnceFinished: true, + }, + }, + expected: []*core.TaskLog{ + { + Uri: "default-uri", + ShowWhilePending: false, + HideOnceFinished: false, + }, + { + Uri: "show-pending-uri", + ShowWhilePending: true, + HideOnceFinished: false, + }, + { + Uri: "hide-finished-uri", + ShowWhilePending: false, + HideOnceFinished: true, + }, + }, + phase: core.TaskExecution_RUNNING, + name: "Filtered logs in RUNNING phase", + }, + { + existing: []*core.TaskLog{ + { + Uri: "default-uri", + ShowWhilePending: false, + HideOnceFinished: false, + }, + { + Uri: "show-pending-uri", + ShowWhilePending: true, + HideOnceFinished: false, + }, + { + Uri: "hide-finished-uri", + ShowWhilePending: false, + HideOnceFinished: true, + }, + }, + expected: []*core.TaskLog{ + { + Uri: "default-uri", + ShowWhilePending: false, + HideOnceFinished: false, + }, + { + Uri: "show-pending-uri", + ShowWhilePending: true, + HideOnceFinished: false, + }, + }, + phase: core.TaskExecution_SUCCEEDED, + name: "Filtered logs in terminated phase", + }, + } + for _, filterTestCase := range testCases { + filteredLogs := filterLogsByPhase(filterTestCase.existing, filterTestCase.phase) + + assert.Equal(t, len(filterTestCase.expected), len(filteredLogs), fmt.Sprintf("%s failed", filterTestCase.name)) + for idx, expectedLog := range filterTestCase.expected { + assert.True(t, proto.Equal(expectedLog, filteredLogs[idx]), fmt.Sprintf("%s failed", filterTestCase.name)) + } + } +} + func TestMergeCustoms(t *testing.T) { t.Run("nothing to do", func(t *testing.T) { custom, err := mergeCustom(nil, nil) diff --git a/flyteidl/clients/go/assets/admin.swagger.json b/flyteidl/clients/go/assets/admin.swagger.json index 4e944181b5..e1f0b29579 100644 --- a/flyteidl/clients/go/assets/admin.swagger.json +++ b/flyteidl/clients/go/assets/admin.swagger.json @@ -8117,6 +8117,12 @@ }, "ttl": { "type": "string" + }, + "ShowWhilePending": { + "type": "boolean" + }, + "HideOnceFinished": { + "type": "boolean" } }, "title": "Log information for the task that is specific to a log sink\nWhen our log story is flushed out, we may have more metadata here like log link expiry" diff --git a/flyteidl/gen/pb-es/flyteidl/core/execution_pb.ts b/flyteidl/gen/pb-es/flyteidl/core/execution_pb.ts index e931e1a789..5283936b1f 100644 --- a/flyteidl/gen/pb-es/flyteidl/core/execution_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/core/execution_pb.ts @@ -427,6 +427,16 @@ export class TaskLog extends Message { */ ttl?: Duration; + /** + * @generated from field: bool ShowWhilePending = 5; + */ + ShowWhilePending = false; + + /** + * @generated from field: bool HideOnceFinished = 6; + */ + HideOnceFinished = false; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -439,6 +449,8 @@ export class TaskLog extends Message { { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "message_format", kind: "enum", T: proto3.getEnumType(TaskLog_MessageFormat) }, { no: 4, name: "ttl", kind: "message", T: Duration }, + { no: 5, name: "ShowWhilePending", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "HideOnceFinished", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TaskLog { diff --git a/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go b/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go index fe558cf94c..7befaca1ac 100644 --- a/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go @@ -583,10 +583,12 @@ type TaskLog struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - MessageFormat TaskLog_MessageFormat `protobuf:"varint,3,opt,name=message_format,json=messageFormat,proto3,enum=flyteidl.core.TaskLog_MessageFormat" json:"message_format,omitempty"` - Ttl *durationpb.Duration `protobuf:"bytes,4,opt,name=ttl,proto3" json:"ttl,omitempty"` + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + MessageFormat TaskLog_MessageFormat `protobuf:"varint,3,opt,name=message_format,json=messageFormat,proto3,enum=flyteidl.core.TaskLog_MessageFormat" json:"message_format,omitempty"` + Ttl *durationpb.Duration `protobuf:"bytes,4,opt,name=ttl,proto3" json:"ttl,omitempty"` + ShowWhilePending bool `protobuf:"varint,5,opt,name=ShowWhilePending,proto3" json:"ShowWhilePending,omitempty"` + HideOnceFinished bool `protobuf:"varint,6,opt,name=HideOnceFinished,proto3" json:"HideOnceFinished,omitempty"` } func (x *TaskLog) Reset() { @@ -649,6 +651,20 @@ func (x *TaskLog) GetTtl() *durationpb.Duration { return nil } +func (x *TaskLog) GetShowWhilePending() bool { + if x != nil { + return x.ShowWhilePending + } + return false +} + +func (x *TaskLog) GetHideOnceFinished() bool { + if x != nil { + return x.HideOnceFinished + } + return false +} + // Represents customized execution run-time attributes. type QualityOfServiceSpec struct { state protoimpl.MessageState @@ -832,7 +848,7 @@ var file_flyteidl_core_execution_proto_rawDesc = []byte{ 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2e, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x53, - 0x54, 0x45, 0x4d, 0x10, 0x02, 0x22, 0xda, 0x01, 0x0a, 0x07, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, + 0x54, 0x45, 0x4d, 0x10, 0x02, 0x22, 0xb2, 0x02, 0x0a, 0x07, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, @@ -843,40 +859,46 @@ var file_flyteidl_core_execution_proto_rawDesc = []byte{ 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, - 0x6c, 0x22, 0x2f, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x07, 0x0a, 0x03, 0x43, 0x53, 0x56, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, - 0x10, 0x02, 0x22, 0x5a, 0x0a, 0x14, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x0f, 0x71, 0x75, - 0x65, 0x75, 0x65, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x71, 0x75, 0x65, 0x75, 0x65, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, 0xce, - 0x01, 0x0a, 0x10, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, - 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x51, 0x75, + 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x68, 0x6f, 0x77, 0x57, 0x68, 0x69, 0x6c, 0x65, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x53, 0x68, 0x6f, + 0x77, 0x57, 0x68, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, + 0x10, 0x48, 0x69, 0x64, 0x65, 0x4f, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x48, 0x69, 0x64, 0x65, 0x4f, 0x6e, 0x63, + 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x0d, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x43, 0x53, 0x56, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0x5a, 0x0a, 0x14, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x48, 0x00, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x34, 0x0a, 0x04, 0x54, 0x69, - 0x65, 0x72, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, - 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x03, - 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0xb4, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x12, 0x42, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x69, 0x6e, 0x67, 0x5f, 0x62, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x69, 0x6e, 0x67, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, 0xce, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, + 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x22, 0x34, 0x0a, 0x04, 0x54, 0x69, 0x65, 0x72, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, + 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, + 0x48, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, + 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x03, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xb4, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, + 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x6f, 0x72, + 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, + 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, + 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, + 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json index 4e944181b5..e1f0b29579 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json @@ -8117,6 +8117,12 @@ }, "ttl": { "type": "string" + }, + "ShowWhilePending": { + "type": "boolean" + }, + "HideOnceFinished": { + "type": "boolean" } }, "title": "Log information for the task that is specific to a log sink\nWhen our log story is flushed out, we may have more metadata here like log link expiry" diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json index a2d429d019..a0e8cfed39 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json @@ -1724,6 +1724,12 @@ }, "ttl": { "type": "string" + }, + "ShowWhilePending": { + "type": "boolean" + }, + "HideOnceFinished": { + "type": "boolean" } }, "title": "Log information for the task that is specific to a log sink\nWhen our log story is flushed out, we may have more metadata here like log link expiry" diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index cceab76647..3485ae15fc 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -5743,6 +5743,12 @@ export namespace flyteidl { /** TaskLog ttl */ ttl?: (google.protobuf.IDuration|null); + + /** TaskLog ShowWhilePending */ + ShowWhilePending?: (boolean|null); + + /** TaskLog HideOnceFinished */ + HideOnceFinished?: (boolean|null); } /** Represents a TaskLog. */ @@ -5766,6 +5772,12 @@ export namespace flyteidl { /** TaskLog ttl. */ public ttl?: (google.protobuf.IDuration|null); + /** TaskLog ShowWhilePending. */ + public ShowWhilePending: boolean; + + /** TaskLog HideOnceFinished. */ + public HideOnceFinished: boolean; + /** * Creates a new TaskLog instance using the specified properties. * @param [properties] Properties to set diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index e29f5fc9ff..6d7ae28690 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -13800,6 +13800,8 @@ * @property {string|null} [name] TaskLog name * @property {flyteidl.core.TaskLog.MessageFormat|null} [messageFormat] TaskLog messageFormat * @property {google.protobuf.IDuration|null} [ttl] TaskLog ttl + * @property {boolean|null} [ShowWhilePending] TaskLog ShowWhilePending + * @property {boolean|null} [HideOnceFinished] TaskLog HideOnceFinished */ /** @@ -13849,6 +13851,22 @@ */ TaskLog.prototype.ttl = null; + /** + * TaskLog ShowWhilePending. + * @member {boolean} ShowWhilePending + * @memberof flyteidl.core.TaskLog + * @instance + */ + TaskLog.prototype.ShowWhilePending = false; + + /** + * TaskLog HideOnceFinished. + * @member {boolean} HideOnceFinished + * @memberof flyteidl.core.TaskLog + * @instance + */ + TaskLog.prototype.HideOnceFinished = false; + /** * Creates a new TaskLog instance using the specified properties. * @function create @@ -13881,6 +13899,10 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageFormat); if (message.ttl != null && message.hasOwnProperty("ttl")) $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ShowWhilePending != null && message.hasOwnProperty("ShowWhilePending")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.ShowWhilePending); + if (message.HideOnceFinished != null && message.hasOwnProperty("HideOnceFinished")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.HideOnceFinished); return writer; }; @@ -13914,6 +13936,12 @@ case 4: message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; + case 5: + message.ShowWhilePending = reader.bool(); + break; + case 6: + message.HideOnceFinished = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -13953,6 +13981,12 @@ if (error) return "ttl." + error; } + if (message.ShowWhilePending != null && message.hasOwnProperty("ShowWhilePending")) + if (typeof message.ShowWhilePending !== "boolean") + return "ShowWhilePending: boolean expected"; + if (message.HideOnceFinished != null && message.hasOwnProperty("HideOnceFinished")) + if (typeof message.HideOnceFinished !== "boolean") + return "HideOnceFinished: boolean expected"; return null; }; diff --git a/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.py b/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.py index c2c9810083..2d59497e3a 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.py @@ -14,7 +14,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lyteidl/core/execution.proto\x12\rflyteidl.core\x1a\x1egoogle/protobuf/duration.proto\"\xa7\x01\n\x11WorkflowExecution\"\x91\x01\n\x05Phase\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0e\n\nSUCCEEDING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\x0b\n\x07\x46\x41ILING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0b\n\x07\x41\x42ORTED\x10\x07\x12\r\n\tTIMED_OUT\x10\x08\x12\x0c\n\x08\x41\x42ORTING\x10\t\"\xb6\x01\n\rNodeExecution\"\xa4\x01\n\x05Phase\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0b\n\x07\x46\x41ILING\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\x12\x0b\n\x07SKIPPED\x10\x07\x12\r\n\tTIMED_OUT\x10\x08\x12\x13\n\x0f\x44YNAMIC_RUNNING\x10\t\x12\r\n\tRECOVERED\x10\n\"\x96\x01\n\rTaskExecution\"\x84\x01\n\x05Phase\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x10\n\x0cINITIALIZING\x10\x06\x12\x19\n\x15WAITING_FOR_RESOURCES\x10\x07\"\xc8\x01\n\x0e\x45xecutionError\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12\x1b\n\terror_uri\x18\x03 \x01(\tR\x08\x65rrorUri\x12;\n\x04kind\x18\x04 \x01(\x0e\x32\'.flyteidl.core.ExecutionError.ErrorKindR\x04kind\".\n\tErrorKind\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04USER\x10\x01\x12\n\n\x06SYSTEM\x10\x02\"\xda\x01\n\x07TaskLog\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12K\n\x0emessage_format\x18\x03 \x01(\x0e\x32$.flyteidl.core.TaskLog.MessageFormatR\rmessageFormat\x12+\n\x03ttl\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03ttl\"/\n\rMessageFormat\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03\x43SV\x10\x01\x12\x08\n\x04JSON\x10\x02\"Z\n\x14QualityOfServiceSpec\x12\x42\n\x0fqueueing_budget\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x0equeueingBudget\"\xce\x01\n\x10QualityOfService\x12:\n\x04tier\x18\x01 \x01(\x0e\x32$.flyteidl.core.QualityOfService.TierH\x00R\x04tier\x12\x39\n\x04spec\x18\x02 \x01(\x0b\x32#.flyteidl.core.QualityOfServiceSpecH\x00R\x04spec\"4\n\x04Tier\x12\r\n\tUNDEFINED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x07\n\x03LOW\x10\x03\x42\r\n\x0b\x64\x65signationB\xb4\x01\n\x11\x63om.flyteidl.coreB\x0e\x45xecutionProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lyteidl/core/execution.proto\x12\rflyteidl.core\x1a\x1egoogle/protobuf/duration.proto\"\xa7\x01\n\x11WorkflowExecution\"\x91\x01\n\x05Phase\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0e\n\nSUCCEEDING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\x0b\n\x07\x46\x41ILING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0b\n\x07\x41\x42ORTED\x10\x07\x12\r\n\tTIMED_OUT\x10\x08\x12\x0c\n\x08\x41\x42ORTING\x10\t\"\xb6\x01\n\rNodeExecution\"\xa4\x01\n\x05Phase\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0b\n\x07\x46\x41ILING\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\x12\x0b\n\x07SKIPPED\x10\x07\x12\r\n\tTIMED_OUT\x10\x08\x12\x13\n\x0f\x44YNAMIC_RUNNING\x10\t\x12\r\n\tRECOVERED\x10\n\"\x96\x01\n\rTaskExecution\"\x84\x01\n\x05Phase\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x10\n\x0cINITIALIZING\x10\x06\x12\x19\n\x15WAITING_FOR_RESOURCES\x10\x07\"\xc8\x01\n\x0e\x45xecutionError\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12\x1b\n\terror_uri\x18\x03 \x01(\tR\x08\x65rrorUri\x12;\n\x04kind\x18\x04 \x01(\x0e\x32\'.flyteidl.core.ExecutionError.ErrorKindR\x04kind\".\n\tErrorKind\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04USER\x10\x01\x12\n\n\x06SYSTEM\x10\x02\"\xb2\x02\n\x07TaskLog\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12K\n\x0emessage_format\x18\x03 \x01(\x0e\x32$.flyteidl.core.TaskLog.MessageFormatR\rmessageFormat\x12+\n\x03ttl\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03ttl\x12*\n\x10ShowWhilePending\x18\x05 \x01(\x08R\x10ShowWhilePending\x12*\n\x10HideOnceFinished\x18\x06 \x01(\x08R\x10HideOnceFinished\"/\n\rMessageFormat\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03\x43SV\x10\x01\x12\x08\n\x04JSON\x10\x02\"Z\n\x14QualityOfServiceSpec\x12\x42\n\x0fqueueing_budget\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x0equeueingBudget\"\xce\x01\n\x10QualityOfService\x12:\n\x04tier\x18\x01 \x01(\x0e\x32$.flyteidl.core.QualityOfService.TierH\x00R\x04tier\x12\x39\n\x04spec\x18\x02 \x01(\x0b\x32#.flyteidl.core.QualityOfServiceSpecH\x00R\x04spec\"4\n\x04Tier\x12\r\n\tUNDEFINED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x07\n\x03LOW\x10\x03\x42\r\n\x0b\x64\x65signationB\xb4\x01\n\x11\x63om.flyteidl.coreB\x0e\x45xecutionProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -40,13 +40,13 @@ _globals['_EXECUTIONERROR_ERRORKIND']._serialized_start=743 _globals['_EXECUTIONERROR_ERRORKIND']._serialized_end=789 _globals['_TASKLOG']._serialized_start=792 - _globals['_TASKLOG']._serialized_end=1010 - _globals['_TASKLOG_MESSAGEFORMAT']._serialized_start=963 - _globals['_TASKLOG_MESSAGEFORMAT']._serialized_end=1010 - _globals['_QUALITYOFSERVICESPEC']._serialized_start=1012 - _globals['_QUALITYOFSERVICESPEC']._serialized_end=1102 - _globals['_QUALITYOFSERVICE']._serialized_start=1105 - _globals['_QUALITYOFSERVICE']._serialized_end=1311 - _globals['_QUALITYOFSERVICE_TIER']._serialized_start=1244 - _globals['_QUALITYOFSERVICE_TIER']._serialized_end=1296 + _globals['_TASKLOG']._serialized_end=1098 + _globals['_TASKLOG_MESSAGEFORMAT']._serialized_start=1051 + _globals['_TASKLOG_MESSAGEFORMAT']._serialized_end=1098 + _globals['_QUALITYOFSERVICESPEC']._serialized_start=1100 + _globals['_QUALITYOFSERVICESPEC']._serialized_end=1190 + _globals['_QUALITYOFSERVICE']._serialized_start=1193 + _globals['_QUALITYOFSERVICE']._serialized_end=1399 + _globals['_QUALITYOFSERVICE_TIER']._serialized_start=1332 + _globals['_QUALITYOFSERVICE_TIER']._serialized_end=1384 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.pyi index 2508c1b4ac..5c28a55418 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/core/execution_pb2.pyi @@ -103,7 +103,7 @@ class ExecutionError(_message.Message): def __init__(self, code: _Optional[str] = ..., message: _Optional[str] = ..., error_uri: _Optional[str] = ..., kind: _Optional[_Union[ExecutionError.ErrorKind, str]] = ...) -> None: ... class TaskLog(_message.Message): - __slots__ = ["uri", "name", "message_format", "ttl"] + __slots__ = ["uri", "name", "message_format", "ttl", "ShowWhilePending", "HideOnceFinished"] class MessageFormat(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] UNKNOWN: _ClassVar[TaskLog.MessageFormat] @@ -116,11 +116,15 @@ class TaskLog(_message.Message): NAME_FIELD_NUMBER: _ClassVar[int] MESSAGE_FORMAT_FIELD_NUMBER: _ClassVar[int] TTL_FIELD_NUMBER: _ClassVar[int] + SHOWWHILEPENDING_FIELD_NUMBER: _ClassVar[int] + HIDEONCEFINISHED_FIELD_NUMBER: _ClassVar[int] uri: str name: str message_format: TaskLog.MessageFormat ttl: _duration_pb2.Duration - def __init__(self, uri: _Optional[str] = ..., name: _Optional[str] = ..., message_format: _Optional[_Union[TaskLog.MessageFormat, str]] = ..., ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + ShowWhilePending: bool + HideOnceFinished: bool + def __init__(self, uri: _Optional[str] = ..., name: _Optional[str] = ..., message_format: _Optional[_Union[TaskLog.MessageFormat, str]] = ..., ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., ShowWhilePending: bool = ..., HideOnceFinished: bool = ...) -> None: ... class QualityOfServiceSpec(_message.Message): __slots__ = ["queueing_budget"] diff --git a/flyteidl/gen/pb_rust/flyteidl.core.rs b/flyteidl/gen/pb_rust/flyteidl.core.rs index 215fa60f82..2b8cad3ef2 100644 --- a/flyteidl/gen/pb_rust/flyteidl.core.rs +++ b/flyteidl/gen/pb_rust/flyteidl.core.rs @@ -2155,6 +2155,10 @@ pub struct TaskLog { pub message_format: i32, #[prost(message, optional, tag="4")] pub ttl: ::core::option::Option<::prost_types::Duration>, + #[prost(bool, tag="5")] + pub show_while_pending: bool, + #[prost(bool, tag="6")] + pub hide_once_finished: bool, } /// Nested message and enum types in `TaskLog`. pub mod task_log { diff --git a/flyteidl/go.mod b/flyteidl/go.mod index 17673db704..d80bbbfa6d 100644 --- a/flyteidl/go.mod +++ b/flyteidl/go.mod @@ -7,9 +7,11 @@ toolchain go1.21.3 require ( github.com/flyteorg/flyte/flytestdlib v0.0.0-00010101000000-000000000000 github.com/go-test/deep v1.0.7 + github.com/golang/glog v1.2.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 github.com/jinzhu/copier v0.3.5 github.com/mitchellh/mapstructure v1.5.0 @@ -19,6 +21,7 @@ require ( github.com/stretchr/testify v1.9.0 golang.org/x/net v0.23.0 golang.org/x/oauth2 v0.16.0 + google.golang.org/api v0.155.0 google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 google.golang.org/grpc v1.62.1 google.golang.org/protobuf v1.33.0 @@ -100,7 +103,6 @@ require ( golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.155.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect diff --git a/flyteidl/go.sum b/flyteidl/go.sum index bfcf19eb85..c407c8e14b 100644 --- a/flyteidl/go.sum +++ b/flyteidl/go.sum @@ -224,6 +224,7 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdR github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= diff --git a/flyteidl/protos/flyteidl/core/execution.proto b/flyteidl/protos/flyteidl/core/execution.proto index d2eabdc577..4d55198955 100644 --- a/flyteidl/protos/flyteidl/core/execution.proto +++ b/flyteidl/protos/flyteidl/core/execution.proto @@ -89,6 +89,8 @@ message TaskLog { string name = 2; MessageFormat message_format = 3; google.protobuf.Duration ttl = 4; + bool ShowWhilePending = 5; + bool HideOnceFinished = 6; } // Represents customized execution run-time attributes. diff --git a/flyteplugins/go/tasks/logs/logging_utils.go b/flyteplugins/go/tasks/logs/logging_utils.go index 45d12624de..3322cc37d8 100644 --- a/flyteplugins/go/tasks/logs/logging_utils.go +++ b/flyteplugins/go/tasks/logs/logging_utils.go @@ -29,9 +29,11 @@ func GetLogsForContainerInPod(ctx context.Context, logPlugin tasklog.Plugin, tas return nil, nil } + containerID := v1.ContainerStatus{}.ContainerID if uint32(len(pod.Status.ContainerStatuses)) <= index { logger.Errorf(ctx, "containerStatus IndexOutOfBound, requested [%d], but total containerStatuses [%d] in pod phase [%v]", index, len(pod.Status.ContainerStatuses), pod.Status.Phase) - return nil, nil + } else { + containerID = pod.Status.ContainerStatuses[index].ContainerID } startTime := pod.CreationTimestamp.Unix() @@ -43,7 +45,7 @@ func GetLogsForContainerInPod(ctx context.Context, logPlugin tasklog.Plugin, tas PodUID: string(pod.GetUID()), Namespace: pod.Namespace, ContainerName: pod.Spec.Containers[index].Name, - ContainerID: pod.Status.ContainerStatuses[index].ContainerID, + ContainerID: containerID, LogName: nameSuffix, PodRFC3339StartTime: time.Unix(startTime, 0).Format(time.RFC3339), PodRFC3339FinishTime: time.Unix(finishTime, 0).Format(time.RFC3339), diff --git a/flyteplugins/go/tasks/pluginmachinery/core/phase.go b/flyteplugins/go/tasks/pluginmachinery/core/phase.go index 6c80cc4d24..376f261fac 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/phase.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/phase.go @@ -226,7 +226,7 @@ func PhaseInfoQueued(t time.Time, version uint32, reason string) PhaseInfo { return pi } -func PhaseInfoQueuedWithTaskInfo(version uint32, reason string, info *TaskInfo) PhaseInfo { +func PhaseInfoQueuedWithTaskInfo(t time.Time, version uint32, reason string, info *TaskInfo) PhaseInfo { pi := phaseInfo(PhaseQueued, version, nil, info, false) pi.reason = reason return pi diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go index 036d5e80f5..db62aeb4e7 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go @@ -599,8 +599,8 @@ func BuildIdentityPod() *v1.Pod { // resources requested is beyond the capability of the system. for this we will rely on configuration // and hence input gates. We should not allow bad requests that Request for large number of resource through. // In the case it makes through, we will fail after timeout -func DemystifyPending(status v1.PodStatus) (pluginsCore.PhaseInfo, error) { - phaseInfo, t := demystifyPendingHelper(status) +func DemystifyPending(status v1.PodStatus, info pluginsCore.TaskInfo) (pluginsCore.PhaseInfo, error) { + phaseInfo, t := demystifyPendingHelper(status, info) if phaseInfo.Phase().IsTerminal() { return phaseInfo, nil @@ -617,13 +617,14 @@ func DemystifyPending(status v1.PodStatus) (pluginsCore.PhaseInfo, error) { return phaseInfo, nil } - return pluginsCore.PhaseInfoQueued(time.Now(), pluginsCore.DefaultPhaseVersion, "Scheduling"), nil + return pluginsCore.PhaseInfoQueuedWithTaskInfo(time.Now(), pluginsCore.DefaultPhaseVersion, "Scheduling", phaseInfo.Info()), nil } -func demystifyPendingHelper(status v1.PodStatus) (pluginsCore.PhaseInfo, time.Time) { +func demystifyPendingHelper(status v1.PodStatus, info pluginsCore.TaskInfo) (pluginsCore.PhaseInfo, time.Time) { // Search over the difference conditions in the status object. Note that the 'Pending' this function is // demystifying is the 'phase' of the pod status. This is different than the PodReady condition type also used below - phaseInfo := pluginsCore.PhaseInfoUndefined + phaseInfo := pluginsCore.PhaseInfoQueuedWithTaskInfo(time.Now(), pluginsCore.DefaultPhaseVersion, "Demistify Pending", &info) + t := time.Now() for _, c := range status.Conditions { t = c.LastTransitionTime.Time @@ -631,7 +632,7 @@ func demystifyPendingHelper(status v1.PodStatus) (pluginsCore.PhaseInfo, time.Ti case v1.PodScheduled: if c.Status == v1.ConditionFalse { // Waiting to be scheduled. This usually refers to inability to acquire resources. - return pluginsCore.PhaseInfoQueued(t, pluginsCore.DefaultPhaseVersion, fmt.Sprintf("%s:%s", c.Reason, c.Message)), t + return pluginsCore.PhaseInfoQueuedWithTaskInfo(t, pluginsCore.DefaultPhaseVersion, fmt.Sprintf("%s:%s", c.Reason, c.Message), phaseInfo.Info()), t } case v1.PodReasonUnschedulable: @@ -644,7 +645,7 @@ func demystifyPendingHelper(status v1.PodStatus) (pluginsCore.PhaseInfo, time.Ti // reason: Unschedulable // status: "False" // type: PodScheduled - return pluginsCore.PhaseInfoQueued(t, pluginsCore.DefaultPhaseVersion, fmt.Sprintf("%s:%s", c.Reason, c.Message)), t + return pluginsCore.PhaseInfoQueuedWithTaskInfo(t, pluginsCore.DefaultPhaseVersion, fmt.Sprintf("%s:%s", c.Reason, c.Message), phaseInfo.Info()), t case v1.PodReady: if c.Status == v1.ConditionFalse { diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go index 7010247ee5..0c2e9ef5cc 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper_test.go @@ -1210,7 +1210,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseQueued, taskStatus.Phase()) }) @@ -1225,7 +1225,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseQueued, taskStatus.Phase()) }) @@ -1240,7 +1240,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseQueued, taskStatus.Phase()) }) @@ -1255,7 +1255,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseQueued, taskStatus.Phase()) }) @@ -1290,7 +1290,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseInitializing, taskStatus.Phase()) }) @@ -1307,7 +1307,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseInitializing, taskStatus.Phase()) }) @@ -1324,7 +1324,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseInitializing, taskStatus.Phase()) }) @@ -1343,7 +1343,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s2) + taskStatus, err := DemystifyPending(s2, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseInitializing, taskStatus.Phase()) }) @@ -1362,7 +1362,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s2) + taskStatus, err := DemystifyPending(s2, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseRetryableFailure, taskStatus.Phase()) assert.True(t, taskStatus.CleanupOnFailure()) @@ -1380,7 +1380,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhasePermanentFailure, taskStatus.Phase()) assert.True(t, taskStatus.CleanupOnFailure()) @@ -1398,7 +1398,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseRetryableFailure, taskStatus.Phase()) assert.True(t, taskStatus.CleanupOnFailure()) @@ -1416,7 +1416,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseRetryableFailure, taskStatus.Phase()) assert.True(t, taskStatus.CleanupOnFailure()) @@ -1436,7 +1436,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s2) + taskStatus, err := DemystifyPending(s2, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseInitializing, taskStatus.Phase()) }) @@ -1455,7 +1455,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s2) + taskStatus, err := DemystifyPending(s2, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhasePermanentFailure, taskStatus.Phase()) assert.True(t, taskStatus.CleanupOnFailure()) @@ -1475,7 +1475,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s2) + taskStatus, err := DemystifyPending(s2, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseInitializing, taskStatus.Phase()) }) @@ -1494,7 +1494,7 @@ func TestDemystifyPending(t *testing.T) { }, }, } - taskStatus, err := DemystifyPending(s2) + taskStatus, err := DemystifyPending(s2, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhasePermanentFailure, taskStatus.Phase()) assert.True(t, taskStatus.CleanupOnFailure()) @@ -1526,7 +1526,7 @@ func TestDemystifyPendingTimeout(t *testing.T) { s.Conditions[0].LastTransitionTime.Time = metav1.Now().Add(-config.GetK8sPluginConfig().PodPendingTimeout.Duration) t.Run("PodPendingExceedsTimeout", func(t *testing.T) { - taskStatus, err := DemystifyPending(s) + taskStatus, err := DemystifyPending(s, pluginsCore.TaskInfo{}) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseRetryableFailure, taskStatus.Phase()) assert.Equal(t, "PodPendingTimeout", taskStatus.Err().Code) @@ -1697,7 +1697,7 @@ func TestDemystifyPending_testcases(t *testing.T) { assert.NoError(t, err, "failed to read file %s", testFile) pod := &v1.Pod{} if assert.NoError(t, json.Unmarshal(data, pod), "failed to unmarshal json in %s. Expected of type v1.Pod", testFile) { - p, err := DemystifyPending(pod.Status) + p, err := DemystifyPending(pod.Status, pluginsCore.TaskInfo{}) if tt.isErr { assert.Error(t, err, "Error expected from method") } else { diff --git a/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go b/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go index 1bbe07c02a..38a84f9b2b 100644 --- a/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go @@ -165,3 +165,25 @@ func AbortBehaviorDelete(resource client.Object) AbortBehavior { DeleteResource: true, } } + +// if we have the same Phase as the previous evaluation and updated the Reason but not the PhaseVersion we must +// update the PhaseVersion so an event is sent to reflect the Reason update. this does not handle the Running +// Phase because the legacy used `DefaultPhaseVersion + 1` which will only increment to 1. + +func MaybeUpdatePhaseVersion(phaseInfo *pluginsCore.PhaseInfo, pluginState *PluginState) { + if phaseInfo.Phase() != pluginsCore.PhaseRunning && phaseInfo.Phase() == pluginState.Phase && + phaseInfo.Version() <= pluginState.PhaseVersion && phaseInfo.Reason() != pluginState.Reason { + + *phaseInfo = phaseInfo.WithVersion(pluginState.PhaseVersion + 1) + } +} + +func MaybeUpdatePhaseVersionFromPluginContext(phaseInfo *pluginsCore.PhaseInfo, pluginContext *PluginContext) error { + pluginState := PluginState{} + _, err := (*pluginContext).PluginStateReader().Get(&pluginState) + if err != nil { + return err + } + MaybeUpdatePhaseVersion(phaseInfo, &pluginState) + return nil +} diff --git a/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go b/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go index fa47fa4729..143cf02e43 100644 --- a/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go @@ -62,4 +62,6 @@ type TemplateLogPlugin struct { MessageFormat core.TaskLog_MessageFormat `json:"messageFormat" pflag:"-,Log Message Format."` // Deprecated: Please, do not use DeprecatedScheme TemplateScheme `json:"scheme" pflag:",Templating scheme to use. Supported values are Pod and TaskExecution."` + ShowWhilePending bool `json:"showWhilePending" pflag:",If true, the log link will be shown even if the task is in a pending state."` + HideOnceFinished bool `json:"hideOnceFinished" pflag:",If true, the log link will be hidden once the task has finished."` } diff --git a/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go b/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go index e5481ecfbd..19aae6ba7c 100644 --- a/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go +++ b/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go @@ -200,9 +200,11 @@ func (p TemplateLogPlugin) GetTaskLogs(input Input) (Output, error) { taskLogs := make([]*core.TaskLog, 0, len(p.TemplateURIs)) for _, templateURI := range p.TemplateURIs { taskLogs = append(taskLogs, &core.TaskLog{ - Uri: replaceAll(templateURI, templateVars), - Name: p.DisplayName + input.LogName, - MessageFormat: p.MessageFormat, + Uri: replaceAll(templateURI, templateVars), + Name: p.DisplayName + input.LogName, + MessageFormat: p.MessageFormat, + ShowWhilePending: p.ShowWhilePending, + HideOnceFinished: p.HideOnceFinished, }) } diff --git a/flyteplugins/go/tasks/plugins/k8s/dask/dask.go b/flyteplugins/go/tasks/plugins/k8s/dask/dask.go index 8257f00341..d3b4ab32f1 100644 --- a/flyteplugins/go/tasks/plugins/k8s/dask/dask.go +++ b/flyteplugins/go/tasks/plugins/k8s/dask/dask.go @@ -291,42 +291,44 @@ func (p daskResourceHandler) GetTaskPhase(ctx context.Context, pluginContext k8s OccurredAt: &occurredAt, } - // There is a short period between the `DaskJob` resource being created and `Status.JobStatus` being set by the `dask-operator`. - // In that period, the `JobStatus` will be an empty string. We're treating this as Initializing/Queuing. - isQueued := status == "" || - status == daskAPI.DaskJobCreated || - status == daskAPI.DaskJobClusterCreated - - if !isQueued { - taskExecID := pluginContext.TaskExecutionMetadata().GetTaskExecutionID() - o, err := logPlugin.GetTaskLogs( - tasklog.Input{ - Namespace: job.ObjectMeta.Namespace, - PodName: job.Status.JobRunnerPodName, - LogName: "(User logs)", - TaskExecutionID: taskExecID, - }, - ) - if err != nil { - return pluginsCore.PhaseInfoUndefined, err - } - info.Logs = o.TaskLogs + taskExecID := pluginContext.TaskExecutionMetadata().GetTaskExecutionID() + o, err := logPlugin.GetTaskLogs( + tasklog.Input{ + Namespace: job.ObjectMeta.Namespace, + PodName: job.Status.JobRunnerPodName, + LogName: "(User logs)", + TaskExecutionID: taskExecID, + }, + ) + if err != nil { + return pluginsCore.PhaseInfoUndefined, err } + info.Logs = o.TaskLogs + + var phaseInfo pluginsCore.PhaseInfo switch status { case "": - return pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "unknown", &info), nil + phaseInfo = pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "unknown", &info) case daskAPI.DaskJobCreated: - return pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "job created", &info), nil + phaseInfo = pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "job created", &info) case daskAPI.DaskJobClusterCreated: - return pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "cluster created", &info), nil + phaseInfo = pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "cluster created", &info) case daskAPI.DaskJobFailed: reason := "Dask Job failed" - return pluginsCore.PhaseInfoRetryableFailure(errors.DownstreamSystemError, reason, &info), nil + phaseInfo = pluginsCore.PhaseInfoRetryableFailure(errors.DownstreamSystemError, reason, &info) case daskAPI.DaskJobSuccessful: - return pluginsCore.PhaseInfoSuccess(&info), nil + phaseInfo = pluginsCore.PhaseInfoSuccess(&info) + default: + phaseInfo = pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, &info) } - return pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, &info), nil + + phaseVersionUpdateErr := k8s.MaybeUpdatePhaseVersionFromPluginContext(&phaseInfo, &pluginContext) + if phaseVersionUpdateErr != nil { + return phaseInfo, phaseVersionUpdateErr + } + + return phaseInfo, nil } func (daskResourceHandler) GetProperties() k8s.PluginProperties { diff --git a/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go b/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go index 616312ca12..fdb3e74182 100644 --- a/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/dask/dask_test.go @@ -2,6 +2,7 @@ package dask import ( "context" + "reflect" "testing" "time" @@ -147,7 +148,7 @@ func dummyDaskTaskTemplate(customImage string, resources *core.Resources, podTem } } -func dummyDaskTaskContext(taskTemplate *core.TaskTemplate, resources *v1.ResourceRequirements, extendedResources *core.ExtendedResources, isInterruptible bool) pluginsCore.TaskExecutionContext { +func dummyDaskTaskContext(taskTemplate *core.TaskTemplate, resources *v1.ResourceRequirements, extendedResources *core.ExtendedResources, isInterruptible bool, pluginState k8s.PluginState) pluginsCore.TaskExecutionContext { taskCtx := &mocks.TaskExecutionContext{} inputReader := &pluginIOMocks.InputReader{} @@ -198,6 +199,18 @@ func dummyDaskTaskContext(taskTemplate *core.TaskTemplate, resources *v1.Resourc overrides.OnGetContainerImage().Return("") taskExecutionMetadata.OnGetOverrides().Return(overrides) taskCtx.On("TaskExecutionMetadata").Return(taskExecutionMetadata) + + pluginStateReaderMock := mocks.PluginStateReader{} + pluginStateReaderMock.On("Get", mock.AnythingOfType(reflect.TypeOf(&pluginState).String())).Return( + func(v interface{}) uint8 { + *(v.(*k8s.PluginState)) = pluginState + return 0 + }, + func(v interface{}) error { + return nil + }) + + taskCtx.OnPluginStateReader().Return(&pluginStateReaderMock) return taskCtx } @@ -205,7 +218,7 @@ func TestBuildResourceDaskHappyPath(t *testing.T) { daskResourceHandler := daskResourceHandler{} taskTemplate := dummyDaskTaskTemplate("", nil, "") - taskContext := dummyDaskTaskContext(taskTemplate, &defaultResources, nil, false) + taskContext := dummyDaskTaskContext(taskTemplate, &defaultResources, nil, false, k8s.PluginState{}) r, err := daskResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) assert.NotNil(t, r) @@ -316,7 +329,7 @@ func TestBuildResourceDaskCustomImages(t *testing.T) { daskResourceHandler := daskResourceHandler{} taskTemplate := dummyDaskTaskTemplate(customImage, nil, "") - taskContext := dummyDaskTaskContext(taskTemplate, &v1.ResourceRequirements{}, nil, false) + taskContext := dummyDaskTaskContext(taskTemplate, &v1.ResourceRequirements{}, nil, false, k8s.PluginState{}) r, err := daskResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) assert.NotNil(t, r) @@ -349,7 +362,7 @@ func TestBuildResourceDaskDefaultResoureRequirements(t *testing.T) { daskResourceHandler := daskResourceHandler{} taskTemplate := dummyDaskTaskTemplate("", nil, "") - taskContext := dummyDaskTaskContext(taskTemplate, &flyteWorkflowResources, nil, false) + taskContext := dummyDaskTaskContext(taskTemplate, &flyteWorkflowResources, nil, false, k8s.PluginState{}) r, err := daskResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) assert.NotNil(t, r) @@ -406,7 +419,7 @@ func TestBuildResourcesDaskCustomResoureRequirements(t *testing.T) { daskResourceHandler := daskResourceHandler{} taskTemplate := dummyDaskTaskTemplate("", &protobufResources, "") - taskContext := dummyDaskTaskContext(taskTemplate, &flyteWorkflowResources, nil, false) + taskContext := dummyDaskTaskContext(taskTemplate, &flyteWorkflowResources, nil, false, k8s.PluginState{}) r, err := daskResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) assert.NotNil(t, r) @@ -461,7 +474,7 @@ func TestBuildResourceDaskInterruptible(t *testing.T) { daskResourceHandler := daskResourceHandler{} taskTemplate := dummyDaskTaskTemplate("", nil, "") - taskContext := dummyDaskTaskContext(taskTemplate, &defaultResources, nil, true) + taskContext := dummyDaskTaskContext(taskTemplate, &defaultResources, nil, true, k8s.PluginState{}) r, err := daskResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) assert.NotNil(t, r) @@ -495,7 +508,7 @@ func TestBuildResouceDaskUsePodTemplate(t *testing.T) { flytek8s.DefaultPodTemplateStore.Store(podTemplate) daskResourceHandler := daskResourceHandler{} taskTemplate := dummyDaskTaskTemplate("", nil, podTemplateName) - taskContext := dummyDaskTaskContext(taskTemplate, &defaultResources, nil, false) + taskContext := dummyDaskTaskContext(taskTemplate, &defaultResources, nil, false, k8s.PluginState{}) r, err := daskResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) assert.NotNil(t, r) @@ -615,7 +628,7 @@ func TestBuildResourceDaskExtendedResources(t *testing.T) { t.Run(f.name, func(t *testing.T) { taskTemplate := dummyDaskTaskTemplate("", nil, "") taskTemplate.ExtendedResources = f.extendedResourcesBase - taskContext := dummyDaskTaskContext(taskTemplate, f.resources, f.extendedResourcesOverride, false) + taskContext := dummyDaskTaskContext(taskTemplate, f.resources, f.extendedResourcesOverride, false, k8s.PluginState{}) daskResourceHandler := daskResourceHandler{} r, err := daskResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) @@ -681,7 +694,7 @@ func TestBuildIdentityResourceDask(t *testing.T) { } taskTemplate := dummyDaskTaskTemplate("", nil, "") - taskContext := dummyDaskTaskContext(taskTemplate, &v1.ResourceRequirements{}, nil, false) + taskContext := dummyDaskTaskContext(taskTemplate, &v1.ResourceRequirements{}, nil, false, k8s.PluginState{}) identityResources, err := daskResourceHandler.BuildIdentityResource(context.TODO(), taskContext.TaskExecutionMetadata()) if err != nil { panic(err) @@ -694,27 +707,27 @@ func TestGetTaskPhaseDask(t *testing.T) { ctx := context.TODO() taskTemplate := dummyDaskTaskTemplate("", nil, "") - taskCtx := dummyDaskTaskContext(taskTemplate, &v1.ResourceRequirements{}, nil, false) + taskCtx := dummyDaskTaskContext(taskTemplate, &v1.ResourceRequirements{}, nil, false, k8s.PluginState{}) taskPhase, err := daskResourceHandler.GetTaskPhase(ctx, taskCtx, dummyDaskJob("")) assert.NoError(t, err) assert.Equal(t, taskPhase.Phase(), pluginsCore.PhaseInitializing) assert.NotNil(t, taskPhase.Info()) - assert.Nil(t, taskPhase.Info().Logs) + assert.NotNil(t, taskPhase.Info().Logs) assert.Nil(t, err) taskPhase, err = daskResourceHandler.GetTaskPhase(ctx, taskCtx, dummyDaskJob(daskAPI.DaskJobCreated)) assert.NoError(t, err) assert.Equal(t, taskPhase.Phase(), pluginsCore.PhaseInitializing) assert.NotNil(t, taskPhase.Info()) - assert.Nil(t, taskPhase.Info().Logs) + assert.NotNil(t, taskPhase.Info().Logs) assert.Nil(t, err) taskPhase, err = daskResourceHandler.GetTaskPhase(ctx, taskCtx, dummyDaskJob(daskAPI.DaskJobClusterCreated)) assert.NoError(t, err) assert.Equal(t, taskPhase.Phase(), pluginsCore.PhaseInitializing) assert.NotNil(t, taskPhase.Info()) - assert.Nil(t, taskPhase.Info().Logs) + assert.NotNil(t, taskPhase.Info().Logs) assert.Nil(t, err) taskPhase, err = daskResourceHandler.GetTaskPhase(ctx, taskCtx, dummyDaskJob(daskAPI.DaskJobRunning)) @@ -738,3 +751,21 @@ func TestGetTaskPhaseDask(t *testing.T) { assert.NotNil(t, taskPhase.Info().Logs) assert.Nil(t, err) } + +func TestGetTaskPhaseIncreasePhaseVersion(t *testing.T) { + daskResourceHandler := daskResourceHandler{} + ctx := context.TODO() + + pluginState := k8s.PluginState{ + Phase: pluginsCore.PhaseInitializing, + PhaseVersion: pluginsCore.DefaultPhaseVersion, + Reason: "task submitted to K8s", + } + taskTemplate := dummyDaskTaskTemplate("", nil, "") + taskCtx := dummyDaskTaskContext(taskTemplate, &v1.ResourceRequirements{}, nil, false, pluginState) + + taskPhase, err := daskResourceHandler.GetTaskPhase(ctx, taskCtx, dummyDaskJob(daskAPI.DaskJobCreated)) + + assert.NoError(t, err) + assert.Equal(t, taskPhase.Version(), pluginsCore.DefaultPhaseVersion+1) +} diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go index 9d2e4a5aec..44604bf3f7 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/common/common_operator.go @@ -49,11 +49,11 @@ func ExtractCurrentCondition(jobConditions []commonOp.JobCondition) (commonOp.Jo func GetPhaseInfo(currentCondition commonOp.JobCondition, occurredAt time.Time, taskPhaseInfo pluginsCore.TaskInfo) (pluginsCore.PhaseInfo, error) { if len(currentCondition.Type) == 0 { - return pluginsCore.PhaseInfoQueued(occurredAt, pluginsCore.DefaultPhaseVersion, "JobCreated"), nil + return pluginsCore.PhaseInfoQueuedWithTaskInfo(occurredAt, pluginsCore.DefaultPhaseVersion, "JobCreated", &taskPhaseInfo), nil } switch currentCondition.Type { case commonOp.JobCreated: - return pluginsCore.PhaseInfoQueued(occurredAt, pluginsCore.DefaultPhaseVersion, "JobCreated"), nil + return pluginsCore.PhaseInfoQueuedWithTaskInfo(occurredAt, pluginsCore.DefaultPhaseVersion, "JobCreated", &taskPhaseInfo), nil case commonOp.JobRunning: return pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, &taskPhaseInfo), nil case commonOp.JobSucceeded: @@ -73,7 +73,7 @@ func GetMPIPhaseInfo(currentCondition commonOp.JobCondition, occurredAt time.Tim taskPhaseInfo pluginsCore.TaskInfo) (pluginsCore.PhaseInfo, error) { switch currentCondition.Type { case commonOp.JobCreated: - return pluginsCore.PhaseInfoQueued(occurredAt, pluginsCore.DefaultPhaseVersion, "New job name submitted to MPI operator"), nil + return pluginsCore.PhaseInfoQueuedWithTaskInfo(occurredAt, pluginsCore.DefaultPhaseVersion, "New job name submitted to MPI operator", &taskPhaseInfo), nil case commonOp.JobRunning: return pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, &taskPhaseInfo), nil case commonOp.JobSucceeded: diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go index 97199025a7..53e4d30ccb 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go @@ -186,7 +186,14 @@ func (mpiOperatorResourceHandler) GetTaskPhase(_ context.Context, pluginContext CustomInfo: statusDetails, } - return common.GetMPIPhaseInfo(currentCondition, occurredAt, taskPhaseInfo) + phaseInfo, err := common.GetPhaseInfo(currentCondition, occurredAt, taskPhaseInfo) + + phaseVersionUpdateErr := k8s.MaybeUpdatePhaseVersionFromPluginContext(&phaseInfo, &pluginContext) + if phaseVersionUpdateErr != nil { + return phaseInfo, phaseVersionUpdateErr + } + + return phaseInfo, err } func init() { diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go index 02224ec8a7..7db8269eaf 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi_test.go @@ -3,6 +3,7 @@ package mpi import ( "context" "fmt" + "reflect" "testing" "time" @@ -117,7 +118,7 @@ func dummyMPITaskTemplate(id string, args ...interface{}) *core.TaskTemplate { } } -func dummyMPITaskContext(taskTemplate *core.TaskTemplate, resources *corev1.ResourceRequirements, extendedResources *core.ExtendedResources) pluginsCore.TaskExecutionContext { +func dummyMPITaskContext(taskTemplate *core.TaskTemplate, resources *corev1.ResourceRequirements, extendedResources *core.ExtendedResources, pluginState k8s.PluginState) pluginsCore.TaskExecutionContext { taskCtx := &mocks.TaskExecutionContext{} inputReader := &pluginIOMocks.InputReader{} inputReader.OnGetInputPrefixPath().Return("/input/prefix") @@ -171,6 +172,18 @@ func dummyMPITaskContext(taskTemplate *core.TaskTemplate, resources *corev1.Reso taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) taskExecutionMetadata.OnGetConsoleURL().Return("") taskCtx.OnTaskExecutionMetadata().Return(taskExecutionMetadata) + + pluginStateReaderMock := mocks.PluginStateReader{} + pluginStateReaderMock.On("Get", mock.AnythingOfType(reflect.TypeOf(&pluginState).String())).Return( + func(v interface{}) uint8 { + *(v.(*k8s.PluginState)) = pluginState + return 0 + }, + func(v interface{}) error { + return nil + }) + + taskCtx.OnPluginStateReader().Return(&pluginStateReaderMock) return taskCtx } @@ -276,7 +289,7 @@ func dummyMPIJobResource(mpiResourceHandler mpiOperatorResourceHandler, mpiObj := dummyMPICustomObj(workers, launcher, slots) taskTemplate := dummyMPITaskTemplate(mpiID, mpiObj) - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) if err != nil { panic(err) } @@ -303,7 +316,7 @@ func TestBuildResourceMPI(t *testing.T) { mpiObj := dummyMPICustomObj(100, 50, 1) taskTemplate := dummyMPITaskTemplate(mpiID2, mpiObj) - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -339,13 +352,13 @@ func TestBuildResourceMPIForWrongInput(t *testing.T) { mpiObj := dummyMPICustomObj(0, 0, 1) taskTemplate := dummyMPITaskTemplate(mpiID, mpiObj) - _, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + _, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.Error(t, err) mpiObj = dummyMPICustomObj(1, 1, 1) taskTemplate = dummyMPITaskTemplate(mpiID2, mpiObj) - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) app, ok := resource.(*kubeflowv1.MPIJob) assert.Nil(t, err) assert.Equal(t, true, ok) @@ -459,7 +472,7 @@ func TestBuildResourceMPIExtendedResources(t *testing.T) { mpiObj := dummyMPICustomObj(100, 50, 1) taskTemplate := dummyMPITaskTemplate(mpiID2, mpiObj) taskTemplate.ExtendedResources = f.extendedResourcesBase - taskContext := dummyMPITaskContext(taskTemplate, f.resources, f.extendedResourcesOverride) + taskContext := dummyMPITaskContext(taskTemplate, f.resources, f.extendedResourcesOverride, k8s.PluginState{}) mpiResourceHandler := mpiOperatorResourceHandler{} r, err := mpiResourceHandler.BuildResource(context.TODO(), taskContext) assert.Nil(t, err) @@ -491,7 +504,7 @@ func TestGetTaskPhase(t *testing.T) { return dummyMPIJobResource(mpiResourceHandler, 2, 1, 1, conditionType) } - taskCtx := dummyMPITaskContext(dummyMPITaskTemplate("", dummyMPICustomObj(2, 1, 1)), resourceRequirements, nil) + taskCtx := dummyMPITaskContext(dummyMPITaskTemplate("", dummyMPICustomObj(2, 1, 1)), resourceRequirements, nil, k8s.PluginState{}) taskPhase, err := mpiResourceHandler.GetTaskPhase(ctx, taskCtx, dummyMPIJobResourceCreator(mpiOp.JobCreated)) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseQueued, taskPhase.Phase()) @@ -523,6 +536,23 @@ func TestGetTaskPhase(t *testing.T) { assert.Nil(t, err) } +func TestGetTaskPhaseIncreasePhaseVersion(t *testing.T) { + mpiResourceHandler := mpiOperatorResourceHandler{} + ctx := context.TODO() + + pluginState := k8s.PluginState{ + Phase: pluginsCore.PhaseQueued, + PhaseVersion: pluginsCore.DefaultPhaseVersion, + Reason: "task submitted to K8s", + } + taskCtx := dummyMPITaskContext(dummyMPITaskTemplate("", dummyMPICustomObj(2, 1, 1)), resourceRequirements, nil, pluginState) + + taskPhase, err := mpiResourceHandler.GetTaskPhase(ctx, taskCtx, dummyMPIJobResource(mpiResourceHandler, 2, 1, 1, mpiOp.JobCreated)) + + assert.NoError(t, err) + assert.Equal(t, taskPhase.Version(), pluginsCore.DefaultPhaseVersion+1) +} + func TestGetLogs(t *testing.T) { assert.NoError(t, logs.SetLogConfig(&logs.LogConfig{ IsKubernetesEnabled: true, @@ -535,7 +565,7 @@ func TestGetLogs(t *testing.T) { mpiResourceHandler := mpiOperatorResourceHandler{} mpiJob := dummyMPIJobResource(mpiResourceHandler, workers, launcher, slots, mpiOp.JobRunning) - taskCtx := dummyMPITaskContext(dummyMPITaskTemplate("", dummyMPICustomObj(workers, launcher, slots)), resourceRequirements, nil) + taskCtx := dummyMPITaskContext(dummyMPITaskTemplate("", dummyMPICustomObj(workers, launcher, slots)), resourceRequirements, nil, k8s.PluginState{}) jobLogs, err := common.GetLogs(taskCtx, common.MPITaskType, mpiJob.ObjectMeta, false, workers, launcher, 0, 0) assert.NoError(t, err) assert.Equal(t, 2, len(jobLogs)) @@ -568,7 +598,7 @@ func TestReplicaCounts(t *testing.T) { mpiObj := dummyMPICustomObj(test.workerReplicaCount, test.launcherReplicaCount, 1) taskTemplate := dummyMPITaskTemplate(mpiID2, mpiObj) - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) if test.expectError { assert.Error(t, err) assert.Nil(t, resource) @@ -692,7 +722,7 @@ func TestBuildResourceMPIV1(t *testing.T) { taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) taskTemplate.TaskTypeVersion = 1 - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -767,7 +797,7 @@ func TestBuildResourceMPIV1WithOnlyWorkerReplica(t *testing.T) { taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) taskTemplate.TaskTypeVersion = 1 - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -867,7 +897,7 @@ func TestBuildResourceMPIV1ResourceTolerations(t *testing.T) { taskTemplate := dummyMPITaskTemplate(mpiID2, taskConfig) taskTemplate.TaskTypeVersion = 1 - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -883,7 +913,7 @@ func TestGetReplicaCount(t *testing.T) { mpiResourceHandler := mpiOperatorResourceHandler{} tfObj := dummyMPICustomObj(1, 1, 0) taskTemplate := dummyMPITaskTemplate("the job", tfObj) - resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := mpiResourceHandler.BuildResource(context.TODO(), dummyMPITaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) MPIJob, ok := resource.(*kubeflowv1.MPIJob) diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go index 6d0bad4ecd..8084b75b4c 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go @@ -205,7 +205,14 @@ func (pytorchOperatorResourceHandler) GetTaskPhase(_ context.Context, pluginCont CustomInfo: statusDetails, } - return common.GetPhaseInfo(currentCondition, occurredAt, taskPhaseInfo) + phaseInfo, err := common.GetPhaseInfo(currentCondition, occurredAt, taskPhaseInfo) + + phaseVersionUpdateErr := k8s.MaybeUpdatePhaseVersionFromPluginContext(&phaseInfo, &pluginContext) + if phaseVersionUpdateErr != nil { + return phaseInfo, phaseVersionUpdateErr + } + + return phaseInfo, err } func init() { diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go index 70fcdcdc5c..6284b4d8f3 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch_test.go @@ -3,6 +3,7 @@ package pytorch import ( "context" "fmt" + "reflect" "testing" "time" @@ -123,7 +124,7 @@ func dummyPytorchTaskTemplate(id string, args ...interface{}) *core.TaskTemplate } } -func dummyPytorchTaskContext(taskTemplate *core.TaskTemplate, resources *corev1.ResourceRequirements, extendedResources *core.ExtendedResources, containerImage string) pluginsCore.TaskExecutionContext { +func dummyPytorchTaskContext(taskTemplate *core.TaskTemplate, resources *corev1.ResourceRequirements, extendedResources *core.ExtendedResources, containerImage string, pluginState k8s.PluginState) pluginsCore.TaskExecutionContext { taskCtx := &mocks.TaskExecutionContext{} inputReader := &pluginIOMocks.InputReader{} inputReader.OnGetInputPrefixPath().Return("/input/prefix") @@ -177,6 +178,18 @@ func dummyPytorchTaskContext(taskTemplate *core.TaskTemplate, resources *corev1. taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) taskExecutionMetadata.OnGetConsoleURL().Return("") taskCtx.OnTaskExecutionMetadata().Return(taskExecutionMetadata) + + pluginStateReaderMock := mocks.PluginStateReader{} + pluginStateReaderMock.On("Get", mock.AnythingOfType(reflect.TypeOf(&pluginState).String())).Return( + func(v interface{}) uint8 { + *(v.(*k8s.PluginState)) = pluginState + return 0 + }, + func(v interface{}) error { + return nil + }) + + taskCtx.OnPluginStateReader().Return(&pluginStateReaderMock) return taskCtx } @@ -281,7 +294,7 @@ func dummyPytorchJobResource(pytorchResourceHandler pytorchOperatorResourceHandl ptObj := dummyPytorchCustomObj(workers) taskTemplate := dummyPytorchTaskTemplate("job1", ptObj) - resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) if err != nil { panic(err) } @@ -309,7 +322,7 @@ func TestBuildResourcePytorchElastic(t *testing.T) { ptObj := dummyElasticPytorchCustomObj(2, plugins.ElasticConfig{MinReplicas: 1, MaxReplicas: 2, NprocPerNode: 4, RdzvBackend: "c10d"}) taskTemplate := dummyPytorchTaskTemplate("job2", ptObj) - resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -352,7 +365,7 @@ func TestBuildResourcePytorch(t *testing.T) { ptObj := dummyPytorchCustomObj(100) taskTemplate := dummyPytorchTaskTemplate("job3", ptObj) - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, res) @@ -434,7 +447,7 @@ func TestBuildResourcePytorchContainerImage(t *testing.T) { for _, f := range fixtures { t.Run(tCfg.name+" "+f.name, func(t *testing.T) { taskTemplate := dummyPytorchTaskTemplate("job", tCfg.plugin) - taskContext := dummyPytorchTaskContext(taskTemplate, f.resources, nil, f.containerImageOverride) + taskContext := dummyPytorchTaskContext(taskTemplate, f.resources, nil, f.containerImageOverride, k8s.PluginState{}) pytorchResourceHandler := pytorchOperatorResourceHandler{} r, err := pytorchResourceHandler.BuildResource(context.TODO(), taskContext) assert.NoError(t, err) @@ -576,7 +589,7 @@ func TestBuildResourcePytorchExtendedResources(t *testing.T) { t.Run(tCfg.name+" "+f.name, func(t *testing.T) { taskTemplate := dummyPytorchTaskTemplate("job", tCfg.plugin) taskTemplate.ExtendedResources = f.extendedResourcesBase - taskContext := dummyPytorchTaskContext(taskTemplate, f.resources, f.extendedResourcesOverride, "") + taskContext := dummyPytorchTaskContext(taskTemplate, f.resources, f.extendedResourcesOverride, "", k8s.PluginState{}) pytorchResourceHandler := pytorchOperatorResourceHandler{} r, err := pytorchResourceHandler.BuildResource(context.TODO(), taskContext) assert.NoError(t, err) @@ -609,7 +622,7 @@ func TestGetTaskPhase(t *testing.T) { return dummyPytorchJobResource(pytorchResourceHandler, 2, conditionType) } - taskCtx := dummyPytorchTaskContext(dummyPytorchTaskTemplate("", dummyPytorchCustomObj(2)), resourceRequirements, nil, "") + taskCtx := dummyPytorchTaskContext(dummyPytorchTaskTemplate("", dummyPytorchCustomObj(2)), resourceRequirements, nil, "", k8s.PluginState{}) taskPhase, err := pytorchResourceHandler.GetTaskPhase(ctx, taskCtx, dummyPytorchJobResourceCreator(commonOp.JobCreated)) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseQueued, taskPhase.Phase()) @@ -641,6 +654,23 @@ func TestGetTaskPhase(t *testing.T) { assert.Nil(t, err) } +func TestGetTaskPhaseIncreasePhaseVersion(t *testing.T) { + pytorchResourceHandler := pytorchOperatorResourceHandler{} + ctx := context.TODO() + + pluginState := k8s.PluginState{ + Phase: pluginsCore.PhaseQueued, + PhaseVersion: pluginsCore.DefaultPhaseVersion, + Reason: "task submitted to K8s", + } + taskCtx := dummyPytorchTaskContext(dummyPytorchTaskTemplate("", dummyPytorchCustomObj(2)), resourceRequirements, nil, "", pluginState) + + taskPhase, err := pytorchResourceHandler.GetTaskPhase(ctx, taskCtx, dummyPytorchJobResource(pytorchResourceHandler, 4, commonOp.JobCreated)) + + assert.NoError(t, err) + assert.Equal(t, taskPhase.Version(), pluginsCore.DefaultPhaseVersion+1) +} + func TestGetLogs(t *testing.T) { assert.NoError(t, logs.SetLogConfig(&logs.LogConfig{ IsKubernetesEnabled: true, @@ -652,7 +682,7 @@ func TestGetLogs(t *testing.T) { pytorchResourceHandler := pytorchOperatorResourceHandler{} pytorchJob := dummyPytorchJobResource(pytorchResourceHandler, workers, commonOp.JobRunning) - taskCtx := dummyPytorchTaskContext(dummyPytorchTaskTemplate("", dummyPytorchCustomObj(workers)), resourceRequirements, nil, "") + taskCtx := dummyPytorchTaskContext(dummyPytorchTaskTemplate("", dummyPytorchCustomObj(workers)), resourceRequirements, nil, "", k8s.PluginState{}) jobLogs, err := common.GetLogs(taskCtx, common.PytorchTaskType, pytorchJob.ObjectMeta, hasMaster, workers, 0, 0, 0) assert.NoError(t, err) assert.Equal(t, 3, len(jobLogs)) @@ -672,7 +702,7 @@ func TestGetLogsElastic(t *testing.T) { pytorchResourceHandler := pytorchOperatorResourceHandler{} pytorchJob := dummyPytorchJobResource(pytorchResourceHandler, workers, commonOp.JobRunning) - taskCtx := dummyPytorchTaskContext(dummyPytorchTaskTemplate("", dummyPytorchCustomObj(workers)), resourceRequirements, nil, "") + taskCtx := dummyPytorchTaskContext(dummyPytorchTaskTemplate("", dummyPytorchCustomObj(workers)), resourceRequirements, nil, "", k8s.PluginState{}) jobLogs, err := common.GetLogs(taskCtx, common.PytorchTaskType, pytorchJob.ObjectMeta, hasMaster, workers, 0, 0, 0) assert.NoError(t, err) assert.Equal(t, 2, len(jobLogs)) @@ -703,7 +733,7 @@ func TestReplicaCounts(t *testing.T) { ptObj := dummyPytorchCustomObj(test.workerReplicaCount) taskTemplate := dummyPytorchTaskTemplate("the job", ptObj) - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) if test.expectError { assert.Error(t, err) assert.Nil(t, res) @@ -821,7 +851,7 @@ func TestBuildResourcePytorchV1(t *testing.T) { taskTemplate := dummyPytorchTaskTemplate("job4", taskConfig) taskTemplate.TaskTypeVersion = 1 - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, res) @@ -883,7 +913,7 @@ func TestBuildResourcePytorchV1WithRunPolicy(t *testing.T) { taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) taskTemplate.TaskTypeVersion = 1 - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, res) @@ -965,7 +995,7 @@ func TestBuildResourcePytorchV1WithOnlyWorkerSpec(t *testing.T) { taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) taskTemplate.TaskTypeVersion = 1 - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, res) @@ -1073,7 +1103,7 @@ func TestBuildResourcePytorchV1ResourceTolerations(t *testing.T) { taskTemplate := dummyPytorchTaskTemplate("job4", taskConfig) taskTemplate.TaskTypeVersion = 1 - res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + res, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, res) @@ -1108,7 +1138,7 @@ func TestBuildResourcePytorchV1WithElastic(t *testing.T) { taskTemplate.TaskTypeVersion = 1 pytorchResourceHandler := pytorchOperatorResourceHandler{} - resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -1157,7 +1187,7 @@ func TestBuildResourcePytorchV1WithZeroWorker(t *testing.T) { taskTemplate := dummyPytorchTaskTemplate("job5", taskConfig) taskTemplate.TaskTypeVersion = 1 - _, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + _, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.Error(t, err) } } @@ -1175,7 +1205,7 @@ func TestGetReplicaCount(t *testing.T) { pytorchResourceHandler := pytorchOperatorResourceHandler{} tfObj := dummyPytorchCustomObj(1) taskTemplate := dummyPytorchTaskTemplate("the job", tfObj) - resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "")) + resource, err := pytorchResourceHandler.BuildResource(context.TODO(), dummyPytorchTaskContext(taskTemplate, resourceRequirements, nil, "", k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) PytorchJob, ok := resource.(*kubeflowv1.PyTorchJob) diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go index d69fd30b01..93b4d91cd2 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go @@ -185,7 +185,14 @@ func (tensorflowOperatorResourceHandler) GetTaskPhase(_ context.Context, pluginC CustomInfo: statusDetails, } - return common.GetPhaseInfo(currentCondition, occurredAt, taskPhaseInfo) + phaseInfo, err := common.GetPhaseInfo(currentCondition, occurredAt, taskPhaseInfo) + + phaseVersionUpdateErr := k8s.MaybeUpdatePhaseVersionFromPluginContext(&phaseInfo, &pluginContext) + if phaseVersionUpdateErr != nil { + return phaseInfo, phaseVersionUpdateErr + } + + return phaseInfo, err } func init() { diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go index 0cf0f34fd2..8206bda130 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow_test.go @@ -3,6 +3,7 @@ package tensorflow import ( "context" "fmt" + "reflect" "testing" "time" @@ -118,7 +119,7 @@ func dummyTensorFlowTaskTemplate(id string, args ...interface{}) *core.TaskTempl } } -func dummyTensorFlowTaskContext(taskTemplate *core.TaskTemplate, resources *corev1.ResourceRequirements, extendedResources *core.ExtendedResources) pluginsCore.TaskExecutionContext { +func dummyTensorFlowTaskContext(taskTemplate *core.TaskTemplate, resources *corev1.ResourceRequirements, extendedResources *core.ExtendedResources, pluginState k8s.PluginState) pluginsCore.TaskExecutionContext { taskCtx := &mocks.TaskExecutionContext{} inputReader := &pluginIOMocks.InputReader{} inputReader.OnGetInputPrefixPath().Return("/input/prefix") @@ -172,6 +173,18 @@ func dummyTensorFlowTaskContext(taskTemplate *core.TaskTemplate, resources *core taskExecutionMetadata.OnGetEnvironmentVariables().Return(nil) taskExecutionMetadata.OnGetConsoleURL().Return("") taskCtx.OnTaskExecutionMetadata().Return(taskExecutionMetadata) + + pluginStateReaderMock := mocks.PluginStateReader{} + pluginStateReaderMock.On("Get", mock.AnythingOfType(reflect.TypeOf(&pluginState).String())).Return( + func(v interface{}) uint8 { + *(v.(*k8s.PluginState)) = pluginState + return 0 + }, + func(v interface{}) error { + return nil + }) + + taskCtx.OnPluginStateReader().Return(&pluginStateReaderMock) return taskCtx } @@ -277,7 +290,7 @@ func dummyTensorFlowJobResource(tensorflowResourceHandler tensorflowOperatorReso tfObj := dummyTensorFlowCustomObj(workers, psReplicas, chiefReplicas, evaluatorReplicas) taskTemplate := dummyTensorFlowTaskTemplate("the job", tfObj) - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) if err != nil { panic(err) } @@ -302,7 +315,7 @@ func TestGetReplicaCount(t *testing.T) { tensorflowResourceHandler := tensorflowOperatorResourceHandler{} tfObj := dummyTensorFlowCustomObj(1, 0, 0, 0) taskTemplate := dummyTensorFlowTaskTemplate("the job", tfObj) - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) tensorflowJob, ok := resource.(*kubeflowv1.TFJob) @@ -320,7 +333,7 @@ func TestBuildResourceTensorFlow(t *testing.T) { tfObj := dummyTensorFlowCustomObj(100, 50, 1, 1) taskTemplate := dummyTensorFlowTaskTemplate("the job", tfObj) - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -515,7 +528,7 @@ func TestBuildResourceTensorFlowExtendedResources(t *testing.T) { taskTemplate := *tCfg.taskTemplate taskTemplate.ExtendedResources = f.extendedResourcesBase tensorflowResourceHandler := tensorflowOperatorResourceHandler{} - taskContext := dummyTensorFlowTaskContext(&taskTemplate, f.resources, f.extendedResourcesOverride) + taskContext := dummyTensorFlowTaskContext(&taskTemplate, f.resources, f.extendedResourcesOverride, k8s.PluginState{}) r, err := tensorflowResourceHandler.BuildResource(context.TODO(), taskContext) assert.NoError(t, err) assert.NotNil(t, r) @@ -548,7 +561,7 @@ func TestGetTaskPhase(t *testing.T) { return dummyTensorFlowJobResource(tensorflowResourceHandler, 2, 1, 1, 1, conditionType) } - taskCtx := dummyTensorFlowTaskContext(dummyTensorFlowTaskTemplate("", dummyTensorFlowCustomObj(2, 1, 1, 1)), resourceRequirements, nil) + taskCtx := dummyTensorFlowTaskContext(dummyTensorFlowTaskTemplate("", dummyTensorFlowCustomObj(2, 1, 1, 1)), resourceRequirements, nil, k8s.PluginState{}) taskPhase, err := tensorflowResourceHandler.GetTaskPhase(ctx, taskCtx, dummyTensorFlowJobResourceCreator(commonOp.JobCreated)) assert.NoError(t, err) assert.Equal(t, pluginsCore.PhaseQueued, taskPhase.Phase()) @@ -580,6 +593,23 @@ func TestGetTaskPhase(t *testing.T) { assert.Nil(t, err) } +func TestGetTaskPhaseIncreasePhaseVersion(t *testing.T) { + tensorflowResourceHandler := tensorflowOperatorResourceHandler{} + ctx := context.TODO() + + pluginState := k8s.PluginState{ + Phase: pluginsCore.PhaseQueued, + PhaseVersion: pluginsCore.DefaultPhaseVersion, + Reason: "task submitted to K8s", + } + taskCtx := dummyTensorFlowTaskContext(dummyTensorFlowTaskTemplate("", dummyTensorFlowCustomObj(2, 1, 1, 1)), resourceRequirements, nil, pluginState) + + taskPhase, err := tensorflowResourceHandler.GetTaskPhase(ctx, taskCtx, dummyTensorFlowJobResource(tensorflowResourceHandler, 2, 1, 1, 1, commonOp.JobCreated)) + + assert.NoError(t, err) + assert.Equal(t, taskPhase.Version(), pluginsCore.DefaultPhaseVersion+1) +} + func TestGetLogs(t *testing.T) { assert.NoError(t, logs.SetLogConfig(&logs.LogConfig{ IsKubernetesEnabled: true, @@ -593,7 +623,7 @@ func TestGetLogs(t *testing.T) { tensorflowResourceHandler := tensorflowOperatorResourceHandler{} tensorFlowJob := dummyTensorFlowJobResource(tensorflowResourceHandler, workers, psReplicas, chiefReplicas, evaluatorReplicas, commonOp.JobRunning) - taskCtx := dummyTensorFlowTaskContext(dummyTensorFlowTaskTemplate("", dummyTensorFlowCustomObj(workers, psReplicas, chiefReplicas, evaluatorReplicas)), resourceRequirements, nil) + taskCtx := dummyTensorFlowTaskContext(dummyTensorFlowTaskTemplate("", dummyTensorFlowCustomObj(workers, psReplicas, chiefReplicas, evaluatorReplicas)), resourceRequirements, nil, k8s.PluginState{}) jobLogs, err := common.GetLogs(taskCtx, common.TensorflowTaskType, tensorFlowJob.ObjectMeta, false, workers, psReplicas, chiefReplicas, evaluatorReplicas) assert.NoError(t, err) @@ -640,7 +670,7 @@ func TestReplicaCounts(t *testing.T) { tfObj := dummyTensorFlowCustomObj(test.workerReplicaCount, test.psReplicaCount, test.chiefReplicaCount, test.evaluatorReplicaCount) taskTemplate := dummyTensorFlowTaskTemplate("the job", tfObj) - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) if test.expectError { assert.Error(t, err) assert.Nil(t, resource) @@ -855,7 +885,7 @@ func TestBuildResourceTensorFlowV1(t *testing.T) { taskTemplate := dummyTensorFlowTaskTemplate("v1", taskConfig) taskTemplate.TaskTypeVersion = 1 - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -944,7 +974,7 @@ func TestBuildResourceTensorFlowV1WithOnlyWorker(t *testing.T) { taskTemplate := dummyTensorFlowTaskTemplate("v1 with only worker replica", taskConfig) taskTemplate.TaskTypeVersion = 1 - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) @@ -1057,7 +1087,7 @@ func TestBuildResourceTensorFlowV1ResourceTolerations(t *testing.T) { taskTemplate := dummyTensorFlowTaskTemplate("v1", taskConfig) taskTemplate.TaskTypeVersion = 1 - resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil)) + resource, err := tensorflowResourceHandler.BuildResource(context.TODO(), dummyTensorFlowTaskContext(taskTemplate, resourceRequirements, nil, k8s.PluginState{})) assert.NoError(t, err) assert.NotNil(t, resource) diff --git a/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go b/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go index f72d4eb1d7..2a08cd0e6c 100644 --- a/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go +++ b/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go @@ -172,7 +172,7 @@ func (plugin) GetTaskPhaseWithLogs(ctx context.Context, pluginContext k8s.Plugin } taskExecID := pluginContext.TaskExecutionMetadata().GetTaskExecutionID() - if pod.Status.Phase != v1.PodPending && pod.Status.Phase != v1.PodUnknown { + if pod.Status.Phase != v1.PodUnknown { taskLogs, err := logs.GetLogsForContainerInPod(ctx, logPlugin, taskExecID, pod, 0, logSuffix, extraLogTemplateVarsByScheme, taskTemplate) if err != nil { return pluginsCore.PhaseInfoUndefined, err @@ -187,9 +187,9 @@ func (plugin) GetTaskPhaseWithLogs(ctx context.Context, pluginContext k8s.Plugin case v1.PodFailed: phaseInfo, err = flytek8s.DemystifyFailure(pod.Status, info) case v1.PodPending: - phaseInfo, err = flytek8s.DemystifyPending(pod.Status) + phaseInfo, err = flytek8s.DemystifyPending(pod.Status, info) case v1.PodReasonUnschedulable: - phaseInfo = pluginsCore.PhaseInfoQueued(transitionOccurredAt, pluginsCore.DefaultPhaseVersion, "pod unschedulable") + phaseInfo = pluginsCore.PhaseInfoQueuedWithTaskInfo(transitionOccurredAt, pluginsCore.DefaultPhaseVersion, "pod unschedulable", &info) case v1.PodUnknown: // DO NOTHING default: @@ -236,15 +236,9 @@ func (plugin) GetTaskPhaseWithLogs(ctx context.Context, pluginContext k8s.Plugin if err != nil { return pluginsCore.PhaseInfoUndefined, err - } else if phaseInfo.Phase() != pluginsCore.PhaseRunning && phaseInfo.Phase() == pluginState.Phase && - phaseInfo.Version() <= pluginState.PhaseVersion && phaseInfo.Reason() != pluginState.Reason { - - // if we have the same Phase as the previous evaluation and updated the Reason but not the PhaseVersion we must - // update the PhaseVersion so an event is sent to reflect the Reason update. this does not handle the Running - // Phase because the legacy used `DefaultPhaseVersion + 1` which will only increment to 1. - phaseInfo = phaseInfo.WithVersion(pluginState.PhaseVersion + 1) } + k8s.MaybeUpdatePhaseVersion(&phaseInfo, &pluginState) return phaseInfo, err } diff --git a/flyteplugins/go/tasks/plugins/k8s/ray/ray.go b/flyteplugins/go/tasks/plugins/k8s/ray/ray.go index ff0cfc6cd3..7774c50376 100644 --- a/flyteplugins/go/tasks/plugins/k8s/ray/ray.go +++ b/flyteplugins/go/tasks/plugins/k8s/ray/ray.go @@ -558,25 +558,34 @@ func (plugin rayJobResourceHandler) GetTaskPhase(ctx context.Context, pluginCont } if len(rayJob.Status.JobDeploymentStatus) == 0 { - return pluginsCore.PhaseInfoQueued(time.Now(), pluginsCore.DefaultPhaseVersion, "Scheduling"), nil + return pluginsCore.PhaseInfoQueuedWithTaskInfo(time.Now(), pluginsCore.DefaultPhaseVersion, "Scheduling", info), nil } + var phaseInfo pluginsCore.PhaseInfo + // KubeRay creates a Ray cluster first, and then submits a Ray job to the cluster switch rayJob.Status.JobDeploymentStatus { case rayv1.JobDeploymentStatusInitializing: - return pluginsCore.PhaseInfoInitializing(rayJob.CreationTimestamp.Time, pluginsCore.DefaultPhaseVersion, "cluster is creating", info), nil + phaseInfo, err = pluginsCore.PhaseInfoInitializing(rayJob.CreationTimestamp.Time, pluginsCore.DefaultPhaseVersion, "cluster is creating", info), nil case rayv1.JobDeploymentStatusRunning: - return pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, info), nil + phaseInfo, err = pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, info), nil case rayv1.JobDeploymentStatusComplete: - return pluginsCore.PhaseInfoSuccess(info), nil + phaseInfo, err = pluginsCore.PhaseInfoSuccess(info), nil case rayv1.JobDeploymentStatusFailed: failInfo := fmt.Sprintf("Failed to run Ray job %s with error: [%s] %s", rayJob.Name, rayJob.Status.Reason, rayJob.Status.Message) - return pluginsCore.PhaseInfoFailure(flyteerr.TaskFailedWithError, failInfo, info), nil + phaseInfo, err = pluginsCore.PhaseInfoFailure(flyteerr.TaskFailedWithError, failInfo, info), nil default: // We already handle all known deployment status, so this should never happen unless a future version of ray // introduced a new job status. - return pluginsCore.PhaseInfoUndefined, fmt.Errorf("unknown job deployment status: %s", rayJob.Status.JobDeploymentStatus) + phaseInfo, err = pluginsCore.PhaseInfoUndefined, fmt.Errorf("unknown job deployment status: %s", rayJob.Status.JobDeploymentStatus) + } + + phaseVersionUpdateErr := k8s.MaybeUpdatePhaseVersionFromPluginContext(&phaseInfo, &pluginContext) + if phaseVersionUpdateErr != nil { + return phaseInfo, phaseVersionUpdateErr } + + return phaseInfo, err } func init() { diff --git a/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go b/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go index 28f4749625..65ccfac643 100644 --- a/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/ray/ray_test.go @@ -2,6 +2,7 @@ package ray import ( "context" + "reflect" "testing" "time" @@ -676,7 +677,7 @@ func TestInjectLogsSidecar(t *testing.T) { } } -func newPluginContext() k8s.PluginContext { +func newPluginContext(pluginState k8s.PluginState) k8s.PluginContext { plg := &mocks2.PluginContext{} taskExecID := &mocks.TaskExecutionID{} @@ -703,6 +704,19 @@ func newPluginContext() k8s.PluginContext { tskCtx := &mocks.TaskExecutionMetadata{} tskCtx.OnGetTaskExecutionID().Return(taskExecID) plg.OnTaskExecutionMetadata().Return(tskCtx) + + pluginStateReaderMock := mocks.PluginStateReader{} + pluginStateReaderMock.On("Get", mock.AnythingOfType(reflect.TypeOf(&pluginState).String())).Return( + func(v interface{}) uint8 { + *(v.(*k8s.PluginState)) = pluginState + return 0 + }, + func(v interface{}) error { + return nil + }) + + plg.OnPluginStateReader().Return(&pluginStateReaderMock) + return plg } @@ -720,7 +734,7 @@ func init() { func TestGetTaskPhase(t *testing.T) { ctx := context.Background() rayJobResourceHandler := rayJobResourceHandler{} - pluginCtx := newPluginContext() + pluginCtx := newPluginContext(k8s.PluginState{}) testCases := []struct { rayJobPhase rayv1.JobDeploymentStatus @@ -751,8 +765,28 @@ func TestGetTaskPhase(t *testing.T) { } } +func TestGetTaskPhaseIncreasePhaseVersion(t *testing.T) { + rayJobResourceHandler := rayJobResourceHandler{} + + ctx := context.TODO() + + pluginState := k8s.PluginState{ + Phase: pluginsCore.PhaseInitializing, + PhaseVersion: pluginsCore.DefaultPhaseVersion, + Reason: "task submitted to K8s", + } + pluginCtx := newPluginContext(pluginState) + + rayObject := &rayv1.RayJob{} + rayObject.Status.JobDeploymentStatus = rayv1.JobDeploymentStatusInitializing + phaseInfo, err := rayJobResourceHandler.GetTaskPhase(ctx, pluginCtx, rayObject) + + assert.NoError(t, err) + assert.Equal(t, phaseInfo.Version(), pluginsCore.DefaultPhaseVersion+1) +} + func TestGetEventInfo_LogTemplates(t *testing.T) { - pluginCtx := newPluginContext() + pluginCtx := newPluginContext(k8s.PluginState{}) testCases := []struct { name string rayJob rayv1.RayJob @@ -851,7 +885,7 @@ func TestGetEventInfo_LogTemplates(t *testing.T) { } func TestGetEventInfo_LogTemplates_V1(t *testing.T) { - pluginCtx := newPluginContext() + pluginCtx := newPluginContext(k8s.PluginState{}) testCases := []struct { name string rayJob rayv1.RayJob @@ -950,7 +984,7 @@ func TestGetEventInfo_LogTemplates_V1(t *testing.T) { } func TestGetEventInfo_DashboardURL(t *testing.T) { - pluginCtx := newPluginContext() + pluginCtx := newPluginContext(k8s.PluginState{}) testCases := []struct { name string rayJob rayv1.RayJob @@ -1002,7 +1036,7 @@ func TestGetEventInfo_DashboardURL(t *testing.T) { } func TestGetEventInfo_DashboardURL_V1(t *testing.T) { - pluginCtx := newPluginContext() + pluginCtx := newPluginContext(k8s.PluginState{}) testCases := []struct { name string rayJob rayv1.RayJob diff --git a/flyteplugins/go/tasks/plugins/k8s/spark/spark.go b/flyteplugins/go/tasks/plugins/k8s/spark/spark.go index 22240e9e45..8b766a391a 100644 --- a/flyteplugins/go/tasks/plugins/k8s/spark/spark.go +++ b/flyteplugins/go/tasks/plugins/k8s/spark/spark.go @@ -322,39 +322,13 @@ func (sparkResourceHandler) BuildIdentityResource(ctx context.Context, taskCtx p } func getEventInfoForSpark(pluginContext k8s.PluginContext, sj *sparkOp.SparkApplication) (*pluginsCore.TaskInfo, error) { - state := sj.Status.AppState.State - isQueued := state == sparkOp.NewState || - state == sparkOp.PendingSubmissionState || - state == sparkOp.SubmittedState sparkConfig := GetSparkConfig() taskLogs := make([]*core.TaskLog, 0, 3) taskExecID := pluginContext.TaskExecutionMetadata().GetTaskExecutionID() - if !isQueued { - if sj.Status.DriverInfo.PodName != "" { - p, err := logs.InitializeLogPlugins(&sparkConfig.LogConfig.Mixed) - if err != nil { - return nil, err - } - - if p != nil { - o, err := p.GetTaskLogs(tasklog.Input{ - PodName: sj.Status.DriverInfo.PodName, - Namespace: sj.Namespace, - LogName: "(Driver Logs)", - TaskExecutionID: taskExecID, - }) - - if err != nil { - return nil, err - } - - taskLogs = append(taskLogs, o.TaskLogs...) - } - } - - p, err := logs.InitializeLogPlugins(&sparkConfig.LogConfig.User) + if sj.Status.DriverInfo.PodName != "" { + p, err := logs.InitializeLogPlugins(&sparkConfig.LogConfig.Mixed) if err != nil { return nil, err } @@ -363,7 +337,7 @@ func getEventInfoForSpark(pluginContext k8s.PluginContext, sj *sparkOp.SparkAppl o, err := p.GetTaskLogs(tasklog.Input{ PodName: sj.Status.DriverInfo.PodName, Namespace: sj.Namespace, - LogName: "(User Logs)", + LogName: "(Driver Logs)", TaskExecutionID: taskExecID, }) @@ -373,29 +347,49 @@ func getEventInfoForSpark(pluginContext k8s.PluginContext, sj *sparkOp.SparkAppl taskLogs = append(taskLogs, o.TaskLogs...) } + } + + p, err := logs.InitializeLogPlugins(&sparkConfig.LogConfig.User) + if err != nil { + return nil, err + } + + if p != nil { + o, err := p.GetTaskLogs(tasklog.Input{ + PodName: sj.Status.DriverInfo.PodName, + Namespace: sj.Namespace, + LogName: "(User Logs)", + TaskExecutionID: taskExecID, + }) - p, err = logs.InitializeLogPlugins(&sparkConfig.LogConfig.System) if err != nil { return nil, err } - if p != nil { - o, err := p.GetTaskLogs(tasklog.Input{ - PodName: sj.Name, - Namespace: sj.Namespace, - LogName: "(System Logs)", - TaskExecutionID: taskExecID, - }) + taskLogs = append(taskLogs, o.TaskLogs...) + } - if err != nil { - return nil, err - } + p, err = logs.InitializeLogPlugins(&sparkConfig.LogConfig.System) + if err != nil { + return nil, err + } - taskLogs = append(taskLogs, o.TaskLogs...) + if p != nil { + o, err := p.GetTaskLogs(tasklog.Input{ + PodName: sj.Name, + Namespace: sj.Namespace, + LogName: "(System Logs)", + TaskExecutionID: taskExecID, + }) + + if err != nil { + return nil, err } + + taskLogs = append(taskLogs, o.TaskLogs...) } - p, err := logs.InitializeLogPlugins(&sparkConfig.LogConfig.AllUser) + p, err = logs.InitializeLogPlugins(&sparkConfig.LogConfig.AllUser) if err != nil { return nil, err } @@ -412,9 +406,13 @@ func getEventInfoForSpark(pluginContext k8s.PluginContext, sj *sparkOp.SparkAppl return nil, err } + // "All user" logs are shown already in the queuing and initializing phase. + for _, log := range o.TaskLogs { + log.ShowWhilePending = true + } + taskLogs = append(taskLogs, o.TaskLogs...) } - customInfoMap := make(map[string]string) // Spark UI. @@ -464,21 +462,32 @@ func (sparkResourceHandler) GetTaskPhase(ctx context.Context, pluginContext k8s. } occurredAt := time.Now() + + var phaseInfo pluginsCore.PhaseInfo + switch app.Status.AppState.State { case sparkOp.NewState: - return pluginsCore.PhaseInfoQueued(occurredAt, pluginsCore.DefaultPhaseVersion, "job queued"), nil + phaseInfo = pluginsCore.PhaseInfoQueuedWithTaskInfo(occurredAt, pluginsCore.DefaultPhaseVersion, "job queued", info) case sparkOp.SubmittedState, sparkOp.PendingSubmissionState: - return pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "job submitted", info), nil + phaseInfo = pluginsCore.PhaseInfoInitializing(occurredAt, pluginsCore.DefaultPhaseVersion, "job submitted", info) case sparkOp.FailedSubmissionState: reason := fmt.Sprintf("Spark Job Submission Failed with Error: %s", app.Status.AppState.ErrorMessage) - return pluginsCore.PhaseInfoRetryableFailure(errors.DownstreamSystemError, reason, info), nil + phaseInfo = pluginsCore.PhaseInfoRetryableFailure(errors.DownstreamSystemError, reason, info) case sparkOp.FailedState: reason := fmt.Sprintf("Spark Job Failed with Error: %s", app.Status.AppState.ErrorMessage) - return pluginsCore.PhaseInfoRetryableFailure(errors.DownstreamSystemError, reason, info), nil + phaseInfo = pluginsCore.PhaseInfoRetryableFailure(errors.DownstreamSystemError, reason, info) case sparkOp.CompletedState: - return pluginsCore.PhaseInfoSuccess(info), nil + phaseInfo = pluginsCore.PhaseInfoSuccess(info) + default: + phaseInfo = pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, info) } - return pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, info), nil + + phaseVersionUpdateErr := k8s.MaybeUpdatePhaseVersionFromPluginContext(&phaseInfo, &pluginContext) + if phaseVersionUpdateErr != nil { + return phaseInfo, phaseVersionUpdateErr + } + + return phaseInfo, nil } func init() { diff --git a/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go b/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go index 2b481834db..a560544228 100644 --- a/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go @@ -3,6 +3,7 @@ package spark import ( "context" "os" + "reflect" "strconv" "testing" @@ -96,7 +97,7 @@ func TestGetEventInfo(t *testing.T) { }, }, })) - taskCtx := dummySparkTaskContext(dummySparkTaskTemplateContainer("blah-1", dummySparkConf), false) + taskCtx := dummySparkTaskContext(dummySparkTaskTemplateContainer("blah-1", dummySparkConf), false, k8s.PluginState{}) info, err := getEventInfoForSpark(taskCtx, dummySparkApplication(sj.RunningState)) assert.NoError(t, err) assert.Len(t, info.Logs, 6) @@ -118,9 +119,14 @@ func TestGetEventInfo(t *testing.T) { assert.Equal(t, expectedLinks, generatedLinks) info, err = getEventInfoForSpark(taskCtx, dummySparkApplication(sj.SubmittedState)) + generatedLinks = make([]string, 0, len(info.Logs)) + for _, l := range info.Logs { + generatedLinks = append(generatedLinks, l.Uri) + } assert.NoError(t, err) - assert.Len(t, info.Logs, 1) - assert.Equal(t, "https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=/kubernetes/flyte;prefix=var.log.containers.spark-app-name;streamFilter=typeLogStreamPrefix", info.Logs[0].Uri) + assert.Len(t, info.Logs, 5) + assert.Equal(t, expectedLinks[:5], generatedLinks) // No Spark Driver UI for Submitted state + assert.True(t, info.Logs[4].ShowWhilePending) // All User Logs should be shown while pending assert.NoError(t, setSparkConfig(&Config{ SparkHistoryServerURL: "spark-history.flyte", @@ -166,7 +172,7 @@ func TestGetTaskPhase(t *testing.T) { sparkResourceHandler := sparkResourceHandler{} ctx := context.TODO() - taskCtx := dummySparkTaskContext(dummySparkTaskTemplateContainer("", dummySparkConf), false) + taskCtx := dummySparkTaskContext(dummySparkTaskTemplateContainer("", dummySparkConf), false, k8s.PluginState{}) taskPhase, err := sparkResourceHandler.GetTaskPhase(ctx, taskCtx, dummySparkApplication(sj.NewState)) assert.NoError(t, err) assert.Equal(t, taskPhase.Phase(), pluginsCore.PhaseQueued) @@ -228,6 +234,24 @@ func TestGetTaskPhase(t *testing.T) { assert.Nil(t, err) } +func TestGetTaskPhaseIncreasePhaseVersion(t *testing.T) { + sparkResourceHandler := sparkResourceHandler{} + ctx := context.TODO() + + pluginState := k8s.PluginState{ + Phase: pluginsCore.PhaseInitializing, + PhaseVersion: pluginsCore.DefaultPhaseVersion, + Reason: "task submitted to K8s", + } + + taskCtx := dummySparkTaskContext(dummySparkTaskTemplateContainer("", dummySparkConf), false, pluginState) + + taskPhase, err := sparkResourceHandler.GetTaskPhase(ctx, taskCtx, dummySparkApplication(sj.SubmittedState)) + + assert.NoError(t, err) + assert.Equal(t, taskPhase.Version(), pluginsCore.DefaultPhaseVersion+1) +} + func dummySparkApplication(state sj.ApplicationStateType) *sj.SparkApplication { return &sj.SparkApplication{ @@ -347,7 +371,7 @@ func dummySparkTaskTemplatePod(id string, sparkConf map[string]string, podSpec * } } -func dummySparkTaskContext(taskTemplate *core.TaskTemplate, interruptible bool) pluginsCore.TaskExecutionContext { +func dummySparkTaskContext(taskTemplate *core.TaskTemplate, interruptible bool, pluginState k8s.PluginState) pluginsCore.TaskExecutionContext { taskCtx := &mocks.TaskExecutionContext{} inputReader := &pluginIOMocks.InputReader{} inputReader.OnGetInputPrefixPath().Return("/input/prefix") @@ -407,6 +431,18 @@ func dummySparkTaskContext(taskTemplate *core.TaskTemplate, interruptible bool) taskExecutionMetadata.On("GetK8sServiceAccount").Return("new-val") taskExecutionMetadata.On("GetConsoleURL").Return("") taskCtx.On("TaskExecutionMetadata").Return(taskExecutionMetadata) + + pluginStateReaderMock := mocks.PluginStateReader{} + pluginStateReaderMock.On("Get", mock.AnythingOfType(reflect.TypeOf(&pluginState).String())).Return( + func(v interface{}) uint8 { + *(v.(*k8s.PluginState)) = pluginState + return 0 + }, + func(v interface{}) error { + return nil + }) + + taskCtx.OnPluginStateReader().Return(&pluginStateReaderMock) return taskCtx } @@ -558,7 +594,7 @@ func TestBuildResourceContainer(t *testing.T) { defaultConfig := defaultPluginConfig() assert.NoError(t, config.SetK8sPluginConfig(defaultConfig)) - resource, err := sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, true)) + resource, err := sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, true, k8s.PluginState{})) assert.Nil(t, err) assert.NotNil(t, resource) @@ -706,7 +742,7 @@ func TestBuildResourceContainer(t *testing.T) { dummyConfWithRequest["spark.kubernetes.executor.request.cores"] = "4" taskTemplate = dummySparkTaskTemplateContainer("blah-1", dummyConfWithRequest) - resource, err = sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, false)) + resource, err = sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, false, k8s.PluginState{})) assert.Nil(t, err) assert.NotNil(t, resource) sparkApp, ok = resource.(*sj.SparkApplication) @@ -716,7 +752,7 @@ func TestBuildResourceContainer(t *testing.T) { assert.Equal(t, dummyConfWithRequest["spark.kubernetes.executor.request.cores"], sparkApp.Spec.SparkConf["spark.kubernetes.executor.limit.cores"]) // Case 3: Interruptible False - resource, err = sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, false)) + resource, err = sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, false, k8s.PluginState{})) assert.Nil(t, err) assert.NotNil(t, resource) sparkApp, ok = resource.(*sj.SparkApplication) @@ -764,7 +800,7 @@ func TestBuildResourceContainer(t *testing.T) { // Case 4: Invalid Spark Task-Template taskTemplate.Custom = nil - resource, err = sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, false)) + resource, err = sparkResourceHandler.BuildResource(context.TODO(), dummySparkTaskContext(taskTemplate, false, k8s.PluginState{})) assert.NotNil(t, err) assert.Nil(t, resource) } @@ -784,7 +820,7 @@ func TestBuildResourcePodTemplate(t *testing.T) { taskTemplate.GetK8SPod() sparkResourceHandler := sparkResourceHandler{} - taskCtx := dummySparkTaskContext(taskTemplate, true) + taskCtx := dummySparkTaskContext(taskTemplate, true, k8s.PluginState{}) resource, err := sparkResourceHandler.BuildResource(context.TODO(), taskCtx) assert.Nil(t, err) diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go index 99a83aeb3b..5470247ab7 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go @@ -265,7 +265,7 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase switch resource.Phase { case flyteIdl.TaskExecution_QUEUED: - return core.PhaseInfoQueuedWithTaskInfo(core.DefaultPhaseVersion, resource.Message, taskInfo), nil + return core.PhaseInfoQueuedWithTaskInfo(time.Now(), core.DefaultPhaseVersion, resource.Message, taskInfo), nil case flyteIdl.TaskExecution_WAITING_FOR_RESOURCES: return core.PhaseInfoWaitingForResourcesInfo(time.Now(), core.DefaultPhaseVersion, resource.Message, taskInfo), nil case flyteIdl.TaskExecution_INITIALIZING: diff --git a/flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go b/flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go index 6661550530..ad7da5f042 100644 --- a/flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go @@ -278,7 +278,7 @@ func (p Plugin) Status(ctx context.Context, tCtx webapi.StatusContext) (phase co switch resource.Status.State { case bigqueryStatusPending: - return core.PhaseInfoQueuedWithTaskInfo(version, "Query is PENDING", taskInfo), nil + return core.PhaseInfoQueuedWithTaskInfo(time.Now(), version, "Query is PENDING", taskInfo), nil case bigqueryStatusRunning: return core.PhaseInfoRunning(version, taskInfo), nil diff --git a/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager_test.go b/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager_test.go index 73d00a6062..a2bcb57014 100644 --- a/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager_test.go +++ b/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager_test.go @@ -6,6 +6,7 @@ import ( "fmt" "reflect" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -761,13 +762,15 @@ func TestPluginManager_Handle_PluginState(t *testing.T) { }, } - phaseInfoQueued := pluginsCore.PhaseInfoQueuedWithTaskInfo(pluginStateQueued.K8sPluginState.PhaseVersion, pluginStateQueued.K8sPluginState.Reason, nil) + phaseInfoQueued := pluginsCore.PhaseInfoQueuedWithTaskInfo(time.Now(), pluginStateQueued.K8sPluginState.PhaseVersion, pluginStateQueued.K8sPluginState.Reason, nil) phaseInfoQueuedVersion1 := pluginsCore.PhaseInfoQueuedWithTaskInfo( + time.Now(), pluginStateQueuedVersion1.K8sPluginState.PhaseVersion, pluginStateQueuedVersion1.K8sPluginState.Reason, nil, ) phaseInfoQueuedReasonBar := pluginsCore.PhaseInfoQueuedWithTaskInfo( + time.Now(), pluginStateQueuedReasonBar.K8sPluginState.PhaseVersion, pluginStateQueuedReasonBar.K8sPluginState.Reason, nil, From ba88e82a58145fe3062c7441cdd5c57c36f108f2 Mon Sep 17 00:00:00 2001 From: Jason Parraga Date: Mon, 17 Jun 2024 14:40:39 -0700 Subject: [PATCH 24/30] Add lint-fix make target, add gci to flytectl, remove goimports make target (#5484) * Favor golangci-lint --fix instead running goimports,gci directly Signed-off-by: Jason Parraga * Enable gci lint on flytectl Signed-off-by: Jason Parraga * check in gci fixes on flytectl Signed-off-by: Jason Parraga * Deduplicate per feedback Signed-off-by: Jason Parraga --------- Signed-off-by: Jason Parraga --- .../flyte/golang_test_targets/Makefile | 11 +++++----- .../flyte/golang_test_targets/Readme.rst | 2 ++ .../flyte/golang_test_targets/goimports | 9 -------- flytectl/.golangci.yml | 1 + flytectl/cmd/config/config.go | 3 +-- .../file_config_test.go | 1 - .../executionclusterlabel/file_config_test.go | 1 - .../file_config_test.go | 1 - .../plugin_override/file_config_test.go | 1 - .../subcommand/project/project_config.go | 1 - .../subcommand/project/project_config_test.go | 1 - .../taskresourceattribute/file_config_test.go | 1 - .../file_config_test.go | 1 - flytectl/cmd/configuration/configuration.go | 6 ++---- .../cmd/configuration/configuration_test.go | 7 ++----- flytectl/cmd/core/cmd.go | 8 +++---- flytectl/cmd/core/cmd_ctx.go | 3 +-- flytectl/cmd/core/cmd_test.go | 1 - flytectl/cmd/create/create.go | 1 - flytectl/cmd/create/create_test.go | 3 +-- flytectl/cmd/create/execution.go | 5 ++--- flytectl/cmd/create/execution_test.go | 12 +++++------ flytectl/cmd/create/execution_util.go | 5 ++--- flytectl/cmd/create/execution_util_test.go | 4 +--- flytectl/cmd/create/project.go | 3 +-- flytectl/cmd/create/project_test.go | 3 --- flytectl/cmd/delete/delete.go | 1 - flytectl/cmd/delete/delete_test.go | 3 +-- flytectl/cmd/delete/execution_test.go | 1 - ...tchable_cluster_resource_attribute_test.go | 1 - .../matchable_execution_cluster_label_test.go | 1 - ...atchable_execution_queue_attribute_test.go | 1 - .../delete/matchable_plugin_override_test.go | 1 - .../matchable_task_resource_attribute_test.go | 1 - .../matchable_workflow_execution_config.go | 3 +-- ...atchable_workflow_execution_config_test.go | 4 +--- flytectl/cmd/demo/exec_test.go | 11 ++++------ flytectl/cmd/demo/start.go | 6 ++---- flytectl/cmd/demo/status.go | 3 +-- flytectl/cmd/demo/status_test.go | 3 +-- flytectl/cmd/demo/teardown.go | 5 ++--- flytectl/cmd/get/execution.go | 6 ++---- flytectl/cmd/get/execution_test.go | 4 +--- flytectl/cmd/get/execution_util.go | 6 ++---- flytectl/cmd/get/execution_util_test.go | 1 - flytectl/cmd/get/get.go | 1 - flytectl/cmd/get/get_test.go | 3 +-- flytectl/cmd/get/launch_plan_test.go | 16 +++++--------- ...tchable_cluster_resource_attribute_test.go | 4 +--- .../matchable_execution_cluster_label_test.go | 4 +--- ...atchable_execution_queue_attribute_test.go | 4 +--- .../cmd/get/matchable_plugin_override_test.go | 4 +--- .../matchable_task_resource_attribute_test.go | 4 +--- .../matchable_workflow_execution_config.go | 1 - ...atchable_workflow_execution_config_test.go | 4 +--- flytectl/cmd/get/node_execution.go | 3 +-- flytectl/cmd/get/node_execution_test.go | 4 +--- flytectl/cmd/get/project.go | 8 +++---- flytectl/cmd/get/project_test.go | 4 +--- flytectl/cmd/get/task_test.go | 12 +++-------- flytectl/cmd/get/workflow.go | 10 ++++----- flytectl/cmd/get/workflow_test.go | 17 ++++++--------- flytectl/cmd/register/examples.go | 1 - flytectl/cmd/register/files.go | 4 +--- flytectl/cmd/register/files_test.go | 8 +++---- flytectl/cmd/register/register.go | 1 - flytectl/cmd/register/register_util.go | 21 +++++++------------ flytectl/cmd/register/register_util_test.go | 16 +++++--------- flytectl/cmd/root.go | 1 - flytectl/cmd/sandbox/exec_test.go | 11 ++++------ flytectl/cmd/sandbox/status.go | 3 +-- flytectl/cmd/sandbox/status_test.go | 3 +-- flytectl/cmd/sandbox/teardown.go | 5 ++--- flytectl/cmd/testutils/test_utils.go | 3 +-- flytectl/cmd/update/execution_test.go | 1 - flytectl/cmd/update/launch_plan_meta_test.go | 1 - flytectl/cmd/update/launch_plan_test.go | 1 - ...tchable_cluster_resource_attribute_test.go | 5 ++--- .../matchable_execution_cluster_label_test.go | 5 ++--- ...atchable_execution_queue_attribute_test.go | 5 ++--- .../update/matchable_plugin_override_test.go | 5 ++--- .../matchable_task_resource_attribute_test.go | 5 ++--- .../matchable_workflow_execution_config.go | 5 ++--- ...atchable_workflow_execution_config_test.go | 5 ++--- flytectl/cmd/update/named_entity_test.go | 3 +-- flytectl/cmd/update/project.go | 3 +-- flytectl/cmd/update/project_test.go | 7 +++---- flytectl/cmd/update/task_meta_test.go | 1 - flytectl/cmd/update/update.go | 1 - flytectl/cmd/update/workflow_meta_test.go | 1 - flytectl/cmd/upgrade/upgrade.go | 12 ++++------- flytectl/cmd/upgrade/upgrade_test.go | 8 ++----- flytectl/cmd/version/version.go | 4 +--- flytectl/cmd/version/version_test.go | 7 ++----- .../pkg/bubbletea/bubbletea_pagination.go | 3 +-- .../bubbletea/bubbletea_pagination_util.go | 1 - flytectl/pkg/docker/docker_util.go | 5 ++--- flytectl/pkg/docker/docker_util_test.go | 11 ++++------ .../pkg/ext/attribute_match_deleter_test.go | 1 - flytectl/pkg/ext/attribute_match_fetcher.go | 3 +-- .../pkg/ext/attribute_match_fetcher_test.go | 1 - .../pkg/ext/attribute_match_updater_test.go | 1 - flytectl/pkg/ext/execution_fetcher_test.go | 1 - flytectl/pkg/ext/fetcher.go | 1 - flytectl/pkg/ext/launch_plan_fetcher.go | 1 - flytectl/pkg/ext/launch_plan_fetcher_test.go | 2 -- flytectl/pkg/ext/project_fetcher.go | 1 - flytectl/pkg/ext/task_fetcher.go | 1 - flytectl/pkg/ext/task_fetcher_test.go | 2 -- flytectl/pkg/ext/workflow_fetcher.go | 1 - flytectl/pkg/ext/workflow_fetcher_test.go | 2 -- flytectl/pkg/github/githubutil.go | 1 - flytectl/pkg/github/githubutil_test.go | 1 - flytectl/pkg/pkce/token_cache_keyring.go | 1 - flytectl/pkg/printer/printer.go | 1 - flytectl/pkg/printer/printer_test.go | 3 +-- flytectl/pkg/sandbox/start_test.go | 11 +++++----- flytectl/pkg/sandbox/status_test.go | 3 +-- flytectl/pkg/util/util.go | 3 +-- flytectl/pkg/util/util_test.go | 1 - flytectl/pkg/visualize/graphviz.go | 3 +-- flytectl/pkg/visualize/graphviz_test.go | 3 +-- 122 files changed, 150 insertions(+), 341 deletions(-) delete mode 100755 boilerplate/flyte/golang_test_targets/goimports diff --git a/boilerplate/flyte/golang_test_targets/Makefile b/boilerplate/flyte/golang_test_targets/Makefile index 4b0f254329..c02409a318 100644 --- a/boilerplate/flyte/golang_test_targets/Makefile +++ b/boilerplate/flyte/golang_test_targets/Makefile @@ -3,6 +3,7 @@ # # TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst +LINT_FLAGS ?= .PHONY: download_tooling download_tooling: #download dependencies (including test deps) for the package @@ -14,13 +15,11 @@ generate: download_tooling #generate go code .PHONY: lint lint: download_tooling #lints the package for common code smells - GL_DEBUG=linters_output,env golangci-lint run --deadline=5m --exclude deprecated -v + GL_DEBUG=linters_output,env golangci-lint run $(LINT_FLAGS) --deadline=5m --exclude deprecated -v -# If code is failing goimports linter, this will fix. -# skips 'vendor' -.PHONY: goimports -goimports: - @boilerplate/flyte/golang_test_targets/goimports +.PHONY: lint-fix +lint-fix: LINT_FLAGS=--fix +lint-fix: lint .PHONY: mod_download mod_download: #download dependencies (including test deps) for the package diff --git a/boilerplate/flyte/golang_test_targets/Readme.rst b/boilerplate/flyte/golang_test_targets/Readme.rst index f9d890fdd7..700feb33a2 100644 --- a/boilerplate/flyte/golang_test_targets/Readme.rst +++ b/boilerplate/flyte/golang_test_targets/Readme.rst @@ -5,6 +5,8 @@ Provides an ``install`` make target that uses ``go mod`` to install golang depen Provides a ``lint`` make target that uses golangci to lint your code. +Provides a ``lint-fix`` make target that uses golangci to lint and fix your code in place. + Provides a ``test_unit`` target for unit tests. Provides a ``test_unit_cover`` target for analysing coverage of unit tests, which will output the coverage of each function and total statement coverage. diff --git a/boilerplate/flyte/golang_test_targets/goimports b/boilerplate/flyte/golang_test_targets/goimports deleted file mode 100755 index 40f50d106e..0000000000 --- a/boilerplate/flyte/golang_test_targets/goimports +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: -# -# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst - -goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*" -not -path "./boilerplate/*") -gci write -s standard -s default -s "prefix(github.com/flyteorg)" --custom-order --skip-generated . diff --git a/flytectl/.golangci.yml b/flytectl/.golangci.yml index 0ba2332bb9..b7e8525336 100644 --- a/flytectl/.golangci.yml +++ b/flytectl/.golangci.yml @@ -13,6 +13,7 @@ linters: - deadcode - errcheck - gas + - gci - goconst - goimports - golint diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 4296d28b3b..ff3b2e9219 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -4,9 +4,8 @@ import ( "fmt" "strings" - "github.com/flyteorg/flyte/flytestdlib/config" - "github.com/flyteorg/flyte/flytectl/pkg/printer" + "github.com/flyteorg/flyte/flytestdlib/config" ) var ( diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go index 92b791cf0a..c9c003dc08 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go index 79ea059930..b45a5404b1 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go index 191cabb023..ac9dbc3d60 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go index 13037945af..d66fe59141 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index e693e566c6..d76030faa7 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "gopkg.in/yaml.v3" ) diff --git a/flytectl/cmd/config/subcommand/project/project_config_test.go b/flytectl/cmd/config/subcommand/project/project_config_test.go index b848943f61..bbaf521375 100644 --- a/flytectl/cmd/config/subcommand/project/project_config_test.go +++ b/flytectl/cmd/config/subcommand/project/project_config_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go index cba5ea672b..96e4f1bb88 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go index 45454f4536..a4fa81cbbb 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index d3374233ba..ecbedba721 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -8,13 +8,11 @@ import ( "os" "strings" - "github.com/flyteorg/flyte/flytectl/pkg/util" - - "github.com/flyteorg/flyte/flytectl/pkg/configutil" - initConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/config" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" + "github.com/flyteorg/flyte/flytectl/pkg/configutil" + "github.com/flyteorg/flyte/flytectl/pkg/util" "github.com/flyteorg/flyte/flytestdlib/config/viper" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/spf13/cobra" diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index 844d2ee6b7..7438faeedb 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -9,14 +9,11 @@ import ( "strings" "testing" - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - "github.com/flyteorg/flyte/flytectl/pkg/configutil" - initConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/configutil" "github.com/flyteorg/flyte/flytectl/pkg/util" - + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index b2bd77c317..92e50f4e7d 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -4,16 +4,14 @@ import ( "context" "fmt" - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/pkg/pkce" "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - + "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type PFlagProvider interface { diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index 980d9ee395..35e9945e59 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -3,9 +3,8 @@ package cmdcore import ( "io" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - "github.com/flyteorg/flyte/flytectl/pkg/ext" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) diff --git a/flytectl/cmd/core/cmd_test.go b/flytectl/cmd/core/cmd_test.go index 13737b4a61..e3a1843105 100644 --- a/flytectl/cmd/core/cmd_test.go +++ b/flytectl/cmd/core/cmd_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flyte/flytestdlib/config" - "github.com/spf13/cobra" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index eaecf4c833..06b1ebe939 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -3,7 +3,6 @@ package create import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index 5dbe600254..b7b5a2c32c 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -4,9 +4,8 @@ import ( "sort" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/stretchr/testify/assert" ) const testDataFolder = "../testdata/" diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 84b6e2dad9..5da311357b 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -4,11 +4,10 @@ import ( "context" "fmt" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/flyteorg/flyte/flytectl/cmd/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" ) const ( diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index ce418df9e7..4886e2e7b8 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -4,17 +4,15 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/flyteorg/flyte/flytectl/cmd/config" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" ) type createSuite struct { diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 060d22dddf..7ebb757a29 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -6,14 +6,13 @@ import ( "io/ioutil" "strings" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + cmdGet "github.com/flyteorg/flyte/flytectl/cmd/get" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/google/uuid" "sigs.k8s.io/yaml" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - cmdGet "github.com/flyteorg/flyte/flytectl/cmd/get" ) func createExecutionRequestForWorkflow(ctx context.Context, workflowName, project, domain string, diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index ab6391c983..000e3621d3 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -5,11 +5,9 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/flyteorg/flyte/flytectl/cmd/config" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 24d12f3533..fa1046a248 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -7,9 +7,8 @@ import ( "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/logger" ) diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 302efc8b5e..1d63c0fceb 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -6,12 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/clierrors" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 19a8107116..26d930a8a6 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index 3d5df42dcb..0184450305 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -4,9 +4,8 @@ import ( "sort" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/stretchr/testify/assert" ) const ( diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go index 73d51a02ae..c883a4d4df 100644 --- a/flytectl/cmd/delete/execution_test.go +++ b/flytectl/cmd/delete/execution_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go index 26ddd8b468..f2fe9ca49e 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/clusterresourceattribute" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go index 9868b2045f..7335bd6721 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go index d338bc529d..20402ee79b 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_plugin_override_test.go b/flytectl/cmd/delete/matchable_plugin_override_test.go index 80e519a32b..623729fdd2 100644 --- a/flytectl/cmd/delete/matchable_plugin_override_test.go +++ b/flytectl/cmd/delete/matchable_plugin_override_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go index 867a38af6a..484052b6ab 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index 65dabb5f20..ce778d714a 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -3,10 +3,9 @@ package delete import ( "context" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyte/flytectl/cmd/config" sconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go index fe0e76fdec..88681a32d5 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go @@ -4,11 +4,9 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyte/flytectl/cmd/config" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/demo/exec_test.go b/flytectl/cmd/demo/exec_test.go index ac6a82b8d0..1d4fcea214 100644 --- a/flytectl/cmd/demo/exec_test.go +++ b/flytectl/cmd/demo/exec_test.go @@ -8,16 +8,13 @@ import ( "strings" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/stretchr/testify/assert" - "github.com/docker/docker/api/types" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 153bae47bd..fa3de39101 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -3,12 +3,10 @@ package demo import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/docker" - - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/demo/status.go b/flytectl/cmd/demo/status.go index 33063b04c2..8dc06e20a1 100644 --- a/flytectl/cmd/demo/status.go +++ b/flytectl/cmd/demo/status.go @@ -3,10 +3,9 @@ package demo import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/demo/status_test.go b/flytectl/cmd/demo/status_test.go index 2e26a21a77..0f6dd68ad0 100644 --- a/flytectl/cmd/demo/status_test.go +++ b/flytectl/cmd/demo/status_test.go @@ -3,9 +3,8 @@ package demo import ( "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/docker/docker/api/types" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/demo/teardown.go b/flytectl/cmd/demo/teardown.go index 9df954acfe..7bcba4fb79 100644 --- a/flytectl/cmd/demo/teardown.go +++ b/flytectl/cmd/demo/teardown.go @@ -3,11 +3,10 @@ package demo import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/docker" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 4c11830c86..8bfcc36e00 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -7,13 +7,11 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/flyteorg/flyte/flytectl/pkg/bubbletea" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" - + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/golang/protobuf/proto" ) diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index 51a1a1f825..329211621a 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -6,13 +6,11 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/execution" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 2123e885f5..45214a7ac8 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -6,14 +6,12 @@ import ( "io/ioutil" "os" - structpb "github.com/golang/protobuf/ptypes/struct" - - "gopkg.in/yaml.v3" - cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + structpb "github.com/golang/protobuf/ptypes/struct" + "gopkg.in/yaml.v3" ) // ExecutionConfig is duplicated struct from create with the same structure. This is to avoid the circular dependency. Only works with go-yaml. diff --git a/flytectl/cmd/get/execution_util_test.go b/flytectl/cmd/get/execution_util_test.go index ff316ca4e0..2c081950f2 100644 --- a/flytectl/cmd/get/execution_util_test.go +++ b/flytectl/cmd/get/execution_util_test.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" - "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index b61273233b..fbc820d892 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -13,7 +13,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index dc2522937e..c40394c785 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -5,9 +5,8 @@ import ( "sort" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/stretchr/testify/assert" ) const projectValue = "dummyProject" diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 8f67c64e33..c197ec111e 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -5,23 +5,17 @@ import ( "os" "testing" - structpb "github.com/golang/protobuf/ptypes/struct" - - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - - "github.com/flyteorg/flyte/flytectl/pkg/printer" - - "github.com/flyteorg/flyte/flytectl/pkg/filters" - - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/launchplan" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" + "github.com/flyteorg/flyte/flytectl/pkg/filters" + "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - + structpb "github.com/golang/protobuf/ptypes/struct" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go index 25e7f31a67..43069edaa6 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_execution_cluster_label_test.go b/flytectl/cmd/get/matchable_execution_cluster_label_test.go index cf0bac5b24..3ac42a87de 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionclusterlabel" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go index fd4a6ddb11..3dd8e235cf 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionqueueattribute" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_plugin_override_test.go b/flytectl/cmd/get/matchable_plugin_override_test.go index 91bfedc7a7..025267a462 100644 --- a/flytectl/cmd/get/matchable_plugin_override_test.go +++ b/flytectl/cmd/get/matchable_plugin_override_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/plugin_override" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index d0e180fd2c..b5e8887583 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index 57589e0d3b..6c1e3249d2 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -10,7 +10,6 @@ import ( cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/flytectl/cmd/get/matchable_workflow_execution_config_test.go b/flytectl/cmd/get/matchable_workflow_execution_config_test.go index 0011fe389e..69b88ee900 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/node_execution.go b/flytectl/cmd/get/node_execution.go index 6c7e259d58..7b2e7a9e88 100644 --- a/flytectl/cmd/get/node_execution.go +++ b/flytectl/cmd/get/node_execution.go @@ -7,13 +7,12 @@ import ( "sort" "strconv" + "github.com/disiqueira/gotree" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/disiqueira/gotree" "github.com/golang/protobuf/jsonpb" ) diff --git a/flytectl/cmd/get/node_execution_test.go b/flytectl/cmd/get/node_execution_test.go index f4d6040513..588ea6033c 100644 --- a/flytectl/cmd/get/node_execution_test.go +++ b/flytectl/cmd/get/node_execution_test.go @@ -5,13 +5,11 @@ import ( "testing" "time" + "github.com/disiqueira/gotree" "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/event" - - "github.com/disiqueira/gotree" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/durationpb" diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 0b66055f65..96b68c56fb 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -3,15 +3,13 @@ package get import ( "context" + "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/golang/protobuf/proto" - - "github.com/flyteorg/flyte/flytectl/cmd/config" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flytectl/pkg/printer" ) const ( diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go index a230cbb19f..7bcc55a236 100644 --- a/flytectl/cmd/get/project_test.go +++ b/flytectl/cmd/get/project_test.go @@ -4,10 +4,8 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index c5379ab4f9..27e65d3fef 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -5,21 +5,15 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" - taskConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/task" - - "github.com/flyteorg/flyte/flytectl/pkg/filters" - - "github.com/stretchr/testify/mock" - + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" + "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index c90d152f21..4fa8f93928 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,16 +3,14 @@ package get import ( "context" - workflowconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" - "github.com/flyteorg/flyte/flytectl/pkg/ext" - "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/golang/protobuf/proto" - "github.com/flyteorg/flyte/flytectl/cmd/config" + workflowconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flytectl/pkg/printer" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/golang/protobuf/proto" ) const ( diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index 32ef21a938..118ad03521 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -4,22 +4,17 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" - - "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - - "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "google.golang.org/protobuf/types/known/timestamppb" ) var ( diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index ed90ba1253..6ede75becc 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -9,7 +9,6 @@ import ( cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" g "github.com/flyteorg/flyte/flytectl/pkg/github" "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/google/go-github/v42/github" ) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index b3311117a3..ae56994207 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -7,13 +7,11 @@ import ( "os" "github.com/flyteorg/flyte/flytectl/cmd/config" - - "github.com/flyteorg/flyte/flytestdlib/storage" - rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/storage" ) const ( diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index f5b221989a..45827b7e13 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -4,16 +4,14 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flytectl/cmd/config" + rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" - - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytestdlib/contextutils" + "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" "github.com/flyteorg/flyte/flytestdlib/storage" - - rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" - "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 1de031fc51..bc4b2e8fed 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -3,7 +3,6 @@ package register import ( rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index c968623a8d..0bf5a23d49 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -18,29 +18,24 @@ import ( "strconv" "strings" - errors2 "github.com/flyteorg/flyte/flytestdlib/errors" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" - - g "github.com/flyteorg/flyte/flytectl/pkg/github" - - "github.com/flyteorg/flyte/flytestdlib/contextutils" - "github.com/flyteorg/flyte/flytestdlib/promutils" - "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" - "github.com/flyteorg/flyte/flytestdlib/utils" - "github.com/flyteorg/flyte/flytectl/cmd/config" rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + g "github.com/flyteorg/flyte/flytectl/pkg/github" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flytestdlib/contextutils" + errors2 "github.com/flyteorg/flyte/flytestdlib/errors" "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/promutils" + "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" "github.com/flyteorg/flyte/flytestdlib/storage" - "github.com/google/go-github/v42/github" - + "github.com/flyteorg/flyte/flytestdlib/utils" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" + "github.com/google/go-github/v42/github" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 97148862f5..b6625c27de 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -12,30 +12,24 @@ import ( "strings" "testing" + rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" ghMocks "github.com/flyteorg/flyte/flytectl/pkg/github/mocks" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" - - "github.com/flyteorg/flyte/flytestdlib/utils" - - v1 "k8s.io/api/core/v1" - "github.com/flyteorg/flyte/flytestdlib/contextutils" "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" "github.com/flyteorg/flyte/flytestdlib/storage" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - + "github.com/flyteorg/flyte/flytestdlib/utils" "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/durationpb" + v1 "k8s.io/api/core/v1" ) type MockHTTPClient struct { diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 112fa4074c..6806cae236 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -22,7 +22,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/printer" stdConfig "github.com/flyteorg/flyte/flytestdlib/config" "github.com/flyteorg/flyte/flytestdlib/config/viper" - "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" diff --git a/flytectl/cmd/sandbox/exec_test.go b/flytectl/cmd/sandbox/exec_test.go index 828c47ba4e..6646d39cd9 100644 --- a/flytectl/cmd/sandbox/exec_test.go +++ b/flytectl/cmd/sandbox/exec_test.go @@ -8,16 +8,13 @@ import ( "strings" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/stretchr/testify/assert" - "github.com/docker/docker/api/types" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go index 64dd502065..e5a3fc46e7 100644 --- a/flytectl/cmd/sandbox/status.go +++ b/flytectl/cmd/sandbox/status.go @@ -3,10 +3,9 @@ package sandbox import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/sandbox/status_test.go b/flytectl/cmd/sandbox/status_test.go index 1bdae48561..ab2be170ed 100644 --- a/flytectl/cmd/sandbox/status_test.go +++ b/flytectl/cmd/sandbox/status_test.go @@ -3,9 +3,8 @@ package sandbox import ( "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/docker/docker/api/types" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 6ee747f637..8e68ffafb5 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -3,11 +3,10 @@ package sandbox import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/docker" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index 87b3b80044..1e2bba1365 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -12,14 +12,13 @@ import ( "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" extMocks "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flytestdlib/utils" + "github.com/stretchr/testify/assert" ) const projectValue = "dummyProject" diff --git a/flytectl/cmd/update/execution_test.go b/flytectl/cmd/update/execution_test.go index 3401d77d41..d8e2db59e7 100644 --- a/flytectl/cmd/update/execution_test.go +++ b/flytectl/cmd/update/execution_test.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/launch_plan_meta_test.go b/flytectl/cmd/update/launch_plan_meta_test.go index df6cd624d1..63d4ded737 100644 --- a/flytectl/cmd/update/launch_plan_meta_test.go +++ b/flytectl/cmd/update/launch_plan_meta_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go index 93a19b2241..5704702a2e 100644 --- a/flytectl/cmd/update/launch_plan_test.go +++ b/flytectl/cmd/update/launch_plan_test.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index 3dad6643ee..c902794685 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/clusterresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index cdcc2f05b3..0bbccbc83b 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index 3e536b9947..a88dc80717 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index b0dc9bade0..3207951db6 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - pluginoverride "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index d3119bcbae..6e54b17e34 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 3e327c8e18..b5647ede17 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -4,11 +4,10 @@ import ( "context" "fmt" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - sconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index 963dde4e73..06e0996d37 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/named_entity_test.go b/flytectl/cmd/update/named_entity_test.go index 61303d5e65..2dbb50fba5 100644 --- a/flytectl/cmd/update/named_entity_test.go +++ b/flytectl/cmd/update/named_entity_test.go @@ -4,13 +4,12 @@ import ( "context" "fmt" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/mock" ) func testNamedEntityUpdate( diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index c89861741f..38f959ba38 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -5,13 +5,12 @@ import ( "fmt" "os" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index 6bf8084cc8..c5785e0a12 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -4,14 +4,13 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) func TestProjectCanBeActivated(t *testing.T) { diff --git a/flytectl/cmd/update/task_meta_test.go b/flytectl/cmd/update/task_meta_test.go index a3550418bc..09cc573115 100644 --- a/flytectl/cmd/update/task_meta_test.go +++ b/flytectl/cmd/update/task_meta_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 11c3183639..4cf1b4f208 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -11,7 +11,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/update/workflow_meta_test.go b/flytectl/cmd/update/workflow_meta_test.go index 157b79bc93..05589ee6c7 100644 --- a/flytectl/cmd/update/workflow_meta_test.go +++ b/flytectl/cmd/update/workflow_meta_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 5d91848720..c4ad132c30 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -8,17 +8,13 @@ import ( "runtime" "strings" - "github.com/flyteorg/flyte/flytectl/pkg/util" - - stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" - + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/github" - + "github.com/flyteorg/flyte/flytectl/pkg/platformutil" + "github.com/flyteorg/flyte/flytectl/pkg/util" "github.com/flyteorg/flyte/flytestdlib/logger" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" "github.com/mouuff/go-rocket-update/pkg/updater" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flytectl/pkg/platformutil" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 5cb52f2e98..a8a955639e 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -5,16 +5,12 @@ import ( "sort" "testing" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/pkg/github" - "github.com/flyteorg/flyte/flytectl/pkg/util" - "github.com/flyteorg/flyte/flytectl/pkg/platformutil" - + "github.com/flyteorg/flyte/flytectl/pkg/util" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 7ff69cae29..38b61d5538 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -6,11 +6,9 @@ import ( "fmt" "runtime" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/github" - "github.com/flyteorg/flyte/flytectl/pkg/platformutil" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/logger" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index d9453f4063..a1abbd7883 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -8,16 +8,13 @@ import ( "sort" "testing" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/cmd/testutils" - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - "github.com/spf13/cobra" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" + "github.com/spf13/cobra" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/bubbletea/bubbletea_pagination.go b/flytectl/pkg/bubbletea/bubbletea_pagination.go index 3b8f5319b5..01a4b7ea98 100644 --- a/flytectl/pkg/bubbletea/bubbletea_pagination.go +++ b/flytectl/pkg/bubbletea/bubbletea_pagination.go @@ -9,12 +9,11 @@ import ( "github.com/charmbracelet/bubbles/key" "github.com/charmbracelet/bubbles/paginator" "github.com/charmbracelet/bubbles/spinner" + tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/golang/protobuf/proto" - - tea "github.com/charmbracelet/bubbletea" ) var ( diff --git a/flytectl/pkg/bubbletea/bubbletea_pagination_util.go b/flytectl/pkg/bubbletea/bubbletea_pagination_util.go index 21e624ffed..dc6ddd735b 100644 --- a/flytectl/pkg/bubbletea/bubbletea_pagination_util.go +++ b/flytectl/pkg/bubbletea/bubbletea_pagination_util.go @@ -10,7 +10,6 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" - "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" ) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index f2c98da418..c4751a0a0f 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -9,17 +9,16 @@ import ( "os" "strings" - "github.com/docker/docker/client" - "github.com/enescakir/emoji" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/volume" + "github.com/docker/docker/client" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" + "github.com/enescakir/emoji" "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/docker" cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index fa99e88c8a..feae21352c 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -12,18 +12,15 @@ import ( "testing" "time" - f "github.com/flyteorg/flyte/flytectl/pkg/filesystemutils" - + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/volume" - "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" - - "github.com/stretchr/testify/mock" - - "github.com/docker/docker/api/types" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/docker" + "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" + f "github.com/flyteorg/flyte/flytectl/pkg/filesystemutils" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) var ( diff --git a/flytectl/pkg/ext/attribute_match_deleter_test.go b/flytectl/pkg/ext/attribute_match_deleter_test.go index 885eff0585..0655419e9e 100644 --- a/flytectl/pkg/ext/attribute_match_deleter_test.go +++ b/flytectl/pkg/ext/attribute_match_deleter_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/attribute_match_fetcher.go b/flytectl/pkg/ext/attribute_match_fetcher.go index eca2ce8e15..0665f59e8e 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher.go +++ b/flytectl/pkg/ext/attribute_match_fetcher.go @@ -3,10 +3,9 @@ package ext import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) func (a *AdminFetcherExtClient) FetchWorkflowAttributes(ctx context.Context, project, domain, name string, diff --git a/flytectl/pkg/ext/attribute_match_fetcher_test.go b/flytectl/pkg/ext/attribute_match_fetcher_test.go index b9ecff16d6..43edba5ec1 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher_test.go +++ b/flytectl/pkg/ext/attribute_match_fetcher_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/attribute_match_updater_test.go b/flytectl/pkg/ext/attribute_match_updater_test.go index 1fab0f6795..4525865e50 100644 --- a/flytectl/pkg/ext/attribute_match_updater_test.go +++ b/flytectl/pkg/ext/attribute_match_updater_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/execution_fetcher_test.go b/flytectl/pkg/ext/execution_fetcher_test.go index 304f929880..2a5fb1c712 100644 --- a/flytectl/pkg/ext/execution_fetcher_test.go +++ b/flytectl/pkg/ext/execution_fetcher_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 60bc32cd0f..d62d58b8d1 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -4,7 +4,6 @@ import ( "context" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) diff --git a/flytectl/pkg/ext/launch_plan_fetcher.go b/flytectl/pkg/ext/launch_plan_fetcher.go index 53d0b69255..3c4ae96585 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher.go +++ b/flytectl/pkg/ext/launch_plan_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/ext/launch_plan_fetcher_test.go b/flytectl/pkg/ext/launch_plan_fetcher_test.go index 2e882d6df9..61b78efd24 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher_test.go +++ b/flytectl/pkg/ext/launch_plan_fetcher_test.go @@ -6,11 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/pkg/ext/project_fetcher.go b/flytectl/pkg/ext/project_fetcher.go index 7c2a53b223..a1e83fdf70 100644 --- a/flytectl/pkg/ext/project_fetcher.go +++ b/flytectl/pkg/ext/project_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) diff --git a/flytectl/pkg/ext/task_fetcher.go b/flytectl/pkg/ext/task_fetcher.go index 840a78d172..53c0acccb0 100644 --- a/flytectl/pkg/ext/task_fetcher.go +++ b/flytectl/pkg/ext/task_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/ext/task_fetcher_test.go b/flytectl/pkg/ext/task_fetcher_test.go index b39c1724d0..ad903db1d5 100644 --- a/flytectl/pkg/ext/task_fetcher_test.go +++ b/flytectl/pkg/ext/task_fetcher_test.go @@ -6,11 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/pkg/ext/workflow_fetcher.go b/flytectl/pkg/ext/workflow_fetcher.go index 23d92af230..7f3624f512 100644 --- a/flytectl/pkg/ext/workflow_fetcher.go +++ b/flytectl/pkg/ext/workflow_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index c7992cc0c0..114d6afea4 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -6,11 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index e439df44f8..5e639006e5 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -13,7 +13,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/util" "github.com/flyteorg/flyte/flytestdlib/logger" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" - "github.com/google/go-github/v42/github" "github.com/mouuff/go-rocket-update/pkg/provider" "github.com/mouuff/go-rocket-update/pkg/updater" diff --git a/flytectl/pkg/github/githubutil_test.go b/flytectl/pkg/github/githubutil_test.go index bd4001faa6..652e812e19 100644 --- a/flytectl/pkg/github/githubutil_test.go +++ b/flytectl/pkg/github/githubutil_test.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/platformutil" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" "github.com/google/go-github/v42/github" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "golang.org/x/text/cases" diff --git a/flytectl/pkg/pkce/token_cache_keyring.go b/flytectl/pkg/pkce/token_cache_keyring.go index afcfa74db5..7b79a09f88 100644 --- a/flytectl/pkg/pkce/token_cache_keyring.go +++ b/flytectl/pkg/pkce/token_cache_keyring.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/cache" "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/zalando/go-keyring" "golang.org/x/oauth2" ) diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 37df90ff75..df7effd8a1 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -14,7 +14,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytestdlib/errors" - "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/kataras/tablewriter" diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index f66e29a2a5..afc5edb7b1 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -11,9 +11,8 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/golang/protobuf/proto" - "google.golang.org/protobuf/types/known/timestamppb" - "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/types/known/timestamppb" ) type Inner struct { diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go index 82c8613126..1cf42e471b 100644 --- a/flytectl/pkg/sandbox/start_test.go +++ b/flytectl/pkg/sandbox/start_test.go @@ -9,6 +9,11 @@ import ( "strings" "testing" + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/volume" + sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" f "github.com/flyteorg/flyte/flytectl/pkg/filesystemutils" @@ -17,12 +22,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/k8s" k8sMocks "github.com/flyteorg/flyte/flytectl/pkg/k8s/mocks" "github.com/flyteorg/flyte/flytectl/pkg/util" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/api/types/volume" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/sandbox/status_test.go b/flytectl/pkg/sandbox/status_test.go index 98080bf642..264ae6196f 100644 --- a/flytectl/pkg/sandbox/status_test.go +++ b/flytectl/pkg/sandbox/status_test.go @@ -3,9 +3,8 @@ package sandbox import ( "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/docker/docker/api/types" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/assert" diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 8b052269f8..18067d1702 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -9,10 +9,9 @@ import ( "path/filepath" "strings" + "github.com/enescakir/emoji" "github.com/flyteorg/flyte/flytectl/pkg/configutil" "github.com/flyteorg/flyte/flytectl/pkg/docker" - - "github.com/enescakir/emoji" hversion "github.com/hashicorp/go-version" ) diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index b3c3f37497..d378b0d5c3 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/docker" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/visualize/graphviz.go b/flytectl/pkg/visualize/graphviz.go index d088a2515b..745c7ad248 100644 --- a/flytectl/pkg/visualize/graphviz.go +++ b/flytectl/pkg/visualize/graphviz.go @@ -4,9 +4,8 @@ import ( "fmt" "strings" - "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" - graphviz "github.com/awalterschulze/gographviz" + "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/visualize/graphviz_test.go b/flytectl/pkg/visualize/graphviz_test.go index fd56f8748e..72dcd3a69b 100644 --- a/flytectl/pkg/visualize/graphviz_test.go +++ b/flytectl/pkg/visualize/graphviz_test.go @@ -6,11 +6,10 @@ import ( "io/ioutil" "testing" + graphviz "github.com/awalterschulze/gographviz" "github.com/flyteorg/flyte/flytectl/pkg/visualize/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytestdlib/utils" - - graphviz "github.com/awalterschulze/gographviz" "github.com/golang/protobuf/jsonpb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" From 297cdf801d3882c96e829ca67b58a070958712b3 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 19 Jun 2024 05:07:38 +0800 Subject: [PATCH 25/30] install image builder (#5487) Signed-off-by: Kevin Su --- .github/workflows/single-binary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/single-binary.yml b/.github/workflows/single-binary.yml index 47b86a7dc3..d4e61a032e 100644 --- a/.github/workflows/single-binary.yml +++ b/.github/workflows/single-binary.yml @@ -174,7 +174,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install flytekit flytekitplugins-deck-standard "numpy<2.0.0" + pip install flytekit flytekitplugins-deck-standard flytekitplugins-envd "numpy<2.0.0" pip freeze - name: Checkout flytesnacks uses: actions/checkout@v4 From 16e77801f7bd32377e9f55cf8f2f6f006ddc3acf Mon Sep 17 00:00:00 2001 From: Vinayak Agarwal Date: Thu, 20 Jun 2024 03:27:43 -0700 Subject: [PATCH 26/30] Inherit execution cluster label from source execution (#5431) Signed-off-by: Vinayak Agarwal --- flyteadmin/pkg/manager/impl/execution_manager.go | 6 ++++++ flyteadmin/pkg/manager/impl/execution_manager_test.go | 3 +++ 2 files changed, 9 insertions(+) diff --git a/flyteadmin/pkg/manager/impl/execution_manager.go b/flyteadmin/pkg/manager/impl/execution_manager.go index 977e1f8179..da7489258d 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager.go +++ b/flyteadmin/pkg/manager/impl/execution_manager.go @@ -305,6 +305,12 @@ func (m *ExecutionManager) getInheritedExecMetadata(ctx context.Context, request } else { requestSpec.Metadata.Nesting = 1 } + + // If the source execution has a cluster label, inherit it. + if sourceExecution.Spec.ExecutionClusterLabel != nil { + logger.Infof(ctx, "Inherited execution label from source execution [%+v]", sourceExecution.Spec.ExecutionClusterLabel.Value) + requestSpec.ExecutionClusterLabel = sourceExecution.Spec.ExecutionClusterLabel + } return parentNodeExecutionID, sourceExecutionID, nil } diff --git a/flyteadmin/pkg/manager/impl/execution_manager_test.go b/flyteadmin/pkg/manager/impl/execution_manager_test.go index 52ff607725..58e50c0444 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager_test.go +++ b/flyteadmin/pkg/manager/impl/execution_manager_test.go @@ -428,6 +428,7 @@ func TestCreateExecutionFromWorkflowNode(t *testing.T) { ) getExecutionCalled := false + var clusterLabel = &admin.ExecutionClusterLabel{Value: executionClusterLabel} repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetGetCallback( func(ctx context.Context, input interfaces.Identifier) (models.Execution, error) { assert.EqualValues(t, input.Project, parentNodeExecutionID.ExecutionId.Project) @@ -437,6 +438,7 @@ func TestCreateExecutionFromWorkflowNode(t *testing.T) { Metadata: &admin.ExecutionMetadata{ Nesting: 1, }, + ExecutionClusterLabel: clusterLabel, } specBytes, _ := proto.Marshal(spec) getExecutionCalled = true @@ -462,6 +464,7 @@ func TestCreateExecutionFromWorkflowNode(t *testing.T) { assert.EqualValues(t, input.SourceExecutionID, 2) assert.Equal(t, 2, int(spec.Metadata.Nesting)) assert.Equal(t, principal, spec.Metadata.Principal) + assert.Equal(t, executionClusterLabel, spec.ExecutionClusterLabel.Value) assert.Equal(t, principal, input.User) return nil }, From f87a049d737fa39f0a58adf7cc617a1146ace828 Mon Sep 17 00:00:00 2001 From: Brian Chen <50983601+zychen5186@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:01:17 -0700 Subject: [PATCH 27/30] Add API to get domain (#5443) Signed-off-by: zychen5186 --- .../pkg/manager/impl/project_manager.go | 31 +- flyteadmin/pkg/manager/interfaces/project.go | 1 + flyteadmin/pkg/manager/mocks/project.go | 9 + flyteadmin/pkg/rpc/adminservice/metrics.go | 11 + flyteadmin/pkg/rpc/adminservice/project.go | 14 + flyteadmin/tests/project_test.go | 14 + flytectl/pkg/ext/domain_fetcher.go | 15 + flytectl/pkg/ext/domain_fetcher_test.go | 35 + flytectl/pkg/ext/fetcher.go | 2 + .../ext/mocks/admin_fetcher_ext_interface.go | 41 + .../go/admin/mocks/AdminServiceClient.go | 48 + .../go/admin/mocks/AdminServiceServer.go | 41 + flyteidl/clients/go/assets/admin.swagger.json | 35 + .../gen/pb-es/flyteidl/admin/project_pb.ts | 72 ++ .../pb-es/flyteidl/service/admin_connect.ts | 11 +- .../gen/pb-go/flyteidl/admin/project.pb.go | 356 ++++-- .../gen/pb-go/flyteidl/service/admin.pb.go | 1102 +++++++++-------- .../pb-go/flyteidl/service/admin_grpc.pb.go | 37 + .../gateway/flyteidl/service/admin.pb.gw.go | 69 ++ .../flyteidl/service/admin.swagger.json | 35 + flyteidl/gen/pb-js/flyteidl.d.ts | 119 ++ flyteidl/gen/pb-js/flyteidl.js | 246 ++++ .../pb_python/flyteidl/admin/project_pb2.py | 42 +- .../pb_python/flyteidl/admin/project_pb2.pyi | 10 + .../pb_python/flyteidl/service/admin_pb2.py | 6 +- .../flyteidl/service/admin_pb2_grpc.py | 33 + flyteidl/gen/pb_rust/flyteidl.admin.rs | 12 + .../gen/pb_rust/flyteidl.service.tonic.rs | 82 ++ flyteidl/protos/flyteidl/admin/project.proto | 7 + flyteidl/protos/flyteidl/service/admin.proto | 9 + 30 files changed, 1844 insertions(+), 701 deletions(-) create mode 100644 flytectl/pkg/ext/domain_fetcher.go create mode 100644 flytectl/pkg/ext/domain_fetcher_test.go diff --git a/flyteadmin/pkg/manager/impl/project_manager.go b/flyteadmin/pkg/manager/impl/project_manager.go index abf46d2438..f39c942479 100644 --- a/flyteadmin/pkg/manager/impl/project_manager.go +++ b/flyteadmin/pkg/manager/impl/project_manager.go @@ -42,18 +42,6 @@ func (m *ProjectManager) CreateProject(ctx context.Context, request admin.Projec return &admin.ProjectRegisterResponse{}, nil } -func (m *ProjectManager) getDomains() []*admin.Domain { - configDomains := m.config.ApplicationConfiguration().GetDomainsConfig() - var domains = make([]*admin.Domain, len(*configDomains)) - for index, configDomain := range *configDomains { - domains[index] = &admin.Domain{ - Id: configDomain.ID, - Name: configDomain.Name, - } - } - return domains -} - func (m *ProjectManager) ListProjects(ctx context.Context, request admin.ProjectListRequest) (*admin.Projects, error) { spec := util.FilterSpec{ RequestFilters: request.Filters, @@ -76,7 +64,6 @@ func (m *ProjectManager) ListProjects(ctx context.Context, request admin.Project return nil, errors.NewFlyteAdminErrorf(codes.InvalidArgument, "invalid pagination token %s for ListProjects", request.Token) } - // And finally, query the database listProjectsInput := repoInterfaces.ListResourceInput{ Limit: int(request.Limit), @@ -88,7 +75,7 @@ func (m *ProjectManager) ListProjects(ctx context.Context, request admin.Project if err != nil { return nil, err } - projects := transformers.FromProjectModels(projectModels, m.getDomains()) + projects := transformers.FromProjectModels(projectModels, m.GetDomains(ctx, admin.GetDomainRequest{}).Domains) var token string if len(projects) == int(request.Limit) { @@ -135,11 +122,25 @@ func (m *ProjectManager) GetProject(ctx context.Context, request admin.ProjectGe if err != nil { return nil, err } - projectResponse := transformers.FromProjectModel(projectModel, m.getDomains()) + projectResponse := transformers.FromProjectModel(projectModel, m.GetDomains(ctx, admin.GetDomainRequest{}).Domains) return &projectResponse, nil } +func (m *ProjectManager) GetDomains(ctx context.Context, request admin.GetDomainRequest) *admin.GetDomainsResponse { + configDomains := m.config.ApplicationConfiguration().GetDomainsConfig() + var domains = make([]*admin.Domain, len(*configDomains)) + for index, configDomain := range *configDomains { + domains[index] = &admin.Domain{ + Id: configDomain.ID, + Name: configDomain.Name, + } + } + return &admin.GetDomainsResponse{ + Domains: domains, + } +} + func NewProjectManager(db repoInterfaces.Repository, config runtimeInterfaces.Configuration) interfaces.ProjectInterface { return &ProjectManager{ db: db, diff --git a/flyteadmin/pkg/manager/interfaces/project.go b/flyteadmin/pkg/manager/interfaces/project.go index add58aa196..cea44ceab1 100644 --- a/flyteadmin/pkg/manager/interfaces/project.go +++ b/flyteadmin/pkg/manager/interfaces/project.go @@ -12,4 +12,5 @@ type ProjectInterface interface { ListProjects(ctx context.Context, request admin.ProjectListRequest) (*admin.Projects, error) UpdateProject(ctx context.Context, request admin.Project) (*admin.ProjectUpdateResponse, error) GetProject(ctx context.Context, request admin.ProjectGetRequest) (*admin.Project, error) + GetDomains(ctx context.Context, request admin.GetDomainRequest) *admin.GetDomainsResponse } diff --git a/flyteadmin/pkg/manager/mocks/project.go b/flyteadmin/pkg/manager/mocks/project.go index e86cdde4d5..8e2c334891 100644 --- a/flyteadmin/pkg/manager/mocks/project.go +++ b/flyteadmin/pkg/manager/mocks/project.go @@ -10,12 +10,14 @@ type CreateProjectFunc func(ctx context.Context, request admin.ProjectRegisterRe type ListProjectFunc func(ctx context.Context, request admin.ProjectListRequest) (*admin.Projects, error) type UpdateProjectFunc func(ctx context.Context, request admin.Project) (*admin.ProjectUpdateResponse, error) type GetProjectFunc func(ctx context.Context, request admin.ProjectGetRequest) (*admin.Project, error) +type GetDomainsFunc func(ctx context.Context, request admin.GetDomainRequest) *admin.GetDomainsResponse type MockProjectManager struct { listProjectFunc ListProjectFunc createProjectFunc CreateProjectFunc updateProjectFunc UpdateProjectFunc getProjectFunc GetProjectFunc + getDomainsFunc GetDomainsFunc } func (m *MockProjectManager) SetCreateProject(createProjectFunc CreateProjectFunc) { @@ -58,3 +60,10 @@ func (m *MockProjectManager) GetProject(ctx context.Context, request admin.Proje } return nil, nil } + +func (m *MockProjectManager) GetDomains(ctx context.Context, request admin.GetDomainRequest) *admin.GetDomainsResponse { + if m.getDomainsFunc != nil { + return m.getDomainsFunc(ctx, request) + } + return nil +} diff --git a/flyteadmin/pkg/rpc/adminservice/metrics.go b/flyteadmin/pkg/rpc/adminservice/metrics.go index 5d0e89d93e..65c6b741f3 100644 --- a/flyteadmin/pkg/rpc/adminservice/metrics.go +++ b/flyteadmin/pkg/rpc/adminservice/metrics.go @@ -64,6 +64,12 @@ type projectEndpointMetrics struct { get util.RequestMetrics } +type domainEndpointMetrics struct { + scope promutils.Scope + + get util.RequestMetrics +} + type attributeEndpointMetrics struct { scope promutils.Scope @@ -117,6 +123,7 @@ type AdminMetrics struct { namedEntityEndpointMetrics namedEntityEndpointMetrics nodeExecutionEndpointMetrics nodeExecutionEndpointMetrics projectEndpointMetrics projectEndpointMetrics + domainEndpointMetrics domainEndpointMetrics projectAttributesEndpointMetrics attributeEndpointMetrics projectDomainAttributesEndpointMetrics attributeEndpointMetrics workflowAttributesEndpointMetrics attributeEndpointMetrics @@ -179,6 +186,10 @@ func InitMetrics(adminScope promutils.Scope) AdminMetrics { update: util.NewRequestMetrics(adminScope, "update_project"), get: util.NewRequestMetrics(adminScope, "get_project"), }, + domainEndpointMetrics: domainEndpointMetrics{ + scope: adminScope, + get: util.NewRequestMetrics(adminScope, "get_domain"), + }, projectAttributesEndpointMetrics: attributeEndpointMetrics{ scope: adminScope, update: util.NewRequestMetrics(adminScope, "update_project_attrs"), diff --git a/flyteadmin/pkg/rpc/adminservice/project.go b/flyteadmin/pkg/rpc/adminservice/project.go index df281dad0a..5e7352ad93 100644 --- a/flyteadmin/pkg/rpc/adminservice/project.go +++ b/flyteadmin/pkg/rpc/adminservice/project.go @@ -81,3 +81,17 @@ func (m *AdminService) GetProject(ctx context.Context, request *admin.ProjectGet m.Metrics.projectEndpointMetrics.get.Success() return response, nil } + +func (m *AdminService) GetDomains(ctx context.Context, request *admin.GetDomainRequest) (*admin.GetDomainsResponse, error) { + defer m.interceptPanic(ctx, request) + if request == nil { + return nil, status.Errorf(codes.InvalidArgument, "Incorrect request, nil requests not allowed") + } + var response *admin.GetDomainsResponse + m.Metrics.domainEndpointMetrics.get.Time(func() { + response = m.ProjectManager.GetDomains(ctx, *request) + }) + + m.Metrics.domainEndpointMetrics.get.Success() + return response, nil +} diff --git a/flyteadmin/tests/project_test.go b/flyteadmin/tests/project_test.go index 0534ca1f3a..8082004271 100644 --- a/flyteadmin/tests/project_test.go +++ b/flyteadmin/tests/project_test.go @@ -227,3 +227,17 @@ func TestUpdateProjectLabels_BadLabels(t *testing.T) { // Assert that update went through without an error. assert.EqualError(t, err, "rpc error: code = InvalidArgument desc = invalid label value [#bar]: [a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]") } + +func TestGetDomains(t *testing.T) { + ctx := context.Background() + client, conn := GetTestAdminServiceClient() + defer conn.Close() + + domains, err := client.GetDomains(ctx, &admin.GetDomainRequest{}) + assert.Nil(t, err) + assert.NotEmpty(t, domains.Domains) + for _, domain := range domains.Domains { + assert.Contains(t, []string{"development", "domain", "staging", "production"}, domain.Id) + assert.Contains(t, []string{"development", "domain", "staging", "production"}, domain.Name) + } +} diff --git a/flytectl/pkg/ext/domain_fetcher.go b/flytectl/pkg/ext/domain_fetcher.go new file mode 100644 index 0000000000..8df7e5976c --- /dev/null +++ b/flytectl/pkg/ext/domain_fetcher.go @@ -0,0 +1,15 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" +) + +func (a *AdminFetcherExtClient) GetDomains(ctx context.Context) (*admin.GetDomainsResponse, error) { + domains, err := a.AdminServiceClient().GetDomains(ctx, &admin.GetDomainRequest{}) + if err != nil { + return nil, err + } + return domains, nil +} diff --git a/flytectl/pkg/ext/domain_fetcher_test.go b/flytectl/pkg/ext/domain_fetcher_test.go new file mode 100644 index 0000000000..36b570426a --- /dev/null +++ b/flytectl/pkg/ext/domain_fetcher_test.go @@ -0,0 +1,35 @@ +package ext + +import ( + "testing" + + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestAdminFetcherExtClient_GetDomains(t *testing.T) { + domain1 := &admin.Domain{ + Id: "development", + Name: "development", + } + domain2 := &admin.Domain{ + Id: "staging", + Name: "staging", + } + domain3 := &admin.Domain{ + Id: "production", + Name: "production", + } + domains := &admin.GetDomainsResponse{ + Domains: []*admin.Domain{domain1, domain2, domain3}, + } + + adminClient := new(mocks.AdminServiceClient) + adminFetcherExt := AdminFetcherExtClient{AdminClient: adminClient} + + adminClient.OnGetDomainsMatch(mock.Anything, mock.Anything).Return(domains, nil) + _, err := adminFetcherExt.GetDomains(ctx) + assert.Nil(t, err) +} diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index d62d58b8d1..1047e8d870 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -74,6 +74,8 @@ type AdminFetcherExtInterface interface { // GetProjectByID fetches a single project by its identifier. If project does not exist, an error will be returned GetProjectByID(ctx context.Context, projectID string) (*admin.Project, error) + + GetDomains(ctx context.Context) (*admin.GetDomainsResponse, error) } // AdminFetcherExtClient is used for interacting with extended features used for fetching data from admin service diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 07771f5325..514ae2ff39 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -750,6 +750,47 @@ func (_m *AdminFetcherExtInterface) FetchWorkflowVersion(ctx context.Context, na return r0, r1 } +type AdminFetcherExtInterface_GetDomains struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_GetDomains) Return(_a0 *admin.GetDomainsResponse, _a1 error) *AdminFetcherExtInterface_GetDomains { + return &AdminFetcherExtInterface_GetDomains{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnGetDomains(ctx context.Context) *AdminFetcherExtInterface_GetDomains { + c_call := _m.On("GetDomains", ctx) + return &AdminFetcherExtInterface_GetDomains{Call: c_call} +} + +func (_m *AdminFetcherExtInterface) OnGetDomainsMatch(matchers ...interface{}) *AdminFetcherExtInterface_GetDomains { + c_call := _m.On("GetDomains", matchers...) + return &AdminFetcherExtInterface_GetDomains{Call: c_call} +} + +// GetDomains provides a mock function with given fields: ctx +func (_m *AdminFetcherExtInterface) GetDomains(ctx context.Context) (*admin.GetDomainsResponse, error) { + ret := _m.Called(ctx) + + var r0 *admin.GetDomainsResponse + if rf, ok := ret.Get(0).(func(context.Context) *admin.GetDomainsResponse); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetDomainsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_GetProjectByID struct { *mock.Call } diff --git a/flyteidl/clients/go/admin/mocks/AdminServiceClient.go b/flyteidl/clients/go/admin/mocks/AdminServiceClient.go index ad647aa331..24b96b7f01 100644 --- a/flyteidl/clients/go/admin/mocks/AdminServiceClient.go +++ b/flyteidl/clients/go/admin/mocks/AdminServiceClient.go @@ -593,6 +593,54 @@ func (_m *AdminServiceClient) GetDescriptionEntity(ctx context.Context, in *admi return r0, r1 } +type AdminServiceClient_GetDomains struct { + *mock.Call +} + +func (_m AdminServiceClient_GetDomains) Return(_a0 *admin.GetDomainsResponse, _a1 error) *AdminServiceClient_GetDomains { + return &AdminServiceClient_GetDomains{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceClient) OnGetDomains(ctx context.Context, in *admin.GetDomainRequest, opts ...grpc.CallOption) *AdminServiceClient_GetDomains { + c_call := _m.On("GetDomains", ctx, in, opts) + return &AdminServiceClient_GetDomains{Call: c_call} +} + +func (_m *AdminServiceClient) OnGetDomainsMatch(matchers ...interface{}) *AdminServiceClient_GetDomains { + c_call := _m.On("GetDomains", matchers...) + return &AdminServiceClient_GetDomains{Call: c_call} +} + +// GetDomains provides a mock function with given fields: ctx, in, opts +func (_m *AdminServiceClient) GetDomains(ctx context.Context, in *admin.GetDomainRequest, opts ...grpc.CallOption) (*admin.GetDomainsResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *admin.GetDomainsResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetDomainRequest, ...grpc.CallOption) *admin.GetDomainsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetDomainsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.GetDomainRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminServiceClient_GetDynamicNodeWorkflow struct { *mock.Call } diff --git a/flyteidl/clients/go/admin/mocks/AdminServiceServer.go b/flyteidl/clients/go/admin/mocks/AdminServiceServer.go index a303734ed5..ad13755761 100644 --- a/flyteidl/clients/go/admin/mocks/AdminServiceServer.go +++ b/flyteidl/clients/go/admin/mocks/AdminServiceServer.go @@ -507,6 +507,47 @@ func (_m *AdminServiceServer) GetDescriptionEntity(_a0 context.Context, _a1 *adm return r0, r1 } +type AdminServiceServer_GetDomains struct { + *mock.Call +} + +func (_m AdminServiceServer_GetDomains) Return(_a0 *admin.GetDomainsResponse, _a1 error) *AdminServiceServer_GetDomains { + return &AdminServiceServer_GetDomains{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceServer) OnGetDomains(_a0 context.Context, _a1 *admin.GetDomainRequest) *AdminServiceServer_GetDomains { + c_call := _m.On("GetDomains", _a0, _a1) + return &AdminServiceServer_GetDomains{Call: c_call} +} + +func (_m *AdminServiceServer) OnGetDomainsMatch(matchers ...interface{}) *AdminServiceServer_GetDomains { + c_call := _m.On("GetDomains", matchers...) + return &AdminServiceServer_GetDomains{Call: c_call} +} + +// GetDomains provides a mock function with given fields: _a0, _a1 +func (_m *AdminServiceServer) GetDomains(_a0 context.Context, _a1 *admin.GetDomainRequest) (*admin.GetDomainsResponse, error) { + ret := _m.Called(_a0, _a1) + + var r0 *admin.GetDomainsResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetDomainRequest) *admin.GetDomainsResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetDomainsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.GetDomainRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminServiceServer_GetDynamicNodeWorkflow struct { *mock.Call } diff --git a/flyteidl/clients/go/assets/admin.swagger.json b/flyteidl/clients/go/assets/admin.swagger.json index e1f0b29579..ee086383c4 100644 --- a/flyteidl/clients/go/assets/admin.swagger.json +++ b/flyteidl/clients/go/assets/admin.swagger.json @@ -830,6 +830,28 @@ ] } }, + "/api/v1/domains": { + "get": { + "operationId": "AdminService_GetDomains", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminGetDomainsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "tags": [ + "AdminService" + ] + } + }, "/api/v1/events/nodes": { "post": { "summary": "Indicates a :ref:`ref_flyteidl.event.NodeExecutionEvent` has occurred.", @@ -5111,6 +5133,19 @@ }, "description": "These URLs are returned as part of node and task execution data requests." }, + "adminGetDomainsResponse": { + "type": "object", + "properties": { + "domains": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/adminDomain" + } + } + }, + "description": "Represents a list of domains." + }, "adminGetVersionResponse": { "type": "object", "properties": { diff --git a/flyteidl/gen/pb-es/flyteidl/admin/project_pb.ts b/flyteidl/gen/pb-es/flyteidl/admin/project_pb.ts index 17e8db3fab..24447ca5b4 100644 --- a/flyteidl/gen/pb-es/flyteidl/admin/project_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/admin/project_pb.ts @@ -7,6 +7,39 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM import { Message, proto3 } from "@bufbuild/protobuf"; import { Labels, Sort } from "./common_pb.js"; +/** + * Empty request for GetDomain + * + * @generated from message flyteidl.admin.GetDomainRequest + */ +export class GetDomainRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.GetDomainRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDomainRequest { + return new GetDomainRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDomainRequest { + return new GetDomainRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetDomainRequest { + return new GetDomainRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetDomainRequest | PlainMessage | undefined, b: GetDomainRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetDomainRequest, a, b); + } +} + /** * Namespace within a project commonly used to differentiate between different service instances. * e.g. "production", "development", etc. @@ -57,6 +90,45 @@ export class Domain extends Message { } } +/** + * Represents a list of domains. + * + * @generated from message flyteidl.admin.GetDomainsResponse + */ +export class GetDomainsResponse extends Message { + /** + * @generated from field: repeated flyteidl.admin.Domain domains = 1; + */ + domains: Domain[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.GetDomainsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "domains", kind: "message", T: Domain, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDomainsResponse { + return new GetDomainsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDomainsResponse { + return new GetDomainsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetDomainsResponse { + return new GetDomainsResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetDomainsResponse | PlainMessage | undefined, b: GetDomainsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetDomainsResponse, a, b); + } +} + /** * Top-level namespace used to classify different entities like workflows and executions. * diff --git a/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts b/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts index 22c84826f4..9be28e9e2a 100644 --- a/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts +++ b/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts @@ -10,7 +10,7 @@ import { Workflow, WorkflowCreateRequest, WorkflowCreateResponse, WorkflowList } import { ActiveLaunchPlanListRequest, ActiveLaunchPlanRequest, LaunchPlan, LaunchPlanCreateRequest, LaunchPlanCreateResponse, LaunchPlanList, LaunchPlanUpdateRequest, LaunchPlanUpdateResponse } from "../admin/launch_plan_pb.js"; import { Execution, ExecutionCreateRequest, ExecutionCreateResponse, ExecutionList, ExecutionRecoverRequest, ExecutionRelaunchRequest, ExecutionTerminateRequest, ExecutionTerminateResponse, ExecutionUpdateRequest, ExecutionUpdateResponse, WorkflowExecutionGetDataRequest, WorkflowExecutionGetDataResponse, WorkflowExecutionGetMetricsRequest, WorkflowExecutionGetMetricsResponse, WorkflowExecutionGetRequest } from "../admin/execution_pb.js"; import { DynamicNodeWorkflowResponse, GetDynamicNodeWorkflowRequest, NodeExecution, NodeExecutionForTaskListRequest, NodeExecutionGetDataRequest, NodeExecutionGetDataResponse, NodeExecutionGetRequest, NodeExecutionList, NodeExecutionListRequest } from "../admin/node_execution_pb.js"; -import { Project, ProjectGetRequest, ProjectListRequest, ProjectRegisterRequest, ProjectRegisterResponse, Projects, ProjectUpdateResponse } from "../admin/project_pb.js"; +import { GetDomainRequest, GetDomainsResponse, Project, ProjectGetRequest, ProjectListRequest, ProjectRegisterRequest, ProjectRegisterResponse, Projects, ProjectUpdateResponse } from "../admin/project_pb.js"; import { NodeExecutionEventRequest, NodeExecutionEventResponse, TaskExecutionEventRequest, TaskExecutionEventResponse, WorkflowExecutionEventRequest, WorkflowExecutionEventResponse } from "../admin/event_pb.js"; import { TaskExecution, TaskExecutionGetDataRequest, TaskExecutionGetDataResponse, TaskExecutionGetRequest, TaskExecutionList, TaskExecutionListRequest } from "../admin/task_execution_pb.js"; import { ProjectDomainAttributesDeleteRequest, ProjectDomainAttributesDeleteResponse, ProjectDomainAttributesGetRequest, ProjectDomainAttributesGetResponse, ProjectDomainAttributesUpdateRequest, ProjectDomainAttributesUpdateResponse } from "../admin/project_domain_attributes_pb.js"; @@ -387,6 +387,15 @@ export const AdminService = { O: Projects, kind: MethodKind.Unary, }, + /** + * @generated from rpc flyteidl.service.AdminService.GetDomains + */ + getDomains: { + name: "GetDomains", + I: GetDomainRequest, + O: GetDomainsResponse, + kind: MethodKind.Unary, + }, /** * Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. * diff --git a/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go index 9a09a4a790..807a2bb3bd 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go @@ -70,7 +70,46 @@ func (x Project_ProjectState) Number() protoreflect.EnumNumber { // Deprecated: Use Project_ProjectState.Descriptor instead. func (Project_ProjectState) EnumDescriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{1, 0} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{3, 0} +} + +// Empty request for GetDomain +type GetDomainRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetDomainRequest) Reset() { + *x = GetDomainRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_project_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDomainRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDomainRequest) ProtoMessage() {} + +func (x *GetDomainRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_project_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDomainRequest.ProtoReflect.Descriptor instead. +func (*GetDomainRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{0} } // Namespace within a project commonly used to differentiate between different service instances. @@ -89,7 +128,7 @@ type Domain struct { func (x *Domain) Reset() { *x = Domain{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[0] + mi := &file_flyteidl_admin_project_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -102,7 +141,7 @@ func (x *Domain) String() string { func (*Domain) ProtoMessage() {} func (x *Domain) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[0] + mi := &file_flyteidl_admin_project_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115,7 +154,7 @@ func (x *Domain) ProtoReflect() protoreflect.Message { // Deprecated: Use Domain.ProtoReflect.Descriptor instead. func (*Domain) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{0} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{1} } func (x *Domain) GetId() string { @@ -132,6 +171,54 @@ func (x *Domain) GetName() string { return "" } +// Represents a list of domains. +type GetDomainsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Domains []*Domain `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` +} + +func (x *GetDomainsResponse) Reset() { + *x = GetDomainsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_project_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDomainsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDomainsResponse) ProtoMessage() {} + +func (x *GetDomainsResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_project_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDomainsResponse.ProtoReflect.Descriptor instead. +func (*GetDomainsResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{2} +} + +func (x *GetDomainsResponse) GetDomains() []*Domain { + if x != nil { + return x.Domains + } + return nil +} + // Top-level namespace used to classify different entities like workflows and executions. type Project struct { state protoimpl.MessageState @@ -155,7 +242,7 @@ type Project struct { func (x *Project) Reset() { *x = Project{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[1] + mi := &file_flyteidl_admin_project_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -168,7 +255,7 @@ func (x *Project) String() string { func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[1] + mi := &file_flyteidl_admin_project_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -181,7 +268,7 @@ func (x *Project) ProtoReflect() protoreflect.Message { // Deprecated: Use Project.ProtoReflect.Descriptor instead. func (*Project) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{1} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{3} } func (x *Project) GetId() string { @@ -249,7 +336,7 @@ type Projects struct { func (x *Projects) Reset() { *x = Projects{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[2] + mi := &file_flyteidl_admin_project_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -262,7 +349,7 @@ func (x *Projects) String() string { func (*Projects) ProtoMessage() {} func (x *Projects) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[2] + mi := &file_flyteidl_admin_project_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -275,7 +362,7 @@ func (x *Projects) ProtoReflect() protoreflect.Message { // Deprecated: Use Projects.ProtoReflect.Descriptor instead. func (*Projects) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{2} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{4} } func (x *Projects) GetProjects() []*Project { @@ -320,7 +407,7 @@ type ProjectListRequest struct { func (x *ProjectListRequest) Reset() { *x = ProjectListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[3] + mi := &file_flyteidl_admin_project_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -333,7 +420,7 @@ func (x *ProjectListRequest) String() string { func (*ProjectListRequest) ProtoMessage() {} func (x *ProjectListRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[3] + mi := &file_flyteidl_admin_project_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -346,7 +433,7 @@ func (x *ProjectListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectListRequest.ProtoReflect.Descriptor instead. func (*ProjectListRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{3} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{5} } func (x *ProjectListRequest) GetLimit() uint32 { @@ -398,7 +485,7 @@ type ProjectRegisterRequest struct { func (x *ProjectRegisterRequest) Reset() { *x = ProjectRegisterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[4] + mi := &file_flyteidl_admin_project_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -411,7 +498,7 @@ func (x *ProjectRegisterRequest) String() string { func (*ProjectRegisterRequest) ProtoMessage() {} func (x *ProjectRegisterRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[4] + mi := &file_flyteidl_admin_project_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -424,7 +511,7 @@ func (x *ProjectRegisterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectRegisterRequest.ProtoReflect.Descriptor instead. func (*ProjectRegisterRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{4} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{6} } func (x *ProjectRegisterRequest) GetProject() *Project { @@ -444,7 +531,7 @@ type ProjectRegisterResponse struct { func (x *ProjectRegisterResponse) Reset() { *x = ProjectRegisterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[5] + mi := &file_flyteidl_admin_project_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -457,7 +544,7 @@ func (x *ProjectRegisterResponse) String() string { func (*ProjectRegisterResponse) ProtoMessage() {} func (x *ProjectRegisterResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[5] + mi := &file_flyteidl_admin_project_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -470,7 +557,7 @@ func (x *ProjectRegisterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectRegisterResponse.ProtoReflect.Descriptor instead. func (*ProjectRegisterResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{5} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{7} } // Purposefully empty, may be updated in the future. @@ -483,7 +570,7 @@ type ProjectUpdateResponse struct { func (x *ProjectUpdateResponse) Reset() { *x = ProjectUpdateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[6] + mi := &file_flyteidl_admin_project_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -496,7 +583,7 @@ func (x *ProjectUpdateResponse) String() string { func (*ProjectUpdateResponse) ProtoMessage() {} func (x *ProjectUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[6] + mi := &file_flyteidl_admin_project_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -509,7 +596,7 @@ func (x *ProjectUpdateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectUpdateResponse.ProtoReflect.Descriptor instead. func (*ProjectUpdateResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{6} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{8} } type ProjectGetRequest struct { @@ -527,7 +614,7 @@ type ProjectGetRequest struct { func (x *ProjectGetRequest) Reset() { *x = ProjectGetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_project_proto_msgTypes[7] + mi := &file_flyteidl_admin_project_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -540,7 +627,7 @@ func (x *ProjectGetRequest) String() string { func (*ProjectGetRequest) ProtoMessage() {} func (x *ProjectGetRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_project_proto_msgTypes[7] + mi := &file_flyteidl_admin_project_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -553,7 +640,7 @@ func (x *ProjectGetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectGetRequest.ProtoReflect.Descriptor instead. func (*ProjectGetRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{7} + return file_flyteidl_admin_project_proto_rawDescGZIP(), []int{9} } func (x *ProjectGetRequest) GetId() string { @@ -577,69 +664,75 @@ var file_flyteidl_admin_project_proto_rawDesc = []byte{ 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x1b, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x06, 0x44, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x07, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x22, 0x3e, 0x0a, 0x0c, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, - 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, - 0x56, 0x45, 0x44, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, - 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x08, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x2d, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, - 0x22, 0x4b, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x19, 0x0a, - 0x17, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x35, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x42, 0xb8, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, - 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x46, - 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0xca, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0xe2, 0x02, 0x1a, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0f, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x2c, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x22, 0x3e, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x47, 0x45, 0x4e, 0x45, + 0x52, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9b, + 0x01, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x73, + 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x6f, + 0x72, 0x74, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x22, 0x4b, 0x0a, 0x16, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, + 0x11, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6f, 0x72, 0x67, 0x42, 0xb8, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, 0x0c, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, + 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x41, 0x58, 0xaa, 0x02, + 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xca, + 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0xe2, 0x02, 0x1a, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -655,32 +748,35 @@ func file_flyteidl_admin_project_proto_rawDescGZIP() []byte { } var file_flyteidl_admin_project_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_flyteidl_admin_project_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_flyteidl_admin_project_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_flyteidl_admin_project_proto_goTypes = []interface{}{ (Project_ProjectState)(0), // 0: flyteidl.admin.Project.ProjectState - (*Domain)(nil), // 1: flyteidl.admin.Domain - (*Project)(nil), // 2: flyteidl.admin.Project - (*Projects)(nil), // 3: flyteidl.admin.Projects - (*ProjectListRequest)(nil), // 4: flyteidl.admin.ProjectListRequest - (*ProjectRegisterRequest)(nil), // 5: flyteidl.admin.ProjectRegisterRequest - (*ProjectRegisterResponse)(nil), // 6: flyteidl.admin.ProjectRegisterResponse - (*ProjectUpdateResponse)(nil), // 7: flyteidl.admin.ProjectUpdateResponse - (*ProjectGetRequest)(nil), // 8: flyteidl.admin.ProjectGetRequest - (*Labels)(nil), // 9: flyteidl.admin.Labels - (*Sort)(nil), // 10: flyteidl.admin.Sort + (*GetDomainRequest)(nil), // 1: flyteidl.admin.GetDomainRequest + (*Domain)(nil), // 2: flyteidl.admin.Domain + (*GetDomainsResponse)(nil), // 3: flyteidl.admin.GetDomainsResponse + (*Project)(nil), // 4: flyteidl.admin.Project + (*Projects)(nil), // 5: flyteidl.admin.Projects + (*ProjectListRequest)(nil), // 6: flyteidl.admin.ProjectListRequest + (*ProjectRegisterRequest)(nil), // 7: flyteidl.admin.ProjectRegisterRequest + (*ProjectRegisterResponse)(nil), // 8: flyteidl.admin.ProjectRegisterResponse + (*ProjectUpdateResponse)(nil), // 9: flyteidl.admin.ProjectUpdateResponse + (*ProjectGetRequest)(nil), // 10: flyteidl.admin.ProjectGetRequest + (*Labels)(nil), // 11: flyteidl.admin.Labels + (*Sort)(nil), // 12: flyteidl.admin.Sort } var file_flyteidl_admin_project_proto_depIdxs = []int32{ - 1, // 0: flyteidl.admin.Project.domains:type_name -> flyteidl.admin.Domain - 9, // 1: flyteidl.admin.Project.labels:type_name -> flyteidl.admin.Labels - 0, // 2: flyteidl.admin.Project.state:type_name -> flyteidl.admin.Project.ProjectState - 2, // 3: flyteidl.admin.Projects.projects:type_name -> flyteidl.admin.Project - 10, // 4: flyteidl.admin.ProjectListRequest.sort_by:type_name -> flyteidl.admin.Sort - 2, // 5: flyteidl.admin.ProjectRegisterRequest.project:type_name -> flyteidl.admin.Project - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 2, // 0: flyteidl.admin.GetDomainsResponse.domains:type_name -> flyteidl.admin.Domain + 2, // 1: flyteidl.admin.Project.domains:type_name -> flyteidl.admin.Domain + 11, // 2: flyteidl.admin.Project.labels:type_name -> flyteidl.admin.Labels + 0, // 3: flyteidl.admin.Project.state:type_name -> flyteidl.admin.Project.ProjectState + 4, // 4: flyteidl.admin.Projects.projects:type_name -> flyteidl.admin.Project + 12, // 5: flyteidl.admin.ProjectListRequest.sort_by:type_name -> flyteidl.admin.Sort + 4, // 6: flyteidl.admin.ProjectRegisterRequest.project:type_name -> flyteidl.admin.Project + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_flyteidl_admin_project_proto_init() } @@ -691,7 +787,7 @@ func file_flyteidl_admin_project_proto_init() { file_flyteidl_admin_common_proto_init() if !protoimpl.UnsafeEnabled { file_flyteidl_admin_project_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Domain); i { + switch v := v.(*GetDomainRequest); i { case 0: return &v.state case 1: @@ -703,7 +799,7 @@ func file_flyteidl_admin_project_proto_init() { } } file_flyteidl_admin_project_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Project); i { + switch v := v.(*Domain); i { case 0: return &v.state case 1: @@ -715,7 +811,7 @@ func file_flyteidl_admin_project_proto_init() { } } file_flyteidl_admin_project_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Projects); i { + switch v := v.(*GetDomainsResponse); i { case 0: return &v.state case 1: @@ -727,7 +823,7 @@ func file_flyteidl_admin_project_proto_init() { } } file_flyteidl_admin_project_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectListRequest); i { + switch v := v.(*Project); i { case 0: return &v.state case 1: @@ -739,7 +835,7 @@ func file_flyteidl_admin_project_proto_init() { } } file_flyteidl_admin_project_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectRegisterRequest); i { + switch v := v.(*Projects); i { case 0: return &v.state case 1: @@ -751,7 +847,7 @@ func file_flyteidl_admin_project_proto_init() { } } file_flyteidl_admin_project_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectRegisterResponse); i { + switch v := v.(*ProjectListRequest); i { case 0: return &v.state case 1: @@ -763,7 +859,7 @@ func file_flyteidl_admin_project_proto_init() { } } file_flyteidl_admin_project_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectUpdateResponse); i { + switch v := v.(*ProjectRegisterRequest); i { case 0: return &v.state case 1: @@ -775,6 +871,30 @@ func file_flyteidl_admin_project_proto_init() { } } file_flyteidl_admin_project_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProjectRegisterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_project_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProjectUpdateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_project_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProjectGetRequest); i { case 0: return &v.state @@ -793,7 +913,7 @@ func file_flyteidl_admin_project_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_admin_project_proto_rawDesc, NumEnums: 1, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go b/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go index c3bb242357..2cd791204b 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go @@ -65,8 +65,8 @@ var file_flyteidl_service_admin_proto_rawDesc = []byte{ 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x93, - 0x73, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x80, + 0x74, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xc5, 0x02, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, @@ -582,425 +582,431 @@ var file_flyteidl_service_admin_proto_rawDesc = []byte{ 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x37, 0x92, 0x41, 0x1c, 0x1a, 0x1a, 0x46, 0x65, 0x74, 0x63, 0x68, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0xdd, - 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x92, 0x41, 0x41, 0x1a, 0x3f, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x70, 0x68, 0x61, 0x73, 0x65, 0x20, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0xc9, - 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x3d, 0x1a, 0x3b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x70, 0x68, 0x61, 0x73, 0x65, 0x20, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0xc9, 0x01, 0x0a, 0x0f, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x6b, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x3d, 0x1a, 0x3b, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x70, 0x68, 0x61, 0x73, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, - 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0xa9, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x66, 0x6c, + 0x47, 0x65, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0xdd, 0x01, 0x0a, 0x13, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x67, 0x92, 0x41, 0x41, 0x1a, 0x3f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, + 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x70, 0x68, 0x61, 0x73, 0x65, 0x20, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, + 0x2a, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0xc9, 0x01, 0x0a, 0x0f, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x3d, 0x1a, 0x3b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x70, 0x68, 0x61, 0x73, 0x65, 0x20, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, + 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0xc9, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xcc, 0x02, 0x92, 0x41, 0x26, 0x1a, 0x24, 0x52, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x76, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, - 0x74, 0x61, 0x73, 0x6b, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x9c, 0x02, 0x12, 0x99, 0x02, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, - 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, - 0x7b, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x7d, 0x12, 0xd3, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xef, 0x01, 0x92, 0x41, 0x38, 0x1a, 0x36, 0x46, 0x65, - 0x74, 0x63, 0x68, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x61, 0x73, - 0x6b, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xad, 0x01, 0x12, 0xaa, 0x01, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xe0, 0x03, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x2b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, + 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x3d, 0x1a, 0x3b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, + 0x61, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x61, 0x20, 0x70, 0x68, 0x61, 0x73, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x12, 0xa9, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xec, 0x02, 0x92, - 0x41, 0x41, 0x1a, 0x3f, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x64, 0x61, - 0x74, 0x61, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xa1, 0x02, 0x12, 0x9e, 0x02, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, + 0x22, 0xcc, 0x02, 0x92, 0x41, 0x26, 0x1a, 0x24, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, + 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x61, 0x73, + 0x6b, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x9c, 0x02, 0x12, 0x99, 0x02, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, + 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, - 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, + 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x69, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, + 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x69, 0x64, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, + 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x7d, 0x12, + 0xd3, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0xef, 0x01, 0x92, 0x41, 0x38, 0x1a, 0x36, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x20, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, + 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xad, 0x01, 0x12, 0xaa, 0x01, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, - 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x74, - 0x72, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x7d, 0x12, 0xbf, 0x02, 0x0a, 0x1d, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x34, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb0, 0x01, 0x92, 0x41, 0x58, - 0x1a, 0x56, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6d, - 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x3a, 0x01, - 0x2a, 0x1a, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0x9f, 0x02, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x66, + 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xe0, 0x03, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xec, 0x02, 0x92, 0x41, 0x41, 0x1a, + 0x3f, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x61, 0x73, 0x6b, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xa1, 0x02, 0x12, 0x9e, 0x02, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, + 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, + 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, + 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x7d, 0x12, 0xbf, 0x02, 0x0a, 0x1d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x34, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x35, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb0, 0x01, 0x92, 0x41, 0x58, 0x1a, 0x56, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x2d, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x3a, 0x01, 0x2a, 0x1a, 0x4a, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0x9f, 0x02, 0x0a, 0x1a, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x99, 0x01, 0x92, 0x41, 0x5a, 0x1a, 0x58, 0x52, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, - 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, - 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x2d, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, - 0xa9, 0x02, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x12, 0x34, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, - 0x01, 0x92, 0x41, 0x58, 0x1a, 0x56, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, - 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, - 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x39, 0x3a, 0x01, 0x2a, 0x2a, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0xff, 0x01, 0x0a, 0x17, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x92, 0x41, 0x45, 0x1a, 0x43, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x1a, 0x2f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, 0xe9, 0x01, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x76, 0x92, 0x41, 0x47, 0x1a, 0x45, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x99, 0x01, 0x92, 0x41, 0x5a, 0x1a, 0x58, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, - 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, - 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, 0xf3, 0x01, 0x0a, 0x17, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x77, 0x92, 0x41, 0x45, 0x1a, 0x43, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, + 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0xa9, 0x02, 0x0a, + 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x34, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x01, 0x92, 0x41, + 0x58, 0x1a, 0x56, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x6f, + 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x3a, + 0x01, 0x2a, 0x2a, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0xff, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x92, 0x41, 0x45, 0x1a, 0x43, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x2a, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x1a, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, - 0xce, 0x02, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xce, 0x01, 0x92, 0x41, 0x66, 0x1a, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, 0xe9, 0x01, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x76, + 0x92, 0x41, 0x47, 0x1a, 0x45, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, - 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x64, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x20, - 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x5f, 0x3a, 0x01, 0x2a, 0x1a, 0x5a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x7d, - 0x12, 0xa3, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x66, 0x6c, 0x79, + 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, + 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, 0xf3, 0x01, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x77, 0x92, 0x41, 0x45, 0x1a, 0x43, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, + 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x2a, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, 0xce, 0x02, 0x0a, + 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x92, 0x41, 0x68, 0x1a, 0x66, 0x52, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, - 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x64, - 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x7d, 0x12, 0xad, 0x02, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x01, 0x92, 0x41, 0x66, 0x1a, 0x64, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, + 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xce, 0x01, 0x92, + 0x41, 0x66, 0x1a, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6d, + 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5f, 0x3a, 0x01, + 0x2a, 0x1a, 0x5a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x7d, 0x12, 0xa3, 0x02, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x92, 0x41, 0x68, 0x1a, 0x66, 0x52, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x3a, 0x01, 0x2a, 0x2a, 0x39, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x7d, 0x12, 0xe1, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x61, 0x62, 0x6c, - 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x61, 0x62, 0x6c, - 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x65, 0x92, 0x41, 0x3e, 0x1a, 0x3c, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x76, 0x65, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x80, 0x02, 0x0a, 0x11, 0x4c, - 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa1, 0x01, 0x92, 0x41, 0x5d, 0x1a, - 0x5b, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, - 0x20, 0x6f, 0x66, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, - 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, - 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, - 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0xca, 0x01, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x12, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x22, 0x74, 0x92, 0x41, 0x20, 0x1a, 0x1e, 0x52, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x76, 0x65, 0x20, 0x61, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x12, - 0x49, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, + 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x7d, 0x12, 0xad, 0x02, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xad, 0x01, 0x92, 0x41, 0x66, 0x1a, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x3a, 0x01, 0x2a, 0x2a, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x7d, 0x12, 0xe1, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, + 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x65, 0x92, 0x41, 0x3e, 0x1a, 0x3c, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, + 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x61, + 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x80, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x26, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa1, 0x01, 0x92, 0x41, 0x5d, 0x1a, 0x5b, 0x52, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x20, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, + 0x79, 0x70, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, + 0x39, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, - 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xf3, 0x01, 0x0a, 0x11, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x12, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, - 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x92, 0x41, 0x31, 0x1a, 0x2f, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, - 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x4e, 0x3a, 0x01, 0x2a, 0x1a, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6e, - 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x12, 0xbf, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x92, 0x41, 0x50, 0x1a, 0x4e, 0x52, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x20, 0x28, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x20, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0xfe, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x22, 0xa0, 0x01, 0x92, 0x41, 0x36, 0x1a, 0x34, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, - 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x61, 0x12, 0x5f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, - 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, - 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x7d, 0x12, 0xdc, 0x02, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x2c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x4c, 0x69, 0x73, 0x74, 0x22, 0xeb, 0x01, 0x92, 0x41, 0x47, 0x1a, 0x45, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, - 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x9a, 0x01, 0x5a, 0x47, 0x12, 0x45, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x7d, 0x12, 0x4f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, - 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, - 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, - 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x12, 0xff, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x92, 0x41, 0x37, 0x1a, 0x35, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x76, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, - 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, - 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0a, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, - 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, - 0xaa, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0xca, 0x01, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x25, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x22, 0x74, 0x92, 0x41, 0x20, 0x1a, 0x1e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, + 0x20, 0x61, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, + 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xf3, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x28, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x88, 0x01, 0x92, 0x41, 0x31, 0x1a, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x4e, 0x61, + 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x3a, + 0x01, 0x2a, 0x1a, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, + 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xbf, 0x01, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x92, 0x41, 0x50, 0x1a, 0x4e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x28, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x20, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x29, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0xfe, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0xa0, 0x01, + 0x92, 0x41, 0x36, 0x1a, 0x34, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x61, 0x6e, + 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x61, 0x12, + 0x5f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, + 0x64, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, + 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, + 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, + 0x12, 0xdc, 0x02, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0xeb, 0x01, 0x92, 0x41, 0x47, 0x1a, 0x45, 0x46, 0x65, 0x74, 0x63, 0x68, 0x20, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x9a, 0x01, 0x5a, 0x47, 0x12, 0x45, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0x4f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, + 0xff, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, + 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x7f, 0x92, 0x41, 0x37, 0x1a, 0x35, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6e, 0x20, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0a, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, 0x10, + 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_flyteidl_service_admin_proto_goTypes = []interface{}{ @@ -1029,75 +1035,77 @@ var file_flyteidl_service_admin_proto_goTypes = []interface{}{ (*admin.Project)(nil), // 22: flyteidl.admin.Project (*admin.ProjectGetRequest)(nil), // 23: flyteidl.admin.ProjectGetRequest (*admin.ProjectListRequest)(nil), // 24: flyteidl.admin.ProjectListRequest - (*admin.WorkflowExecutionEventRequest)(nil), // 25: flyteidl.admin.WorkflowExecutionEventRequest - (*admin.NodeExecutionEventRequest)(nil), // 26: flyteidl.admin.NodeExecutionEventRequest - (*admin.TaskExecutionEventRequest)(nil), // 27: flyteidl.admin.TaskExecutionEventRequest - (*admin.TaskExecutionGetRequest)(nil), // 28: flyteidl.admin.TaskExecutionGetRequest - (*admin.TaskExecutionListRequest)(nil), // 29: flyteidl.admin.TaskExecutionListRequest - (*admin.TaskExecutionGetDataRequest)(nil), // 30: flyteidl.admin.TaskExecutionGetDataRequest - (*admin.ProjectDomainAttributesUpdateRequest)(nil), // 31: flyteidl.admin.ProjectDomainAttributesUpdateRequest - (*admin.ProjectDomainAttributesGetRequest)(nil), // 32: flyteidl.admin.ProjectDomainAttributesGetRequest - (*admin.ProjectDomainAttributesDeleteRequest)(nil), // 33: flyteidl.admin.ProjectDomainAttributesDeleteRequest - (*admin.ProjectAttributesUpdateRequest)(nil), // 34: flyteidl.admin.ProjectAttributesUpdateRequest - (*admin.ProjectAttributesGetRequest)(nil), // 35: flyteidl.admin.ProjectAttributesGetRequest - (*admin.ProjectAttributesDeleteRequest)(nil), // 36: flyteidl.admin.ProjectAttributesDeleteRequest - (*admin.WorkflowAttributesUpdateRequest)(nil), // 37: flyteidl.admin.WorkflowAttributesUpdateRequest - (*admin.WorkflowAttributesGetRequest)(nil), // 38: flyteidl.admin.WorkflowAttributesGetRequest - (*admin.WorkflowAttributesDeleteRequest)(nil), // 39: flyteidl.admin.WorkflowAttributesDeleteRequest - (*admin.ListMatchableAttributesRequest)(nil), // 40: flyteidl.admin.ListMatchableAttributesRequest - (*admin.NamedEntityListRequest)(nil), // 41: flyteidl.admin.NamedEntityListRequest - (*admin.NamedEntityGetRequest)(nil), // 42: flyteidl.admin.NamedEntityGetRequest - (*admin.NamedEntityUpdateRequest)(nil), // 43: flyteidl.admin.NamedEntityUpdateRequest - (*admin.GetVersionRequest)(nil), // 44: flyteidl.admin.GetVersionRequest - (*admin.DescriptionEntityListRequest)(nil), // 45: flyteidl.admin.DescriptionEntityListRequest - (*admin.WorkflowExecutionGetMetricsRequest)(nil), // 46: flyteidl.admin.WorkflowExecutionGetMetricsRequest - (*admin.TaskCreateResponse)(nil), // 47: flyteidl.admin.TaskCreateResponse - (*admin.Task)(nil), // 48: flyteidl.admin.Task - (*admin.NamedEntityIdentifierList)(nil), // 49: flyteidl.admin.NamedEntityIdentifierList - (*admin.TaskList)(nil), // 50: flyteidl.admin.TaskList - (*admin.WorkflowCreateResponse)(nil), // 51: flyteidl.admin.WorkflowCreateResponse - (*admin.Workflow)(nil), // 52: flyteidl.admin.Workflow - (*admin.WorkflowList)(nil), // 53: flyteidl.admin.WorkflowList - (*admin.LaunchPlanCreateResponse)(nil), // 54: flyteidl.admin.LaunchPlanCreateResponse - (*admin.LaunchPlan)(nil), // 55: flyteidl.admin.LaunchPlan - (*admin.LaunchPlanList)(nil), // 56: flyteidl.admin.LaunchPlanList - (*admin.LaunchPlanUpdateResponse)(nil), // 57: flyteidl.admin.LaunchPlanUpdateResponse - (*admin.ExecutionCreateResponse)(nil), // 58: flyteidl.admin.ExecutionCreateResponse - (*admin.Execution)(nil), // 59: flyteidl.admin.Execution - (*admin.ExecutionUpdateResponse)(nil), // 60: flyteidl.admin.ExecutionUpdateResponse - (*admin.WorkflowExecutionGetDataResponse)(nil), // 61: flyteidl.admin.WorkflowExecutionGetDataResponse - (*admin.ExecutionList)(nil), // 62: flyteidl.admin.ExecutionList - (*admin.ExecutionTerminateResponse)(nil), // 63: flyteidl.admin.ExecutionTerminateResponse - (*admin.NodeExecution)(nil), // 64: flyteidl.admin.NodeExecution - (*admin.DynamicNodeWorkflowResponse)(nil), // 65: flyteidl.admin.DynamicNodeWorkflowResponse - (*admin.NodeExecutionList)(nil), // 66: flyteidl.admin.NodeExecutionList - (*admin.NodeExecutionGetDataResponse)(nil), // 67: flyteidl.admin.NodeExecutionGetDataResponse - (*admin.ProjectRegisterResponse)(nil), // 68: flyteidl.admin.ProjectRegisterResponse - (*admin.ProjectUpdateResponse)(nil), // 69: flyteidl.admin.ProjectUpdateResponse - (*admin.Projects)(nil), // 70: flyteidl.admin.Projects - (*admin.WorkflowExecutionEventResponse)(nil), // 71: flyteidl.admin.WorkflowExecutionEventResponse - (*admin.NodeExecutionEventResponse)(nil), // 72: flyteidl.admin.NodeExecutionEventResponse - (*admin.TaskExecutionEventResponse)(nil), // 73: flyteidl.admin.TaskExecutionEventResponse - (*admin.TaskExecution)(nil), // 74: flyteidl.admin.TaskExecution - (*admin.TaskExecutionList)(nil), // 75: flyteidl.admin.TaskExecutionList - (*admin.TaskExecutionGetDataResponse)(nil), // 76: flyteidl.admin.TaskExecutionGetDataResponse - (*admin.ProjectDomainAttributesUpdateResponse)(nil), // 77: flyteidl.admin.ProjectDomainAttributesUpdateResponse - (*admin.ProjectDomainAttributesGetResponse)(nil), // 78: flyteidl.admin.ProjectDomainAttributesGetResponse - (*admin.ProjectDomainAttributesDeleteResponse)(nil), // 79: flyteidl.admin.ProjectDomainAttributesDeleteResponse - (*admin.ProjectAttributesUpdateResponse)(nil), // 80: flyteidl.admin.ProjectAttributesUpdateResponse - (*admin.ProjectAttributesGetResponse)(nil), // 81: flyteidl.admin.ProjectAttributesGetResponse - (*admin.ProjectAttributesDeleteResponse)(nil), // 82: flyteidl.admin.ProjectAttributesDeleteResponse - (*admin.WorkflowAttributesUpdateResponse)(nil), // 83: flyteidl.admin.WorkflowAttributesUpdateResponse - (*admin.WorkflowAttributesGetResponse)(nil), // 84: flyteidl.admin.WorkflowAttributesGetResponse - (*admin.WorkflowAttributesDeleteResponse)(nil), // 85: flyteidl.admin.WorkflowAttributesDeleteResponse - (*admin.ListMatchableAttributesResponse)(nil), // 86: flyteidl.admin.ListMatchableAttributesResponse - (*admin.NamedEntityList)(nil), // 87: flyteidl.admin.NamedEntityList - (*admin.NamedEntity)(nil), // 88: flyteidl.admin.NamedEntity - (*admin.NamedEntityUpdateResponse)(nil), // 89: flyteidl.admin.NamedEntityUpdateResponse - (*admin.GetVersionResponse)(nil), // 90: flyteidl.admin.GetVersionResponse - (*admin.DescriptionEntity)(nil), // 91: flyteidl.admin.DescriptionEntity - (*admin.DescriptionEntityList)(nil), // 92: flyteidl.admin.DescriptionEntityList - (*admin.WorkflowExecutionGetMetricsResponse)(nil), // 93: flyteidl.admin.WorkflowExecutionGetMetricsResponse + (*admin.GetDomainRequest)(nil), // 25: flyteidl.admin.GetDomainRequest + (*admin.WorkflowExecutionEventRequest)(nil), // 26: flyteidl.admin.WorkflowExecutionEventRequest + (*admin.NodeExecutionEventRequest)(nil), // 27: flyteidl.admin.NodeExecutionEventRequest + (*admin.TaskExecutionEventRequest)(nil), // 28: flyteidl.admin.TaskExecutionEventRequest + (*admin.TaskExecutionGetRequest)(nil), // 29: flyteidl.admin.TaskExecutionGetRequest + (*admin.TaskExecutionListRequest)(nil), // 30: flyteidl.admin.TaskExecutionListRequest + (*admin.TaskExecutionGetDataRequest)(nil), // 31: flyteidl.admin.TaskExecutionGetDataRequest + (*admin.ProjectDomainAttributesUpdateRequest)(nil), // 32: flyteidl.admin.ProjectDomainAttributesUpdateRequest + (*admin.ProjectDomainAttributesGetRequest)(nil), // 33: flyteidl.admin.ProjectDomainAttributesGetRequest + (*admin.ProjectDomainAttributesDeleteRequest)(nil), // 34: flyteidl.admin.ProjectDomainAttributesDeleteRequest + (*admin.ProjectAttributesUpdateRequest)(nil), // 35: flyteidl.admin.ProjectAttributesUpdateRequest + (*admin.ProjectAttributesGetRequest)(nil), // 36: flyteidl.admin.ProjectAttributesGetRequest + (*admin.ProjectAttributesDeleteRequest)(nil), // 37: flyteidl.admin.ProjectAttributesDeleteRequest + (*admin.WorkflowAttributesUpdateRequest)(nil), // 38: flyteidl.admin.WorkflowAttributesUpdateRequest + (*admin.WorkflowAttributesGetRequest)(nil), // 39: flyteidl.admin.WorkflowAttributesGetRequest + (*admin.WorkflowAttributesDeleteRequest)(nil), // 40: flyteidl.admin.WorkflowAttributesDeleteRequest + (*admin.ListMatchableAttributesRequest)(nil), // 41: flyteidl.admin.ListMatchableAttributesRequest + (*admin.NamedEntityListRequest)(nil), // 42: flyteidl.admin.NamedEntityListRequest + (*admin.NamedEntityGetRequest)(nil), // 43: flyteidl.admin.NamedEntityGetRequest + (*admin.NamedEntityUpdateRequest)(nil), // 44: flyteidl.admin.NamedEntityUpdateRequest + (*admin.GetVersionRequest)(nil), // 45: flyteidl.admin.GetVersionRequest + (*admin.DescriptionEntityListRequest)(nil), // 46: flyteidl.admin.DescriptionEntityListRequest + (*admin.WorkflowExecutionGetMetricsRequest)(nil), // 47: flyteidl.admin.WorkflowExecutionGetMetricsRequest + (*admin.TaskCreateResponse)(nil), // 48: flyteidl.admin.TaskCreateResponse + (*admin.Task)(nil), // 49: flyteidl.admin.Task + (*admin.NamedEntityIdentifierList)(nil), // 50: flyteidl.admin.NamedEntityIdentifierList + (*admin.TaskList)(nil), // 51: flyteidl.admin.TaskList + (*admin.WorkflowCreateResponse)(nil), // 52: flyteidl.admin.WorkflowCreateResponse + (*admin.Workflow)(nil), // 53: flyteidl.admin.Workflow + (*admin.WorkflowList)(nil), // 54: flyteidl.admin.WorkflowList + (*admin.LaunchPlanCreateResponse)(nil), // 55: flyteidl.admin.LaunchPlanCreateResponse + (*admin.LaunchPlan)(nil), // 56: flyteidl.admin.LaunchPlan + (*admin.LaunchPlanList)(nil), // 57: flyteidl.admin.LaunchPlanList + (*admin.LaunchPlanUpdateResponse)(nil), // 58: flyteidl.admin.LaunchPlanUpdateResponse + (*admin.ExecutionCreateResponse)(nil), // 59: flyteidl.admin.ExecutionCreateResponse + (*admin.Execution)(nil), // 60: flyteidl.admin.Execution + (*admin.ExecutionUpdateResponse)(nil), // 61: flyteidl.admin.ExecutionUpdateResponse + (*admin.WorkflowExecutionGetDataResponse)(nil), // 62: flyteidl.admin.WorkflowExecutionGetDataResponse + (*admin.ExecutionList)(nil), // 63: flyteidl.admin.ExecutionList + (*admin.ExecutionTerminateResponse)(nil), // 64: flyteidl.admin.ExecutionTerminateResponse + (*admin.NodeExecution)(nil), // 65: flyteidl.admin.NodeExecution + (*admin.DynamicNodeWorkflowResponse)(nil), // 66: flyteidl.admin.DynamicNodeWorkflowResponse + (*admin.NodeExecutionList)(nil), // 67: flyteidl.admin.NodeExecutionList + (*admin.NodeExecutionGetDataResponse)(nil), // 68: flyteidl.admin.NodeExecutionGetDataResponse + (*admin.ProjectRegisterResponse)(nil), // 69: flyteidl.admin.ProjectRegisterResponse + (*admin.ProjectUpdateResponse)(nil), // 70: flyteidl.admin.ProjectUpdateResponse + (*admin.Projects)(nil), // 71: flyteidl.admin.Projects + (*admin.GetDomainsResponse)(nil), // 72: flyteidl.admin.GetDomainsResponse + (*admin.WorkflowExecutionEventResponse)(nil), // 73: flyteidl.admin.WorkflowExecutionEventResponse + (*admin.NodeExecutionEventResponse)(nil), // 74: flyteidl.admin.NodeExecutionEventResponse + (*admin.TaskExecutionEventResponse)(nil), // 75: flyteidl.admin.TaskExecutionEventResponse + (*admin.TaskExecution)(nil), // 76: flyteidl.admin.TaskExecution + (*admin.TaskExecutionList)(nil), // 77: flyteidl.admin.TaskExecutionList + (*admin.TaskExecutionGetDataResponse)(nil), // 78: flyteidl.admin.TaskExecutionGetDataResponse + (*admin.ProjectDomainAttributesUpdateResponse)(nil), // 79: flyteidl.admin.ProjectDomainAttributesUpdateResponse + (*admin.ProjectDomainAttributesGetResponse)(nil), // 80: flyteidl.admin.ProjectDomainAttributesGetResponse + (*admin.ProjectDomainAttributesDeleteResponse)(nil), // 81: flyteidl.admin.ProjectDomainAttributesDeleteResponse + (*admin.ProjectAttributesUpdateResponse)(nil), // 82: flyteidl.admin.ProjectAttributesUpdateResponse + (*admin.ProjectAttributesGetResponse)(nil), // 83: flyteidl.admin.ProjectAttributesGetResponse + (*admin.ProjectAttributesDeleteResponse)(nil), // 84: flyteidl.admin.ProjectAttributesDeleteResponse + (*admin.WorkflowAttributesUpdateResponse)(nil), // 85: flyteidl.admin.WorkflowAttributesUpdateResponse + (*admin.WorkflowAttributesGetResponse)(nil), // 86: flyteidl.admin.WorkflowAttributesGetResponse + (*admin.WorkflowAttributesDeleteResponse)(nil), // 87: flyteidl.admin.WorkflowAttributesDeleteResponse + (*admin.ListMatchableAttributesResponse)(nil), // 88: flyteidl.admin.ListMatchableAttributesResponse + (*admin.NamedEntityList)(nil), // 89: flyteidl.admin.NamedEntityList + (*admin.NamedEntity)(nil), // 90: flyteidl.admin.NamedEntity + (*admin.NamedEntityUpdateResponse)(nil), // 91: flyteidl.admin.NamedEntityUpdateResponse + (*admin.GetVersionResponse)(nil), // 92: flyteidl.admin.GetVersionResponse + (*admin.DescriptionEntity)(nil), // 93: flyteidl.admin.DescriptionEntity + (*admin.DescriptionEntityList)(nil), // 94: flyteidl.admin.DescriptionEntityList + (*admin.WorkflowExecutionGetMetricsResponse)(nil), // 95: flyteidl.admin.WorkflowExecutionGetMetricsResponse } var file_flyteidl_service_admin_proto_depIdxs = []int32{ 0, // 0: flyteidl.service.AdminService.CreateTask:input_type -> flyteidl.admin.TaskCreateRequest @@ -1132,86 +1140,88 @@ var file_flyteidl_service_admin_proto_depIdxs = []int32{ 22, // 29: flyteidl.service.AdminService.UpdateProject:input_type -> flyteidl.admin.Project 23, // 30: flyteidl.service.AdminService.GetProject:input_type -> flyteidl.admin.ProjectGetRequest 24, // 31: flyteidl.service.AdminService.ListProjects:input_type -> flyteidl.admin.ProjectListRequest - 25, // 32: flyteidl.service.AdminService.CreateWorkflowEvent:input_type -> flyteidl.admin.WorkflowExecutionEventRequest - 26, // 33: flyteidl.service.AdminService.CreateNodeEvent:input_type -> flyteidl.admin.NodeExecutionEventRequest - 27, // 34: flyteidl.service.AdminService.CreateTaskEvent:input_type -> flyteidl.admin.TaskExecutionEventRequest - 28, // 35: flyteidl.service.AdminService.GetTaskExecution:input_type -> flyteidl.admin.TaskExecutionGetRequest - 29, // 36: flyteidl.service.AdminService.ListTaskExecutions:input_type -> flyteidl.admin.TaskExecutionListRequest - 30, // 37: flyteidl.service.AdminService.GetTaskExecutionData:input_type -> flyteidl.admin.TaskExecutionGetDataRequest - 31, // 38: flyteidl.service.AdminService.UpdateProjectDomainAttributes:input_type -> flyteidl.admin.ProjectDomainAttributesUpdateRequest - 32, // 39: flyteidl.service.AdminService.GetProjectDomainAttributes:input_type -> flyteidl.admin.ProjectDomainAttributesGetRequest - 33, // 40: flyteidl.service.AdminService.DeleteProjectDomainAttributes:input_type -> flyteidl.admin.ProjectDomainAttributesDeleteRequest - 34, // 41: flyteidl.service.AdminService.UpdateProjectAttributes:input_type -> flyteidl.admin.ProjectAttributesUpdateRequest - 35, // 42: flyteidl.service.AdminService.GetProjectAttributes:input_type -> flyteidl.admin.ProjectAttributesGetRequest - 36, // 43: flyteidl.service.AdminService.DeleteProjectAttributes:input_type -> flyteidl.admin.ProjectAttributesDeleteRequest - 37, // 44: flyteidl.service.AdminService.UpdateWorkflowAttributes:input_type -> flyteidl.admin.WorkflowAttributesUpdateRequest - 38, // 45: flyteidl.service.AdminService.GetWorkflowAttributes:input_type -> flyteidl.admin.WorkflowAttributesGetRequest - 39, // 46: flyteidl.service.AdminService.DeleteWorkflowAttributes:input_type -> flyteidl.admin.WorkflowAttributesDeleteRequest - 40, // 47: flyteidl.service.AdminService.ListMatchableAttributes:input_type -> flyteidl.admin.ListMatchableAttributesRequest - 41, // 48: flyteidl.service.AdminService.ListNamedEntities:input_type -> flyteidl.admin.NamedEntityListRequest - 42, // 49: flyteidl.service.AdminService.GetNamedEntity:input_type -> flyteidl.admin.NamedEntityGetRequest - 43, // 50: flyteidl.service.AdminService.UpdateNamedEntity:input_type -> flyteidl.admin.NamedEntityUpdateRequest - 44, // 51: flyteidl.service.AdminService.GetVersion:input_type -> flyteidl.admin.GetVersionRequest - 1, // 52: flyteidl.service.AdminService.GetDescriptionEntity:input_type -> flyteidl.admin.ObjectGetRequest - 45, // 53: flyteidl.service.AdminService.ListDescriptionEntities:input_type -> flyteidl.admin.DescriptionEntityListRequest - 46, // 54: flyteidl.service.AdminService.GetExecutionMetrics:input_type -> flyteidl.admin.WorkflowExecutionGetMetricsRequest - 47, // 55: flyteidl.service.AdminService.CreateTask:output_type -> flyteidl.admin.TaskCreateResponse - 48, // 56: flyteidl.service.AdminService.GetTask:output_type -> flyteidl.admin.Task - 49, // 57: flyteidl.service.AdminService.ListTaskIds:output_type -> flyteidl.admin.NamedEntityIdentifierList - 50, // 58: flyteidl.service.AdminService.ListTasks:output_type -> flyteidl.admin.TaskList - 51, // 59: flyteidl.service.AdminService.CreateWorkflow:output_type -> flyteidl.admin.WorkflowCreateResponse - 52, // 60: flyteidl.service.AdminService.GetWorkflow:output_type -> flyteidl.admin.Workflow - 49, // 61: flyteidl.service.AdminService.ListWorkflowIds:output_type -> flyteidl.admin.NamedEntityIdentifierList - 53, // 62: flyteidl.service.AdminService.ListWorkflows:output_type -> flyteidl.admin.WorkflowList - 54, // 63: flyteidl.service.AdminService.CreateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanCreateResponse - 55, // 64: flyteidl.service.AdminService.GetLaunchPlan:output_type -> flyteidl.admin.LaunchPlan - 55, // 65: flyteidl.service.AdminService.GetActiveLaunchPlan:output_type -> flyteidl.admin.LaunchPlan - 56, // 66: flyteidl.service.AdminService.ListActiveLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList - 49, // 67: flyteidl.service.AdminService.ListLaunchPlanIds:output_type -> flyteidl.admin.NamedEntityIdentifierList - 56, // 68: flyteidl.service.AdminService.ListLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList - 57, // 69: flyteidl.service.AdminService.UpdateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanUpdateResponse - 58, // 70: flyteidl.service.AdminService.CreateExecution:output_type -> flyteidl.admin.ExecutionCreateResponse - 58, // 71: flyteidl.service.AdminService.RelaunchExecution:output_type -> flyteidl.admin.ExecutionCreateResponse - 58, // 72: flyteidl.service.AdminService.RecoverExecution:output_type -> flyteidl.admin.ExecutionCreateResponse - 59, // 73: flyteidl.service.AdminService.GetExecution:output_type -> flyteidl.admin.Execution - 60, // 74: flyteidl.service.AdminService.UpdateExecution:output_type -> flyteidl.admin.ExecutionUpdateResponse - 61, // 75: flyteidl.service.AdminService.GetExecutionData:output_type -> flyteidl.admin.WorkflowExecutionGetDataResponse - 62, // 76: flyteidl.service.AdminService.ListExecutions:output_type -> flyteidl.admin.ExecutionList - 63, // 77: flyteidl.service.AdminService.TerminateExecution:output_type -> flyteidl.admin.ExecutionTerminateResponse - 64, // 78: flyteidl.service.AdminService.GetNodeExecution:output_type -> flyteidl.admin.NodeExecution - 65, // 79: flyteidl.service.AdminService.GetDynamicNodeWorkflow:output_type -> flyteidl.admin.DynamicNodeWorkflowResponse - 66, // 80: flyteidl.service.AdminService.ListNodeExecutions:output_type -> flyteidl.admin.NodeExecutionList - 66, // 81: flyteidl.service.AdminService.ListNodeExecutionsForTask:output_type -> flyteidl.admin.NodeExecutionList - 67, // 82: flyteidl.service.AdminService.GetNodeExecutionData:output_type -> flyteidl.admin.NodeExecutionGetDataResponse - 68, // 83: flyteidl.service.AdminService.RegisterProject:output_type -> flyteidl.admin.ProjectRegisterResponse - 69, // 84: flyteidl.service.AdminService.UpdateProject:output_type -> flyteidl.admin.ProjectUpdateResponse - 22, // 85: flyteidl.service.AdminService.GetProject:output_type -> flyteidl.admin.Project - 70, // 86: flyteidl.service.AdminService.ListProjects:output_type -> flyteidl.admin.Projects - 71, // 87: flyteidl.service.AdminService.CreateWorkflowEvent:output_type -> flyteidl.admin.WorkflowExecutionEventResponse - 72, // 88: flyteidl.service.AdminService.CreateNodeEvent:output_type -> flyteidl.admin.NodeExecutionEventResponse - 73, // 89: flyteidl.service.AdminService.CreateTaskEvent:output_type -> flyteidl.admin.TaskExecutionEventResponse - 74, // 90: flyteidl.service.AdminService.GetTaskExecution:output_type -> flyteidl.admin.TaskExecution - 75, // 91: flyteidl.service.AdminService.ListTaskExecutions:output_type -> flyteidl.admin.TaskExecutionList - 76, // 92: flyteidl.service.AdminService.GetTaskExecutionData:output_type -> flyteidl.admin.TaskExecutionGetDataResponse - 77, // 93: flyteidl.service.AdminService.UpdateProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesUpdateResponse - 78, // 94: flyteidl.service.AdminService.GetProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesGetResponse - 79, // 95: flyteidl.service.AdminService.DeleteProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesDeleteResponse - 80, // 96: flyteidl.service.AdminService.UpdateProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesUpdateResponse - 81, // 97: flyteidl.service.AdminService.GetProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesGetResponse - 82, // 98: flyteidl.service.AdminService.DeleteProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesDeleteResponse - 83, // 99: flyteidl.service.AdminService.UpdateWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesUpdateResponse - 84, // 100: flyteidl.service.AdminService.GetWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesGetResponse - 85, // 101: flyteidl.service.AdminService.DeleteWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesDeleteResponse - 86, // 102: flyteidl.service.AdminService.ListMatchableAttributes:output_type -> flyteidl.admin.ListMatchableAttributesResponse - 87, // 103: flyteidl.service.AdminService.ListNamedEntities:output_type -> flyteidl.admin.NamedEntityList - 88, // 104: flyteidl.service.AdminService.GetNamedEntity:output_type -> flyteidl.admin.NamedEntity - 89, // 105: flyteidl.service.AdminService.UpdateNamedEntity:output_type -> flyteidl.admin.NamedEntityUpdateResponse - 90, // 106: flyteidl.service.AdminService.GetVersion:output_type -> flyteidl.admin.GetVersionResponse - 91, // 107: flyteidl.service.AdminService.GetDescriptionEntity:output_type -> flyteidl.admin.DescriptionEntity - 92, // 108: flyteidl.service.AdminService.ListDescriptionEntities:output_type -> flyteidl.admin.DescriptionEntityList - 93, // 109: flyteidl.service.AdminService.GetExecutionMetrics:output_type -> flyteidl.admin.WorkflowExecutionGetMetricsResponse - 55, // [55:110] is the sub-list for method output_type - 0, // [0:55] is the sub-list for method input_type + 25, // 32: flyteidl.service.AdminService.GetDomains:input_type -> flyteidl.admin.GetDomainRequest + 26, // 33: flyteidl.service.AdminService.CreateWorkflowEvent:input_type -> flyteidl.admin.WorkflowExecutionEventRequest + 27, // 34: flyteidl.service.AdminService.CreateNodeEvent:input_type -> flyteidl.admin.NodeExecutionEventRequest + 28, // 35: flyteidl.service.AdminService.CreateTaskEvent:input_type -> flyteidl.admin.TaskExecutionEventRequest + 29, // 36: flyteidl.service.AdminService.GetTaskExecution:input_type -> flyteidl.admin.TaskExecutionGetRequest + 30, // 37: flyteidl.service.AdminService.ListTaskExecutions:input_type -> flyteidl.admin.TaskExecutionListRequest + 31, // 38: flyteidl.service.AdminService.GetTaskExecutionData:input_type -> flyteidl.admin.TaskExecutionGetDataRequest + 32, // 39: flyteidl.service.AdminService.UpdateProjectDomainAttributes:input_type -> flyteidl.admin.ProjectDomainAttributesUpdateRequest + 33, // 40: flyteidl.service.AdminService.GetProjectDomainAttributes:input_type -> flyteidl.admin.ProjectDomainAttributesGetRequest + 34, // 41: flyteidl.service.AdminService.DeleteProjectDomainAttributes:input_type -> flyteidl.admin.ProjectDomainAttributesDeleteRequest + 35, // 42: flyteidl.service.AdminService.UpdateProjectAttributes:input_type -> flyteidl.admin.ProjectAttributesUpdateRequest + 36, // 43: flyteidl.service.AdminService.GetProjectAttributes:input_type -> flyteidl.admin.ProjectAttributesGetRequest + 37, // 44: flyteidl.service.AdminService.DeleteProjectAttributes:input_type -> flyteidl.admin.ProjectAttributesDeleteRequest + 38, // 45: flyteidl.service.AdminService.UpdateWorkflowAttributes:input_type -> flyteidl.admin.WorkflowAttributesUpdateRequest + 39, // 46: flyteidl.service.AdminService.GetWorkflowAttributes:input_type -> flyteidl.admin.WorkflowAttributesGetRequest + 40, // 47: flyteidl.service.AdminService.DeleteWorkflowAttributes:input_type -> flyteidl.admin.WorkflowAttributesDeleteRequest + 41, // 48: flyteidl.service.AdminService.ListMatchableAttributes:input_type -> flyteidl.admin.ListMatchableAttributesRequest + 42, // 49: flyteidl.service.AdminService.ListNamedEntities:input_type -> flyteidl.admin.NamedEntityListRequest + 43, // 50: flyteidl.service.AdminService.GetNamedEntity:input_type -> flyteidl.admin.NamedEntityGetRequest + 44, // 51: flyteidl.service.AdminService.UpdateNamedEntity:input_type -> flyteidl.admin.NamedEntityUpdateRequest + 45, // 52: flyteidl.service.AdminService.GetVersion:input_type -> flyteidl.admin.GetVersionRequest + 1, // 53: flyteidl.service.AdminService.GetDescriptionEntity:input_type -> flyteidl.admin.ObjectGetRequest + 46, // 54: flyteidl.service.AdminService.ListDescriptionEntities:input_type -> flyteidl.admin.DescriptionEntityListRequest + 47, // 55: flyteidl.service.AdminService.GetExecutionMetrics:input_type -> flyteidl.admin.WorkflowExecutionGetMetricsRequest + 48, // 56: flyteidl.service.AdminService.CreateTask:output_type -> flyteidl.admin.TaskCreateResponse + 49, // 57: flyteidl.service.AdminService.GetTask:output_type -> flyteidl.admin.Task + 50, // 58: flyteidl.service.AdminService.ListTaskIds:output_type -> flyteidl.admin.NamedEntityIdentifierList + 51, // 59: flyteidl.service.AdminService.ListTasks:output_type -> flyteidl.admin.TaskList + 52, // 60: flyteidl.service.AdminService.CreateWorkflow:output_type -> flyteidl.admin.WorkflowCreateResponse + 53, // 61: flyteidl.service.AdminService.GetWorkflow:output_type -> flyteidl.admin.Workflow + 50, // 62: flyteidl.service.AdminService.ListWorkflowIds:output_type -> flyteidl.admin.NamedEntityIdentifierList + 54, // 63: flyteidl.service.AdminService.ListWorkflows:output_type -> flyteidl.admin.WorkflowList + 55, // 64: flyteidl.service.AdminService.CreateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanCreateResponse + 56, // 65: flyteidl.service.AdminService.GetLaunchPlan:output_type -> flyteidl.admin.LaunchPlan + 56, // 66: flyteidl.service.AdminService.GetActiveLaunchPlan:output_type -> flyteidl.admin.LaunchPlan + 57, // 67: flyteidl.service.AdminService.ListActiveLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList + 50, // 68: flyteidl.service.AdminService.ListLaunchPlanIds:output_type -> flyteidl.admin.NamedEntityIdentifierList + 57, // 69: flyteidl.service.AdminService.ListLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList + 58, // 70: flyteidl.service.AdminService.UpdateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanUpdateResponse + 59, // 71: flyteidl.service.AdminService.CreateExecution:output_type -> flyteidl.admin.ExecutionCreateResponse + 59, // 72: flyteidl.service.AdminService.RelaunchExecution:output_type -> flyteidl.admin.ExecutionCreateResponse + 59, // 73: flyteidl.service.AdminService.RecoverExecution:output_type -> flyteidl.admin.ExecutionCreateResponse + 60, // 74: flyteidl.service.AdminService.GetExecution:output_type -> flyteidl.admin.Execution + 61, // 75: flyteidl.service.AdminService.UpdateExecution:output_type -> flyteidl.admin.ExecutionUpdateResponse + 62, // 76: flyteidl.service.AdminService.GetExecutionData:output_type -> flyteidl.admin.WorkflowExecutionGetDataResponse + 63, // 77: flyteidl.service.AdminService.ListExecutions:output_type -> flyteidl.admin.ExecutionList + 64, // 78: flyteidl.service.AdminService.TerminateExecution:output_type -> flyteidl.admin.ExecutionTerminateResponse + 65, // 79: flyteidl.service.AdminService.GetNodeExecution:output_type -> flyteidl.admin.NodeExecution + 66, // 80: flyteidl.service.AdminService.GetDynamicNodeWorkflow:output_type -> flyteidl.admin.DynamicNodeWorkflowResponse + 67, // 81: flyteidl.service.AdminService.ListNodeExecutions:output_type -> flyteidl.admin.NodeExecutionList + 67, // 82: flyteidl.service.AdminService.ListNodeExecutionsForTask:output_type -> flyteidl.admin.NodeExecutionList + 68, // 83: flyteidl.service.AdminService.GetNodeExecutionData:output_type -> flyteidl.admin.NodeExecutionGetDataResponse + 69, // 84: flyteidl.service.AdminService.RegisterProject:output_type -> flyteidl.admin.ProjectRegisterResponse + 70, // 85: flyteidl.service.AdminService.UpdateProject:output_type -> flyteidl.admin.ProjectUpdateResponse + 22, // 86: flyteidl.service.AdminService.GetProject:output_type -> flyteidl.admin.Project + 71, // 87: flyteidl.service.AdminService.ListProjects:output_type -> flyteidl.admin.Projects + 72, // 88: flyteidl.service.AdminService.GetDomains:output_type -> flyteidl.admin.GetDomainsResponse + 73, // 89: flyteidl.service.AdminService.CreateWorkflowEvent:output_type -> flyteidl.admin.WorkflowExecutionEventResponse + 74, // 90: flyteidl.service.AdminService.CreateNodeEvent:output_type -> flyteidl.admin.NodeExecutionEventResponse + 75, // 91: flyteidl.service.AdminService.CreateTaskEvent:output_type -> flyteidl.admin.TaskExecutionEventResponse + 76, // 92: flyteidl.service.AdminService.GetTaskExecution:output_type -> flyteidl.admin.TaskExecution + 77, // 93: flyteidl.service.AdminService.ListTaskExecutions:output_type -> flyteidl.admin.TaskExecutionList + 78, // 94: flyteidl.service.AdminService.GetTaskExecutionData:output_type -> flyteidl.admin.TaskExecutionGetDataResponse + 79, // 95: flyteidl.service.AdminService.UpdateProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesUpdateResponse + 80, // 96: flyteidl.service.AdminService.GetProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesGetResponse + 81, // 97: flyteidl.service.AdminService.DeleteProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesDeleteResponse + 82, // 98: flyteidl.service.AdminService.UpdateProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesUpdateResponse + 83, // 99: flyteidl.service.AdminService.GetProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesGetResponse + 84, // 100: flyteidl.service.AdminService.DeleteProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesDeleteResponse + 85, // 101: flyteidl.service.AdminService.UpdateWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesUpdateResponse + 86, // 102: flyteidl.service.AdminService.GetWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesGetResponse + 87, // 103: flyteidl.service.AdminService.DeleteWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesDeleteResponse + 88, // 104: flyteidl.service.AdminService.ListMatchableAttributes:output_type -> flyteidl.admin.ListMatchableAttributesResponse + 89, // 105: flyteidl.service.AdminService.ListNamedEntities:output_type -> flyteidl.admin.NamedEntityList + 90, // 106: flyteidl.service.AdminService.GetNamedEntity:output_type -> flyteidl.admin.NamedEntity + 91, // 107: flyteidl.service.AdminService.UpdateNamedEntity:output_type -> flyteidl.admin.NamedEntityUpdateResponse + 92, // 108: flyteidl.service.AdminService.GetVersion:output_type -> flyteidl.admin.GetVersionResponse + 93, // 109: flyteidl.service.AdminService.GetDescriptionEntity:output_type -> flyteidl.admin.DescriptionEntity + 94, // 110: flyteidl.service.AdminService.ListDescriptionEntities:output_type -> flyteidl.admin.DescriptionEntityList + 95, // 111: flyteidl.service.AdminService.GetExecutionMetrics:output_type -> flyteidl.admin.WorkflowExecutionGetMetricsResponse + 56, // [56:112] is the sub-list for method output_type + 0, // [0:56] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go b/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go index 9ca6ebd75c..13a1af3569 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go @@ -52,6 +52,7 @@ const ( AdminService_UpdateProject_FullMethodName = "/flyteidl.service.AdminService/UpdateProject" AdminService_GetProject_FullMethodName = "/flyteidl.service.AdminService/GetProject" AdminService_ListProjects_FullMethodName = "/flyteidl.service.AdminService/ListProjects" + AdminService_GetDomains_FullMethodName = "/flyteidl.service.AdminService/GetDomains" AdminService_CreateWorkflowEvent_FullMethodName = "/flyteidl.service.AdminService/CreateWorkflowEvent" AdminService_CreateNodeEvent_FullMethodName = "/flyteidl.service.AdminService/CreateNodeEvent" AdminService_CreateTaskEvent_FullMethodName = "/flyteidl.service.AdminService/CreateTaskEvent" @@ -151,6 +152,7 @@ type AdminServiceClient interface { GetProject(ctx context.Context, in *admin.ProjectGetRequest, opts ...grpc.CallOption) (*admin.Project, error) // Fetches a list of :ref:`ref_flyteidl.admin.Project` ListProjects(ctx context.Context, in *admin.ProjectListRequest, opts ...grpc.CallOption) (*admin.Projects, error) + GetDomains(ctx context.Context, in *admin.GetDomainRequest, opts ...grpc.CallOption) (*admin.GetDomainsResponse, error) // Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. CreateWorkflowEvent(ctx context.Context, in *admin.WorkflowExecutionEventRequest, opts ...grpc.CallOption) (*admin.WorkflowExecutionEventResponse, error) // Indicates a :ref:`ref_flyteidl.event.NodeExecutionEvent` has occurred. @@ -494,6 +496,15 @@ func (c *adminServiceClient) ListProjects(ctx context.Context, in *admin.Project return out, nil } +func (c *adminServiceClient) GetDomains(ctx context.Context, in *admin.GetDomainRequest, opts ...grpc.CallOption) (*admin.GetDomainsResponse, error) { + out := new(admin.GetDomainsResponse) + err := c.cc.Invoke(ctx, AdminService_GetDomains_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *adminServiceClient) CreateWorkflowEvent(ctx context.Context, in *admin.WorkflowExecutionEventRequest, opts ...grpc.CallOption) (*admin.WorkflowExecutionEventResponse, error) { out := new(admin.WorkflowExecutionEventResponse) err := c.cc.Invoke(ctx, AdminService_CreateWorkflowEvent_FullMethodName, in, out, opts...) @@ -775,6 +786,7 @@ type AdminServiceServer interface { GetProject(context.Context, *admin.ProjectGetRequest) (*admin.Project, error) // Fetches a list of :ref:`ref_flyteidl.admin.Project` ListProjects(context.Context, *admin.ProjectListRequest) (*admin.Projects, error) + GetDomains(context.Context, *admin.GetDomainRequest) (*admin.GetDomainsResponse, error) // Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. CreateWorkflowEvent(context.Context, *admin.WorkflowExecutionEventRequest) (*admin.WorkflowExecutionEventResponse, error) // Indicates a :ref:`ref_flyteidl.event.NodeExecutionEvent` has occurred. @@ -922,6 +934,9 @@ func (UnimplementedAdminServiceServer) GetProject(context.Context, *admin.Projec func (UnimplementedAdminServiceServer) ListProjects(context.Context, *admin.ProjectListRequest) (*admin.Projects, error) { return nil, status.Errorf(codes.Unimplemented, "method ListProjects not implemented") } +func (UnimplementedAdminServiceServer) GetDomains(context.Context, *admin.GetDomainRequest) (*admin.GetDomainsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDomains not implemented") +} func (UnimplementedAdminServiceServer) CreateWorkflowEvent(context.Context, *admin.WorkflowExecutionEventRequest) (*admin.WorkflowExecutionEventResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowEvent not implemented") } @@ -1579,6 +1594,24 @@ func _AdminService_ListProjects_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _AdminService_GetDomains_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(admin.GetDomainRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).GetDomains(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_GetDomains_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).GetDomains(ctx, req.(*admin.GetDomainRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AdminService_CreateWorkflowEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(admin.WorkflowExecutionEventRequest) if err := dec(in); err != nil { @@ -2128,6 +2161,10 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListProjects", Handler: _AdminService_ListProjects_Handler, }, + { + MethodName: "GetDomains", + Handler: _AdminService_GetDomains_Handler, + }, { MethodName: "CreateWorkflowEvent", Handler: _AdminService_CreateWorkflowEvent_Handler, diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go index 7e10d95ed7..833f3ce679 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go @@ -3290,6 +3290,24 @@ func local_request_AdminService_ListProjects_0(ctx context.Context, marshaler ru } +func request_AdminService_GetDomains_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.GetDomainRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetDomains(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AdminService_GetDomains_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.GetDomainRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetDomains(ctx, &protoReq) + return msg, metadata, err + +} + func request_AdminService_CreateWorkflowEvent_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq extAdmin.WorkflowExecutionEventRequest var metadata runtime.ServerMetadata @@ -6629,6 +6647,31 @@ func RegisterAdminServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_AdminService_GetDomains_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/flyteidl.service.AdminService/GetDomains", runtime.WithHTTPPathPattern("/api/v1/domains")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AdminService_GetDomains_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_GetDomains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_AdminService_CreateWorkflowEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -8040,6 +8083,28 @@ func RegisterAdminServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_AdminService_GetDomains_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AdminService/GetDomains", runtime.WithHTTPPathPattern("/api/v1/domains")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminService_GetDomains_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_GetDomains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_AdminService_CreateWorkflowEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -8642,6 +8707,8 @@ var ( pattern_AdminService_ListProjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "projects"}, "")) + pattern_AdminService_GetDomains_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "domains"}, "")) + pattern_AdminService_CreateWorkflowEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "events", "workflows"}, "")) pattern_AdminService_CreateNodeEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "events", "nodes"}, "")) @@ -8762,6 +8829,8 @@ var ( forward_AdminService_ListProjects_0 = runtime.ForwardResponseMessage + forward_AdminService_GetDomains_0 = runtime.ForwardResponseMessage + forward_AdminService_CreateWorkflowEvent_0 = runtime.ForwardResponseMessage forward_AdminService_CreateNodeEvent_0 = runtime.ForwardResponseMessage diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json index e1f0b29579..ee086383c4 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json @@ -830,6 +830,28 @@ ] } }, + "/api/v1/domains": { + "get": { + "operationId": "AdminService_GetDomains", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminGetDomainsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "tags": [ + "AdminService" + ] + } + }, "/api/v1/events/nodes": { "post": { "summary": "Indicates a :ref:`ref_flyteidl.event.NodeExecutionEvent` has occurred.", @@ -5111,6 +5133,19 @@ }, "description": "These URLs are returned as part of node and task execution data requests." }, + "adminGetDomainsResponse": { + "type": "object", + "properties": { + "domains": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/adminDomain" + } + } + }, + "description": "Represents a list of domains." + }, "adminGetVersionResponse": { "type": "object", "properties": { diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 3485ae15fc..f19253a396 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -17560,6 +17560,52 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a GetDomainRequest. */ + interface IGetDomainRequest { + } + + /** Represents a GetDomainRequest. */ + class GetDomainRequest implements IGetDomainRequest { + + /** + * Constructs a new GetDomainRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IGetDomainRequest); + + /** + * Creates a new GetDomainRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDomainRequest instance + */ + public static create(properties?: flyteidl.admin.IGetDomainRequest): flyteidl.admin.GetDomainRequest; + + /** + * Encodes the specified GetDomainRequest message. Does not implicitly {@link flyteidl.admin.GetDomainRequest.verify|verify} messages. + * @param message GetDomainRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IGetDomainRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDomainRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDomainRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.GetDomainRequest; + + /** + * Verifies a GetDomainRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a Domain. */ interface IDomain { @@ -17618,6 +17664,58 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a GetDomainsResponse. */ + interface IGetDomainsResponse { + + /** GetDomainsResponse domains */ + domains?: (flyteidl.admin.IDomain[]|null); + } + + /** Represents a GetDomainsResponse. */ + class GetDomainsResponse implements IGetDomainsResponse { + + /** + * Constructs a new GetDomainsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IGetDomainsResponse); + + /** GetDomainsResponse domains. */ + public domains: flyteidl.admin.IDomain[]; + + /** + * Creates a new GetDomainsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDomainsResponse instance + */ + public static create(properties?: flyteidl.admin.IGetDomainsResponse): flyteidl.admin.GetDomainsResponse; + + /** + * Encodes the specified GetDomainsResponse message. Does not implicitly {@link flyteidl.admin.GetDomainsResponse.verify|verify} messages. + * @param message GetDomainsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IGetDomainsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDomainsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDomainsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.GetDomainsResponse; + + /** + * Verifies a GetDomainsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a Project. */ interface IProject { @@ -21700,6 +21798,20 @@ export namespace flyteidl { */ public listProjects(request: flyteidl.admin.IProjectListRequest): Promise; + /** + * Calls GetDomains. + * @param request GetDomainRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetDomainsResponse + */ + public getDomains(request: flyteidl.admin.IGetDomainRequest, callback: flyteidl.service.AdminService.GetDomainsCallback): void; + + /** + * Calls GetDomains. + * @param request GetDomainRequest message or plain object + * @returns Promise + */ + public getDomains(request: flyteidl.admin.IGetDomainRequest): Promise; + /** * Calls CreateWorkflowEvent. * @param request WorkflowExecutionEventRequest message or plain object @@ -22249,6 +22361,13 @@ export namespace flyteidl { */ type ListProjectsCallback = (error: (Error|null), response?: flyteidl.admin.Projects) => void; + /** + * Callback as used by {@link flyteidl.service.AdminService#getDomains}. + * @param error Error, if any + * @param [response] GetDomainsResponse + */ + type GetDomainsCallback = (error: (Error|null), response?: flyteidl.admin.GetDomainsResponse) => void; + /** * Callback as used by {@link flyteidl.service.AdminService#createWorkflowEvent}. * @param error Error, if any diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 6d7ae28690..05db2f42f2 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -42532,6 +42532,99 @@ return EmailMessage; })(); + admin.GetDomainRequest = (function() { + + /** + * Properties of a GetDomainRequest. + * @memberof flyteidl.admin + * @interface IGetDomainRequest + */ + + /** + * Constructs a new GetDomainRequest. + * @memberof flyteidl.admin + * @classdesc Represents a GetDomainRequest. + * @implements IGetDomainRequest + * @constructor + * @param {flyteidl.admin.IGetDomainRequest=} [properties] Properties to set + */ + function GetDomainRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new GetDomainRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.GetDomainRequest + * @static + * @param {flyteidl.admin.IGetDomainRequest=} [properties] Properties to set + * @returns {flyteidl.admin.GetDomainRequest} GetDomainRequest instance + */ + GetDomainRequest.create = function create(properties) { + return new GetDomainRequest(properties); + }; + + /** + * Encodes the specified GetDomainRequest message. Does not implicitly {@link flyteidl.admin.GetDomainRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.GetDomainRequest + * @static + * @param {flyteidl.admin.IGetDomainRequest} message GetDomainRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDomainRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Decodes a GetDomainRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.GetDomainRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.GetDomainRequest} GetDomainRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDomainRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.GetDomainRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a GetDomainRequest message. + * @function verify + * @memberof flyteidl.admin.GetDomainRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDomainRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + return GetDomainRequest; + })(); + admin.Domain = (function() { /** @@ -42659,6 +42752,126 @@ return Domain; })(); + admin.GetDomainsResponse = (function() { + + /** + * Properties of a GetDomainsResponse. + * @memberof flyteidl.admin + * @interface IGetDomainsResponse + * @property {Array.|null} [domains] GetDomainsResponse domains + */ + + /** + * Constructs a new GetDomainsResponse. + * @memberof flyteidl.admin + * @classdesc Represents a GetDomainsResponse. + * @implements IGetDomainsResponse + * @constructor + * @param {flyteidl.admin.IGetDomainsResponse=} [properties] Properties to set + */ + function GetDomainsResponse(properties) { + this.domains = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDomainsResponse domains. + * @member {Array.} domains + * @memberof flyteidl.admin.GetDomainsResponse + * @instance + */ + GetDomainsResponse.prototype.domains = $util.emptyArray; + + /** + * Creates a new GetDomainsResponse instance using the specified properties. + * @function create + * @memberof flyteidl.admin.GetDomainsResponse + * @static + * @param {flyteidl.admin.IGetDomainsResponse=} [properties] Properties to set + * @returns {flyteidl.admin.GetDomainsResponse} GetDomainsResponse instance + */ + GetDomainsResponse.create = function create(properties) { + return new GetDomainsResponse(properties); + }; + + /** + * Encodes the specified GetDomainsResponse message. Does not implicitly {@link flyteidl.admin.GetDomainsResponse.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.GetDomainsResponse + * @static + * @param {flyteidl.admin.IGetDomainsResponse} message GetDomainsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDomainsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.domains != null && message.domains.length) + for (var i = 0; i < message.domains.length; ++i) + $root.flyteidl.admin.Domain.encode(message.domains[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a GetDomainsResponse message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.GetDomainsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.GetDomainsResponse} GetDomainsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDomainsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.GetDomainsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.domains && message.domains.length)) + message.domains = []; + message.domains.push($root.flyteidl.admin.Domain.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a GetDomainsResponse message. + * @function verify + * @memberof flyteidl.admin.GetDomainsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDomainsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.domains != null && message.hasOwnProperty("domains")) { + if (!Array.isArray(message.domains)) + return "domains: array expected"; + for (var i = 0; i < message.domains.length; ++i) { + var error = $root.flyteidl.admin.Domain.verify(message.domains[i]); + if (error) + return "domains." + error; + } + } + return null; + }; + + return GetDomainsResponse; + })(); + admin.Project = (function() { /** @@ -52065,6 +52278,39 @@ * @variation 2 */ + /** + * Callback as used by {@link flyteidl.service.AdminService#getDomains}. + * @memberof flyteidl.service.AdminService + * @typedef GetDomainsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.admin.GetDomainsResponse} [response] GetDomainsResponse + */ + + /** + * Calls GetDomains. + * @function getDomains + * @memberof flyteidl.service.AdminService + * @instance + * @param {flyteidl.admin.IGetDomainRequest} request GetDomainRequest message or plain object + * @param {flyteidl.service.AdminService.GetDomainsCallback} callback Node-style callback called with the error, if any, and GetDomainsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AdminService.prototype.getDomains = function getDomains(request, callback) { + return this.rpcCall(getDomains, $root.flyteidl.admin.GetDomainRequest, $root.flyteidl.admin.GetDomainsResponse, request, callback); + }, "name", { value: "GetDomains" }); + + /** + * Calls GetDomains. + * @function getDomains + * @memberof flyteidl.service.AdminService + * @instance + * @param {flyteidl.admin.IGetDomainRequest} request GetDomainRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link flyteidl.service.AdminService#createWorkflowEvent}. * @memberof flyteidl.service.AdminService diff --git a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py index 501a2d72aa..05751f317f 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py @@ -14,7 +14,7 @@ from flyteidl.admin import common_pb2 as flyteidl_dot_admin_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/admin/project.proto\x12\x0e\x66lyteidl.admin\x1a\x1b\x66lyteidl/admin/common.proto\",\n\x06\x44omain\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"\xbf\x02\n\x07Project\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x30\n\x07\x64omains\x18\x03 \x03(\x0b\x32\x16.flyteidl.admin.DomainR\x07\x64omains\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12.\n\x06labels\x18\x05 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12:\n\x05state\x18\x06 \x01(\x0e\x32$.flyteidl.admin.Project.ProjectStateR\x05state\x12\x10\n\x03org\x18\x07 \x01(\tR\x03org\">\n\x0cProjectState\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\x0c\n\x08\x41RCHIVED\x10\x01\x12\x14\n\x10SYSTEM_GENERATED\x10\x02\"U\n\x08Projects\x12\x33\n\x08projects\x18\x01 \x03(\x0b\x32\x17.flyteidl.admin.ProjectR\x08projects\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"\x9b\x01\n\x12ProjectListRequest\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12\x18\n\x07\x66ilters\x18\x03 \x01(\tR\x07\x66ilters\x12-\n\x07sort_by\x18\x04 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\x12\x10\n\x03org\x18\x05 \x01(\tR\x03org\"K\n\x16ProjectRegisterRequest\x12\x31\n\x07project\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.ProjectR\x07project\"\x19\n\x17ProjectRegisterResponse\"\x17\n\x15ProjectUpdateResponse\"5\n\x11ProjectGetRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x10\n\x03org\x18\x02 \x01(\tR\x03orgB\xb8\x01\n\x12\x63om.flyteidl.adminB\x0cProjectProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/admin/project.proto\x12\x0e\x66lyteidl.admin\x1a\x1b\x66lyteidl/admin/common.proto\"\x12\n\x10GetDomainRequest\",\n\x06\x44omain\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"F\n\x12GetDomainsResponse\x12\x30\n\x07\x64omains\x18\x01 \x03(\x0b\x32\x16.flyteidl.admin.DomainR\x07\x64omains\"\xbf\x02\n\x07Project\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x30\n\x07\x64omains\x18\x03 \x03(\x0b\x32\x16.flyteidl.admin.DomainR\x07\x64omains\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12.\n\x06labels\x18\x05 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12:\n\x05state\x18\x06 \x01(\x0e\x32$.flyteidl.admin.Project.ProjectStateR\x05state\x12\x10\n\x03org\x18\x07 \x01(\tR\x03org\">\n\x0cProjectState\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\x0c\n\x08\x41RCHIVED\x10\x01\x12\x14\n\x10SYSTEM_GENERATED\x10\x02\"U\n\x08Projects\x12\x33\n\x08projects\x18\x01 \x03(\x0b\x32\x17.flyteidl.admin.ProjectR\x08projects\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"\x9b\x01\n\x12ProjectListRequest\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12\x18\n\x07\x66ilters\x18\x03 \x01(\tR\x07\x66ilters\x12-\n\x07sort_by\x18\x04 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\x12\x10\n\x03org\x18\x05 \x01(\tR\x03org\"K\n\x16ProjectRegisterRequest\x12\x31\n\x07project\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.ProjectR\x07project\"\x19\n\x17ProjectRegisterResponse\"\x17\n\x15ProjectUpdateResponse\"5\n\x11ProjectGetRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x10\n\x03org\x18\x02 \x01(\tR\x03orgB\xb8\x01\n\x12\x63om.flyteidl.adminB\x0cProjectProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,22 +23,26 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.flyteidl.adminB\014ProjectProtoP\001Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\242\002\003FAX\252\002\016Flyteidl.Admin\312\002\016Flyteidl\\Admin\342\002\032Flyteidl\\Admin\\GPBMetadata\352\002\017Flyteidl::Admin' - _globals['_DOMAIN']._serialized_start=77 - _globals['_DOMAIN']._serialized_end=121 - _globals['_PROJECT']._serialized_start=124 - _globals['_PROJECT']._serialized_end=443 - _globals['_PROJECT_PROJECTSTATE']._serialized_start=381 - _globals['_PROJECT_PROJECTSTATE']._serialized_end=443 - _globals['_PROJECTS']._serialized_start=445 - _globals['_PROJECTS']._serialized_end=530 - _globals['_PROJECTLISTREQUEST']._serialized_start=533 - _globals['_PROJECTLISTREQUEST']._serialized_end=688 - _globals['_PROJECTREGISTERREQUEST']._serialized_start=690 - _globals['_PROJECTREGISTERREQUEST']._serialized_end=765 - _globals['_PROJECTREGISTERRESPONSE']._serialized_start=767 - _globals['_PROJECTREGISTERRESPONSE']._serialized_end=792 - _globals['_PROJECTUPDATERESPONSE']._serialized_start=794 - _globals['_PROJECTUPDATERESPONSE']._serialized_end=817 - _globals['_PROJECTGETREQUEST']._serialized_start=819 - _globals['_PROJECTGETREQUEST']._serialized_end=872 + _globals['_GETDOMAINREQUEST']._serialized_start=77 + _globals['_GETDOMAINREQUEST']._serialized_end=95 + _globals['_DOMAIN']._serialized_start=97 + _globals['_DOMAIN']._serialized_end=141 + _globals['_GETDOMAINSRESPONSE']._serialized_start=143 + _globals['_GETDOMAINSRESPONSE']._serialized_end=213 + _globals['_PROJECT']._serialized_start=216 + _globals['_PROJECT']._serialized_end=535 + _globals['_PROJECT_PROJECTSTATE']._serialized_start=473 + _globals['_PROJECT_PROJECTSTATE']._serialized_end=535 + _globals['_PROJECTS']._serialized_start=537 + _globals['_PROJECTS']._serialized_end=622 + _globals['_PROJECTLISTREQUEST']._serialized_start=625 + _globals['_PROJECTLISTREQUEST']._serialized_end=780 + _globals['_PROJECTREGISTERREQUEST']._serialized_start=782 + _globals['_PROJECTREGISTERREQUEST']._serialized_end=857 + _globals['_PROJECTREGISTERRESPONSE']._serialized_start=859 + _globals['_PROJECTREGISTERRESPONSE']._serialized_end=884 + _globals['_PROJECTUPDATERESPONSE']._serialized_start=886 + _globals['_PROJECTUPDATERESPONSE']._serialized_end=909 + _globals['_PROJECTGETREQUEST']._serialized_start=911 + _globals['_PROJECTGETREQUEST']._serialized_end=964 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi index 8b24c39701..a00eb146fa 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi @@ -7,6 +7,10 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor +class GetDomainRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class Domain(_message.Message): __slots__ = ["id", "name"] ID_FIELD_NUMBER: _ClassVar[int] @@ -15,6 +19,12 @@ class Domain(_message.Message): name: str def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ... +class GetDomainsResponse(_message.Message): + __slots__ = ["domains"] + DOMAINS_FIELD_NUMBER: _ClassVar[int] + domains: _containers.RepeatedCompositeFieldContainer[Domain] + def __init__(self, domains: _Optional[_Iterable[_Union[Domain, _Mapping]]] = ...) -> None: ... + class Project(_message.Message): __slots__ = ["id", "name", "domains", "description", "labels", "state", "org"] class ProjectState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): diff --git a/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py b/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py index c205a119f5..0b177140ee 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py @@ -30,7 +30,7 @@ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/admin.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1c\x66lyteidl/admin/project.proto\x1a.flyteidl/admin/project_domain_attributes.proto\x1a\'flyteidl/admin/project_attributes.proto\x1a\x19\x66lyteidl/admin/task.proto\x1a\x1d\x66lyteidl/admin/workflow.proto\x1a(flyteidl/admin/workflow_attributes.proto\x1a flyteidl/admin/launch_plan.proto\x1a\x1a\x66lyteidl/admin/event.proto\x1a\x1e\x66lyteidl/admin/execution.proto\x1a\'flyteidl/admin/matchable_resource.proto\x1a#flyteidl/admin/node_execution.proto\x1a#flyteidl/admin/task_execution.proto\x1a\x1c\x66lyteidl/admin/version.proto\x1a\x1b\x66lyteidl/admin/common.proto\x1a\'flyteidl/admin/description_entity.proto\x1a.protoc-gen-openapiv2/options/annotations.proto2\x93s\n\x0c\x41\x64minService\x12\xc5\x02\n\nCreateTask\x12!.flyteidl.admin.TaskCreateRequest\x1a\".flyteidl.admin.TaskCreateResponse\"\xef\x01\x92\x41\xd3\x01\x1a&Create and register a task definition.JB\n\x03\x34\x30\x30\x12;\n9Returned for bad request that may have failed validation.Je\n\x03\x34\x30\x39\x12^\n\\Returned for a request that references an identical entity that has already been registered.\x82\xd3\xe4\x93\x02\x12:\x01*\"\r/api/v1/tasks\x12\xb2\x01\n\x07GetTask\x12 .flyteidl.admin.ObjectGetRequest\x1a\x14.flyteidl.admin.Task\"o\x92\x41\'\x1a%Retrieve an existing task definition.\x82\xd3\xe4\x93\x02?\x12=/api/v1/tasks/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xde\x01\n\x0bListTaskIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"r\x92\x41\x44\x1a\x42\x46\x65tch existing task definition identifiers matching input filters.\x82\xd3\xe4\x93\x02%\x12#/api/v1/task_ids/{project}/{domain}\x12\xeb\x01\n\tListTasks\x12#.flyteidl.admin.ResourceListRequest\x1a\x18.flyteidl.admin.TaskList\"\x9e\x01\x92\x41\x39\x1a\x37\x46\x65tch existing task definitions matching input filters.\x82\xd3\xe4\x93\x02\\Z(\x12&/api/v1/tasks/{id.project}/{id.domain}\x12\x30/api/v1/tasks/{id.project}/{id.domain}/{id.name}\x12\xd9\x02\n\x0e\x43reateWorkflow\x12%.flyteidl.admin.WorkflowCreateRequest\x1a&.flyteidl.admin.WorkflowCreateResponse\"\xf7\x01\x92\x41\xd7\x01\x1a*Create and register a workflow definition.JB\n\x03\x34\x30\x30\x12;\n9Returned for bad request that may have failed validation.Je\n\x03\x34\x30\x39\x12^\n\\Returned for a request that references an identical entity that has already been registered.\x82\xd3\xe4\x93\x02\x16:\x01*\"\x11/api/v1/workflows\x12\xc2\x01\n\x0bGetWorkflow\x12 .flyteidl.admin.ObjectGetRequest\x1a\x18.flyteidl.admin.Workflow\"w\x92\x41+\x1a)Retrieve an existing workflow definition.\x82\xd3\xe4\x93\x02\x43\x12\x41/api/v1/workflows/{id.project}/{id.domain}/{id.name}/{id.version}\x12\x9f\x01\n\x0fListWorkflowIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"/\x82\xd3\xe4\x93\x02)\x12\'/api/v1/workflow_ids/{project}/{domain}\x12\xff\x01\n\rListWorkflows\x12#.flyteidl.admin.ResourceListRequest\x1a\x1c.flyteidl.admin.WorkflowList\"\xaa\x01\x92\x41=\x1a;Fetch existing workflow definitions matching input filters.\x82\xd3\xe4\x93\x02\x64Z,\x12*/api/v1/workflows/{id.project}/{id.domain}\x12\x34/api/v1/workflows/{id.project}/{id.domain}/{id.name}\x12\xe5\x02\n\x10\x43reateLaunchPlan\x12\'.flyteidl.admin.LaunchPlanCreateRequest\x1a(.flyteidl.admin.LaunchPlanCreateResponse\"\xfd\x01\x92\x41\xda\x01\x1a-Create and register a launch plan definition.JB\n\x03\x34\x30\x30\x12;\n9Returned for bad request that may have failed validation.Je\n\x03\x34\x30\x39\x12^\n\\Returned for a request that references an identical entity that has already been registered.\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/api/v1/launch_plans\x12\xcc\x01\n\rGetLaunchPlan\x12 .flyteidl.admin.ObjectGetRequest\x1a\x1a.flyteidl.admin.LaunchPlan\"}\x92\x41.\x1a,Retrieve an existing launch plan definition.\x82\xd3\xe4\x93\x02\x46\x12\x44/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xf3\x01\n\x13GetActiveLaunchPlan\x12\'.flyteidl.admin.ActiveLaunchPlanRequest\x1a\x1a.flyteidl.admin.LaunchPlan\"\x96\x01\x92\x41M\x1aKRetrieve the active launch plan version specified by input request filters.\x82\xd3\xe4\x93\x02@\x12>/api/v1/active_launch_plans/{id.project}/{id.domain}/{id.name}\x12\xeb\x01\n\x15ListActiveLaunchPlans\x12+.flyteidl.admin.ActiveLaunchPlanListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\x84\x01\x92\x41K\x1aIFetch the active launch plan versions specified by input request filters.\x82\xd3\xe4\x93\x02\x30\x12./api/v1/active_launch_plans/{project}/{domain}\x12\xf3\x01\n\x11ListLaunchPlanIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"\x80\x01\x92\x41K\x1aIFetch existing launch plan definition identifiers matching input filters.\x82\xd3\xe4\x93\x02,\x12*/api/v1/launch_plan_ids/{project}/{domain}\x12\x8c\x02\n\x0fListLaunchPlans\x12#.flyteidl.admin.ResourceListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\xb3\x01\x92\x41@\x1a>Fetch existing launch plan definitions matching input filters.\x82\xd3\xe4\x93\x02jZ/\x12-/api/v1/launch_plans/{id.project}/{id.domain}\x12\x37/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}\x12\xc0\x06\n\x10UpdateLaunchPlan\x12\'.flyteidl.admin.LaunchPlanUpdateRequest\x1a(.flyteidl.admin.LaunchPlanUpdateResponse\"\xd8\x05\x92\x41\x85\x05\x1a\x82\x05Update the status of an existing launch plan definition. At most one launch plan version for a given {project, domain, name} can be active at a time. If this call sets a launch plan to active and existing version is already active, the result of this call will be that the formerly active launch plan will be made inactive and specified launch plan in this request will be made active. In the event that the formerly active launch plan had a schedule associated it with it, this schedule will be disabled. If the reference launch plan in this request is being set to active and has a schedule associated with it, the schedule will be enabled.\x82\xd3\xe4\x93\x02I:\x01*\x1a\x44/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xa2\x01\n\x0f\x43reateExecution\x12&.flyteidl.admin.ExecutionCreateRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\">\x92\x41\x1e\x1a\x1c\x43reate a workflow execution.\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v1/executions\x12\xb1\x01\n\x11RelaunchExecution\x12(.flyteidl.admin.ExecutionRelaunchRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"I\x92\x41 \x1a\x1eRelaunch a workflow execution.\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v1/executions/relaunch\x12\x9d\x05\n\x10RecoverExecution\x12\'.flyteidl.admin.ExecutionRecoverRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"\xb6\x04\x92\x41\x8d\x04\x1a\x8a\x04Recreates a previously-run workflow execution that will only start executing from the last known failure point. In Recover mode, users cannot change any input parameters or update the version of the execution. This is extremely useful to recover from system errors and byzantine faults like - Loss of K8s cluster, bugs in platform or instability, machine failures, downstream system failures (downstream services), or simply to recover executions that failed because of retry exhaustion and should complete if tried again.\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v1/executions/recover\x12\xc2\x01\n\x0cGetExecution\x12+.flyteidl.admin.WorkflowExecutionGetRequest\x1a\x19.flyteidl.admin.Execution\"j\x92\x41*\x1a(Retrieve an existing workflow execution.\x82\xd3\xe4\x93\x02\x37\x12\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xa4\x01\n\x0fUpdateExecution\x12&.flyteidl.admin.ExecutionUpdateRequest\x1a\'.flyteidl.admin.ExecutionUpdateResponse\"@\x82\xd3\xe4\x93\x02::\x01*\x1a\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xb9\x01\n\x10GetExecutionData\x12/.flyteidl.admin.WorkflowExecutionGetDataRequest\x1a\x30.flyteidl.admin.WorkflowExecutionGetDataResponse\"B\x82\xd3\xe4\x93\x02<\x12:/api/v1/data/executions/{id.project}/{id.domain}/{id.name}\x12\x89\x01\n\x0eListExecutions\x12#.flyteidl.admin.ResourceListRequest\x1a\x1d.flyteidl.admin.ExecutionList\"3\x82\xd3\xe4\x93\x02-\x12+/api/v1/executions/{id.project}/{id.domain}\x12\xad\x01\n\x12TerminateExecution\x12).flyteidl.admin.ExecutionTerminateRequest\x1a*.flyteidl.admin.ExecutionTerminateResponse\"@\x82\xd3\xe4\x93\x02::\x01**5/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xd2\x01\n\x10GetNodeExecution\x12\'.flyteidl.admin.NodeExecutionGetRequest\x1a\x1d.flyteidl.admin.NodeExecution\"v\x82\xd3\xe4\x93\x02p\x12n/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\xff\x01\n\x16GetDynamicNodeWorkflow\x12-.flyteidl.admin.GetDynamicNodeWorkflowRequest\x1a+.flyteidl.admin.DynamicNodeWorkflowResponse\"\x88\x01\x82\xd3\xe4\x93\x02\x81\x01\x12\x7f/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}/dynamic_workflow\x12\xde\x01\n\x12ListNodeExecutions\x12(.flyteidl.admin.NodeExecutionListRequest\x1a!.flyteidl.admin.NodeExecutionList\"{\x82\xd3\xe4\x93\x02u\x12s/api/v1/node_executions/{workflow_execution_id.project}/{workflow_execution_id.domain}/{workflow_execution_id.name}\x12\xa5\x04\n\x19ListNodeExecutionsForTask\x12/.flyteidl.admin.NodeExecutionForTaskListRequest\x1a!.flyteidl.admin.NodeExecutionList\"\xb3\x03\x82\xd3\xe4\x93\x02\xac\x03\x12\xa9\x03/api/v1/children/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}\x12\xee\x01\n\x14GetNodeExecutionData\x12+.flyteidl.admin.NodeExecutionGetDataRequest\x1a,.flyteidl.admin.NodeExecutionGetDataResponse\"{\x82\xd3\xe4\x93\x02u\x12s/api/v1/data/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\x7f\n\x0fRegisterProject\x12&.flyteidl.admin.ProjectRegisterRequest\x1a\'.flyteidl.admin.ProjectRegisterResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/api/v1/projects\x12\x87\x01\n\rUpdateProject\x12\x17.flyteidl.admin.Project\x1a%.flyteidl.admin.ProjectUpdateResponse\"6\x92\x41\x13\x1a\x11Update a project.\x82\xd3\xe4\x93\x02\x1a:\x01*\x1a\x15/api/v1/projects/{id}\x12\x87\x01\n\nGetProject\x12!.flyteidl.admin.ProjectGetRequest\x1a\x17.flyteidl.admin.Project\"=\x92\x41\x1d\x1a\x1b\x46\x65tch a registered project.\x82\xd3\xe4\x93\x02\x17\x12\x15/api/v1/projects/{id}\x12\x85\x01\n\x0cListProjects\x12\".flyteidl.admin.ProjectListRequest\x1a\x18.flyteidl.admin.Projects\"7\x92\x41\x1c\x1a\x1a\x46\x65tch registered projects.\x82\xd3\xe4\x93\x02\x12\x12\x10/api/v1/projects\x12\xdd\x01\n\x13\x43reateWorkflowEvent\x12-.flyteidl.admin.WorkflowExecutionEventRequest\x1a..flyteidl.admin.WorkflowExecutionEventResponse\"g\x92\x41\x41\x1a?Create a workflow execution event recording a phase transition.\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/api/v1/events/workflows\x12\xc9\x01\n\x0f\x43reateNodeEvent\x12).flyteidl.admin.NodeExecutionEventRequest\x1a*.flyteidl.admin.NodeExecutionEventResponse\"_\x92\x41=\x1a;Create a node execution event recording a phase transition.\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/api/v1/events/nodes\x12\xc9\x01\n\x0f\x43reateTaskEvent\x12).flyteidl.admin.TaskExecutionEventRequest\x1a*.flyteidl.admin.TaskExecutionEventResponse\"_\x92\x41=\x1a;Create a task execution event recording a phase transition.\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/api/v1/events/tasks\x12\xa9\x03\n\x10GetTaskExecution\x12\'.flyteidl.admin.TaskExecutionGetRequest\x1a\x1d.flyteidl.admin.TaskExecution\"\xcc\x02\x92\x41&\x1a$Retrieve an existing task execution.\x82\xd3\xe4\x93\x02\x9c\x02\x12\x99\x02/api/v1/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xd3\x02\n\x12ListTaskExecutions\x12(.flyteidl.admin.TaskExecutionListRequest\x1a!.flyteidl.admin.TaskExecutionList\"\xef\x01\x92\x41\x38\x1a\x36\x46\x65tch existing task executions matching input filters.\x82\xd3\xe4\x93\x02\xad\x01\x12\xaa\x01/api/v1/task_executions/{node_execution_id.execution_id.project}/{node_execution_id.execution_id.domain}/{node_execution_id.execution_id.name}/{node_execution_id.node_id}\x12\xe0\x03\n\x14GetTaskExecutionData\x12+.flyteidl.admin.TaskExecutionGetDataRequest\x1a,.flyteidl.admin.TaskExecutionGetDataResponse\"\xec\x02\x92\x41\x41\x1a?Retrieve input and output data from an existing task execution.\x82\xd3\xe4\x93\x02\xa1\x02\x12\x9e\x02/api/v1/data/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xbf\x02\n\x1dUpdateProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesUpdateRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesUpdateResponse\"\xb0\x01\x92\x41X\x1aVUpdate the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02O:\x01*\x1aJ/api/v1/project_domain_attributes/{attributes.project}/{attributes.domain}\x12\x9f\x02\n\x1aGetProjectDomainAttributes\x12\x31.flyteidl.admin.ProjectDomainAttributesGetRequest\x1a\x32.flyteidl.admin.ProjectDomainAttributesGetResponse\"\x99\x01\x92\x41Z\x1aXRetrieve the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02\x36\x12\x34/api/v1/project_domain_attributes/{project}/{domain}\x12\xa9\x02\n\x1d\x44\x65leteProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesDeleteRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesDeleteResponse\"\x9a\x01\x92\x41X\x1aVDelete the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02\x39:\x01**4/api/v1/project_domain_attributes/{project}/{domain}\x12\xff\x01\n\x17UpdateProjectAttributes\x12..flyteidl.admin.ProjectAttributesUpdateRequest\x1a/.flyteidl.admin.ProjectAttributesUpdateResponse\"\x82\x01\x92\x41\x45\x1a\x43Update the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02\x34:\x01*\x1a//api/v1/project_attributes/{attributes.project}\x12\xe9\x01\n\x14GetProjectAttributes\x12+.flyteidl.admin.ProjectAttributesGetRequest\x1a,.flyteidl.admin.ProjectAttributesGetResponse\"v\x92\x41G\x1a\x45Retrieve the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02&\x12$/api/v1/project_attributes/{project}\x12\xf3\x01\n\x17\x44\x65leteProjectAttributes\x12..flyteidl.admin.ProjectAttributesDeleteRequest\x1a/.flyteidl.admin.ProjectAttributesDeleteResponse\"w\x92\x41\x45\x1a\x43\x44\x65lete the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02):\x01**$/api/v1/project_attributes/{project}\x12\xce\x02\n\x18UpdateWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesUpdateRequest\x1a\x30.flyteidl.admin.WorkflowAttributesUpdateResponse\"\xce\x01\x92\x41\x66\x1a\x64Update the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02_:\x01*\x1aZ/api/v1/workflow_attributes/{attributes.project}/{attributes.domain}/{attributes.workflow}\x12\xa3\x02\n\x15GetWorkflowAttributes\x12,.flyteidl.admin.WorkflowAttributesGetRequest\x1a-.flyteidl.admin.WorkflowAttributesGetResponse\"\xac\x01\x92\x41h\x1a\x66Retrieve the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02;\x12\x39/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\xad\x02\n\x18\x44\x65leteWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesDeleteRequest\x1a\x30.flyteidl.admin.WorkflowAttributesDeleteResponse\"\xad\x01\x92\x41\x66\x1a\x64\x44\x65lete the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02>:\x01**9/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\xe1\x01\n\x17ListMatchableAttributes\x12..flyteidl.admin.ListMatchableAttributesRequest\x1a/.flyteidl.admin.ListMatchableAttributesResponse\"e\x92\x41>\x1a/api/v1/active_launch_plans/{id.project}/{id.domain}/{id.name}\x12\xeb\x01\n\x15ListActiveLaunchPlans\x12+.flyteidl.admin.ActiveLaunchPlanListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\x84\x01\x92\x41K\x1aIFetch the active launch plan versions specified by input request filters.\x82\xd3\xe4\x93\x02\x30\x12./api/v1/active_launch_plans/{project}/{domain}\x12\xf3\x01\n\x11ListLaunchPlanIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"\x80\x01\x92\x41K\x1aIFetch existing launch plan definition identifiers matching input filters.\x82\xd3\xe4\x93\x02,\x12*/api/v1/launch_plan_ids/{project}/{domain}\x12\x8c\x02\n\x0fListLaunchPlans\x12#.flyteidl.admin.ResourceListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\xb3\x01\x92\x41@\x1a>Fetch existing launch plan definitions matching input filters.\x82\xd3\xe4\x93\x02jZ/\x12-/api/v1/launch_plans/{id.project}/{id.domain}\x12\x37/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}\x12\xc0\x06\n\x10UpdateLaunchPlan\x12\'.flyteidl.admin.LaunchPlanUpdateRequest\x1a(.flyteidl.admin.LaunchPlanUpdateResponse\"\xd8\x05\x92\x41\x85\x05\x1a\x82\x05Update the status of an existing launch plan definition. At most one launch plan version for a given {project, domain, name} can be active at a time. If this call sets a launch plan to active and existing version is already active, the result of this call will be that the formerly active launch plan will be made inactive and specified launch plan in this request will be made active. In the event that the formerly active launch plan had a schedule associated it with it, this schedule will be disabled. If the reference launch plan in this request is being set to active and has a schedule associated with it, the schedule will be enabled.\x82\xd3\xe4\x93\x02I:\x01*\x1a\x44/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xa2\x01\n\x0f\x43reateExecution\x12&.flyteidl.admin.ExecutionCreateRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\">\x92\x41\x1e\x1a\x1c\x43reate a workflow execution.\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v1/executions\x12\xb1\x01\n\x11RelaunchExecution\x12(.flyteidl.admin.ExecutionRelaunchRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"I\x92\x41 \x1a\x1eRelaunch a workflow execution.\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v1/executions/relaunch\x12\x9d\x05\n\x10RecoverExecution\x12\'.flyteidl.admin.ExecutionRecoverRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"\xb6\x04\x92\x41\x8d\x04\x1a\x8a\x04Recreates a previously-run workflow execution that will only start executing from the last known failure point. In Recover mode, users cannot change any input parameters or update the version of the execution. This is extremely useful to recover from system errors and byzantine faults like - Loss of K8s cluster, bugs in platform or instability, machine failures, downstream system failures (downstream services), or simply to recover executions that failed because of retry exhaustion and should complete if tried again.\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v1/executions/recover\x12\xc2\x01\n\x0cGetExecution\x12+.flyteidl.admin.WorkflowExecutionGetRequest\x1a\x19.flyteidl.admin.Execution\"j\x92\x41*\x1a(Retrieve an existing workflow execution.\x82\xd3\xe4\x93\x02\x37\x12\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xa4\x01\n\x0fUpdateExecution\x12&.flyteidl.admin.ExecutionUpdateRequest\x1a\'.flyteidl.admin.ExecutionUpdateResponse\"@\x82\xd3\xe4\x93\x02::\x01*\x1a\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xb9\x01\n\x10GetExecutionData\x12/.flyteidl.admin.WorkflowExecutionGetDataRequest\x1a\x30.flyteidl.admin.WorkflowExecutionGetDataResponse\"B\x82\xd3\xe4\x93\x02<\x12:/api/v1/data/executions/{id.project}/{id.domain}/{id.name}\x12\x89\x01\n\x0eListExecutions\x12#.flyteidl.admin.ResourceListRequest\x1a\x1d.flyteidl.admin.ExecutionList\"3\x82\xd3\xe4\x93\x02-\x12+/api/v1/executions/{id.project}/{id.domain}\x12\xad\x01\n\x12TerminateExecution\x12).flyteidl.admin.ExecutionTerminateRequest\x1a*.flyteidl.admin.ExecutionTerminateResponse\"@\x82\xd3\xe4\x93\x02::\x01**5/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xd2\x01\n\x10GetNodeExecution\x12\'.flyteidl.admin.NodeExecutionGetRequest\x1a\x1d.flyteidl.admin.NodeExecution\"v\x82\xd3\xe4\x93\x02p\x12n/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\xff\x01\n\x16GetDynamicNodeWorkflow\x12-.flyteidl.admin.GetDynamicNodeWorkflowRequest\x1a+.flyteidl.admin.DynamicNodeWorkflowResponse\"\x88\x01\x82\xd3\xe4\x93\x02\x81\x01\x12\x7f/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}/dynamic_workflow\x12\xde\x01\n\x12ListNodeExecutions\x12(.flyteidl.admin.NodeExecutionListRequest\x1a!.flyteidl.admin.NodeExecutionList\"{\x82\xd3\xe4\x93\x02u\x12s/api/v1/node_executions/{workflow_execution_id.project}/{workflow_execution_id.domain}/{workflow_execution_id.name}\x12\xa5\x04\n\x19ListNodeExecutionsForTask\x12/.flyteidl.admin.NodeExecutionForTaskListRequest\x1a!.flyteidl.admin.NodeExecutionList\"\xb3\x03\x82\xd3\xe4\x93\x02\xac\x03\x12\xa9\x03/api/v1/children/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}\x12\xee\x01\n\x14GetNodeExecutionData\x12+.flyteidl.admin.NodeExecutionGetDataRequest\x1a,.flyteidl.admin.NodeExecutionGetDataResponse\"{\x82\xd3\xe4\x93\x02u\x12s/api/v1/data/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\x7f\n\x0fRegisterProject\x12&.flyteidl.admin.ProjectRegisterRequest\x1a\'.flyteidl.admin.ProjectRegisterResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/api/v1/projects\x12\x87\x01\n\rUpdateProject\x12\x17.flyteidl.admin.Project\x1a%.flyteidl.admin.ProjectUpdateResponse\"6\x92\x41\x13\x1a\x11Update a project.\x82\xd3\xe4\x93\x02\x1a:\x01*\x1a\x15/api/v1/projects/{id}\x12\x87\x01\n\nGetProject\x12!.flyteidl.admin.ProjectGetRequest\x1a\x17.flyteidl.admin.Project\"=\x92\x41\x1d\x1a\x1b\x46\x65tch a registered project.\x82\xd3\xe4\x93\x02\x17\x12\x15/api/v1/projects/{id}\x12\x85\x01\n\x0cListProjects\x12\".flyteidl.admin.ProjectListRequest\x1a\x18.flyteidl.admin.Projects\"7\x92\x41\x1c\x1a\x1a\x46\x65tch registered projects.\x82\xd3\xe4\x93\x02\x12\x12\x10/api/v1/projects\x12k\n\nGetDomains\x12 .flyteidl.admin.GetDomainRequest\x1a\".flyteidl.admin.GetDomainsResponse\"\x17\x82\xd3\xe4\x93\x02\x11\x12\x0f/api/v1/domains\x12\xdd\x01\n\x13\x43reateWorkflowEvent\x12-.flyteidl.admin.WorkflowExecutionEventRequest\x1a..flyteidl.admin.WorkflowExecutionEventResponse\"g\x92\x41\x41\x1a?Create a workflow execution event recording a phase transition.\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/api/v1/events/workflows\x12\xc9\x01\n\x0f\x43reateNodeEvent\x12).flyteidl.admin.NodeExecutionEventRequest\x1a*.flyteidl.admin.NodeExecutionEventResponse\"_\x92\x41=\x1a;Create a node execution event recording a phase transition.\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/api/v1/events/nodes\x12\xc9\x01\n\x0f\x43reateTaskEvent\x12).flyteidl.admin.TaskExecutionEventRequest\x1a*.flyteidl.admin.TaskExecutionEventResponse\"_\x92\x41=\x1a;Create a task execution event recording a phase transition.\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/api/v1/events/tasks\x12\xa9\x03\n\x10GetTaskExecution\x12\'.flyteidl.admin.TaskExecutionGetRequest\x1a\x1d.flyteidl.admin.TaskExecution\"\xcc\x02\x92\x41&\x1a$Retrieve an existing task execution.\x82\xd3\xe4\x93\x02\x9c\x02\x12\x99\x02/api/v1/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xd3\x02\n\x12ListTaskExecutions\x12(.flyteidl.admin.TaskExecutionListRequest\x1a!.flyteidl.admin.TaskExecutionList\"\xef\x01\x92\x41\x38\x1a\x36\x46\x65tch existing task executions matching input filters.\x82\xd3\xe4\x93\x02\xad\x01\x12\xaa\x01/api/v1/task_executions/{node_execution_id.execution_id.project}/{node_execution_id.execution_id.domain}/{node_execution_id.execution_id.name}/{node_execution_id.node_id}\x12\xe0\x03\n\x14GetTaskExecutionData\x12+.flyteidl.admin.TaskExecutionGetDataRequest\x1a,.flyteidl.admin.TaskExecutionGetDataResponse\"\xec\x02\x92\x41\x41\x1a?Retrieve input and output data from an existing task execution.\x82\xd3\xe4\x93\x02\xa1\x02\x12\x9e\x02/api/v1/data/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xbf\x02\n\x1dUpdateProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesUpdateRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesUpdateResponse\"\xb0\x01\x92\x41X\x1aVUpdate the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02O:\x01*\x1aJ/api/v1/project_domain_attributes/{attributes.project}/{attributes.domain}\x12\x9f\x02\n\x1aGetProjectDomainAttributes\x12\x31.flyteidl.admin.ProjectDomainAttributesGetRequest\x1a\x32.flyteidl.admin.ProjectDomainAttributesGetResponse\"\x99\x01\x92\x41Z\x1aXRetrieve the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02\x36\x12\x34/api/v1/project_domain_attributes/{project}/{domain}\x12\xa9\x02\n\x1d\x44\x65leteProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesDeleteRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesDeleteResponse\"\x9a\x01\x92\x41X\x1aVDelete the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02\x39:\x01**4/api/v1/project_domain_attributes/{project}/{domain}\x12\xff\x01\n\x17UpdateProjectAttributes\x12..flyteidl.admin.ProjectAttributesUpdateRequest\x1a/.flyteidl.admin.ProjectAttributesUpdateResponse\"\x82\x01\x92\x41\x45\x1a\x43Update the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02\x34:\x01*\x1a//api/v1/project_attributes/{attributes.project}\x12\xe9\x01\n\x14GetProjectAttributes\x12+.flyteidl.admin.ProjectAttributesGetRequest\x1a,.flyteidl.admin.ProjectAttributesGetResponse\"v\x92\x41G\x1a\x45Retrieve the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02&\x12$/api/v1/project_attributes/{project}\x12\xf3\x01\n\x17\x44\x65leteProjectAttributes\x12..flyteidl.admin.ProjectAttributesDeleteRequest\x1a/.flyteidl.admin.ProjectAttributesDeleteResponse\"w\x92\x41\x45\x1a\x43\x44\x65lete the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02):\x01**$/api/v1/project_attributes/{project}\x12\xce\x02\n\x18UpdateWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesUpdateRequest\x1a\x30.flyteidl.admin.WorkflowAttributesUpdateResponse\"\xce\x01\x92\x41\x66\x1a\x64Update the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02_:\x01*\x1aZ/api/v1/workflow_attributes/{attributes.project}/{attributes.domain}/{attributes.workflow}\x12\xa3\x02\n\x15GetWorkflowAttributes\x12,.flyteidl.admin.WorkflowAttributesGetRequest\x1a-.flyteidl.admin.WorkflowAttributesGetResponse\"\xac\x01\x92\x41h\x1a\x66Retrieve the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02;\x12\x39/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\xad\x02\n\x18\x44\x65leteWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesDeleteRequest\x1a\x30.flyteidl.admin.WorkflowAttributesDeleteResponse\"\xad\x01\x92\x41\x66\x1a\x64\x44\x65lete the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02>:\x01**9/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\xe1\x01\n\x17ListMatchableAttributes\x12..flyteidl.admin.ListMatchableAttributesRequest\x1a/.flyteidl.admin.ListMatchableAttributesResponse\"e\x92\x41>\x1a, +} /// Top-level namespace used to classify different entities like workflows and executions. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/flyteidl/gen/pb_rust/flyteidl.service.tonic.rs b/flyteidl/gen/pb_rust/flyteidl.service.tonic.rs index 7fed85e2ed..9d261bc7fa 100644 --- a/flyteidl/gen/pb_rust/flyteidl.service.tonic.rs +++ b/flyteidl/gen/pb_rust/flyteidl.service.tonic.rs @@ -1064,6 +1064,32 @@ pub mod admin_service_client { ); self.inner.unary(req, path, codec).await } + /// + pub async fn get_domains( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/flyteidl.service.AdminService/GetDomains", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("flyteidl.service.AdminService", "GetDomains")); + self.inner.unary(req, path, codec).await + } /** Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. */ pub async fn create_workflow_event( @@ -2123,6 +2149,14 @@ pub mod admin_service_server { tonic::Response, tonic::Status, >; + /// + async fn get_domains( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /** Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. */ async fn create_workflow_event( @@ -4008,6 +4042,54 @@ pub mod admin_service_server { }; Box::pin(fut) } + "/flyteidl.service.AdminService/GetDomains" => { + #[allow(non_camel_case_types)] + struct GetDomainsSvc(pub Arc); + impl< + T: AdminService, + > tonic::server::UnaryService + for GetDomainsSvc { + type Response = super::super::admin::GetDomainsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::super::admin::GetDomainRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::get_domains(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetDomainsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } "/flyteidl.service.AdminService/CreateWorkflowEvent" => { #[allow(non_camel_case_types)] struct CreateWorkflowEventSvc(pub Arc); diff --git a/flyteidl/protos/flyteidl/admin/project.proto b/flyteidl/protos/flyteidl/admin/project.proto index a06d3b58bc..c77e54a330 100644 --- a/flyteidl/protos/flyteidl/admin/project.proto +++ b/flyteidl/protos/flyteidl/admin/project.proto @@ -6,6 +6,9 @@ option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin import "flyteidl/admin/common.proto"; +// Empty request for GetDomain +message GetDomainRequest {} + // Namespace within a project commonly used to differentiate between different service instances. // e.g. "production", "development", etc. message Domain { @@ -16,6 +19,10 @@ message Domain { string name = 2; } +// Represents a list of domains. +message GetDomainsResponse { + repeated Domain domains = 1; +} // Top-level namespace used to classify different entities like workflows and executions. message Project { diff --git a/flyteidl/protos/flyteidl/service/admin.proto b/flyteidl/protos/flyteidl/service/admin.proto index 2004842b0b..d7d5adeeef 100644 --- a/flyteidl/protos/flyteidl/service/admin.proto +++ b/flyteidl/protos/flyteidl/service/admin.proto @@ -415,6 +415,15 @@ service AdminService { }; } + rpc GetDomains (flyteidl.admin.GetDomainRequest) returns (flyteidl.admin.GetDomainsResponse) { + option (google.api.http) = { + get: "/api/v1/domains" + }; + // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + // description: "Fetch registered domains." + // }; + } + // Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. rpc CreateWorkflowEvent (flyteidl.admin.WorkflowExecutionEventRequest) returns (flyteidl.admin.WorkflowExecutionEventResponse) { option (google.api.http) = { From c10346d5bc07e37783c277f6d3bede301ae3ad99 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Fri, 21 Jun 2024 02:29:48 +0200 Subject: [PATCH 28/30] keep EnvFrom from pod template (#5423) * keep EnvFrom from pod template not complete nor tested, just as hint for potential fix for regression in https://github.com/flyteorg/flyte/pull/4969 * Add test and fix build error Signed-off-by: Eduardo Apolinario * Fix test Signed-off-by: Eduardo Apolinario --------- Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- .../flytek8s/container_helper.go | 2 +- .../flytek8s/container_helper_test.go | 37 +++++++++++++++++++ .../flytek8s/k8s_resource_adds.go | 4 +- .../flytek8s/k8s_resource_adds_test.go | 2 +- .../plugins/array/awsbatch/transformer.go | 2 +- 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go index 8ad765f72e..32d2e0180e 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go @@ -297,7 +297,7 @@ func AddFlyteCustomizationsToContainer(ctx context.Context, parameters template. if parameters.IncludeConsoleURL { consoleURL = parameters.TaskExecMetadata.GetConsoleURL() } - container.Env, container.EnvFrom = DecorateEnvVars(ctx, container.Env, parameters.TaskExecMetadata.GetEnvironmentVariables(), parameters.TaskExecMetadata.GetTaskExecutionID(), consoleURL) + container.Env, container.EnvFrom = DecorateEnvVars(ctx, container.Env, container.EnvFrom, parameters.TaskExecMetadata.GetEnvironmentVariables(), parameters.TaskExecMetadata.GetTaskExecutionID(), consoleURL) // retrieve platformResources and overrideResources to use when aggregating container resources platformResources := parameters.TaskExecMetadata.GetPlatformResources() diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go index 6aab57f7b3..4e609c72b2 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper_test.go @@ -695,3 +695,40 @@ func TestAddFlyteCustomizationsToContainer_ValidateExistingResources(t *testing. assert.True(t, container.Resources.Requests.Cpu().Equal(resource.MustParse("10"))) assert.True(t, container.Resources.Limits.Cpu().Equal(resource.MustParse("10"))) } + +func TestAddFlyteCustomizationsToContainer_ValidateEnvFrom(t *testing.T) { + configMapSource := v1.EnvFromSource{ + ConfigMapRef: &v1.ConfigMapEnvSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "my-configmap", + }, + }, + } + secretSource := v1.EnvFromSource{ + SecretRef: &v1.SecretEnvSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "my-secret", + }, + }, + } + + container := &v1.Container{ + Command: []string{ + "{{ .Input }}", + }, + Args: []string{ + "{{ .OutputPrefix }}", + }, + EnvFrom: []v1.EnvFromSource{ + configMapSource, + secretSource, + }, + } + + err := AddFlyteCustomizationsToContainer(context.TODO(), getTemplateParametersForTest(nil, nil, false, ""), ResourceCustomizationModeEnsureExistingResourcesInRange, container) + assert.NoError(t, err) + + assert.Len(t, container.EnvFrom, 2) + assert.Equal(t, container.EnvFrom[0], configMapSource) + assert.Equal(t, container.EnvFrom[1], secretSource) +} diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go index f26146435a..34e13adfa8 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds.go @@ -127,7 +127,7 @@ func GetExecutionEnvVars(id pluginsCore.TaskExecutionID, consoleURL string) []v1 return envVars } -func DecorateEnvVars(ctx context.Context, envVars []v1.EnvVar, taskEnvironmentVariables map[string]string, id pluginsCore.TaskExecutionID, consoleURL string) ([]v1.EnvVar, []v1.EnvFromSource) { +func DecorateEnvVars(ctx context.Context, envVars []v1.EnvVar, envFroms []v1.EnvFromSource, taskEnvironmentVariables map[string]string, id pluginsCore.TaskExecutionID, consoleURL string) ([]v1.EnvVar, []v1.EnvFromSource) { envVars = append(envVars, GetContextEnvVars(ctx)...) envVars = append(envVars, GetExecutionEnvVars(id, consoleURL)...) @@ -142,8 +142,6 @@ func DecorateEnvVars(ctx context.Context, envVars []v1.EnvVar, taskEnvironmentVa envVars = append(envVars, v1.EnvVar{Name: k, Value: value}) } - envFroms := []v1.EnvFromSource{} - for _, secretName := range config.GetK8sPluginConfig().DefaultEnvFromSecrets { optional := true secretRef := v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: secretName}, Optional: &optional} diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go index 9a6f302cb9..4015a8d9b8 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go @@ -330,7 +330,7 @@ func TestDecorateEnvVars(t *testing.T) { DefaultEnvVars: tt.additionEnvVar, DefaultEnvVarsFromEnv: tt.additionEnvVarFromEnv, })) - if got, _ := DecorateEnvVars(ctx, tt.args.envVars, tt.executionEnvVar, tt.args.id, tt.consoleURL); !reflect.DeepEqual(got, tt.want) { + if got, _ := DecorateEnvVars(ctx, tt.args.envVars, nil, tt.executionEnvVar, tt.args.id, tt.consoleURL); !reflect.DeepEqual(got, tt.want) { t.Errorf("DecorateEnvVars() = %v, want %v", got, tt.want) } }) diff --git a/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go b/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go index 50445d31b0..1eaef150d0 100644 --- a/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go +++ b/flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go @@ -138,7 +138,7 @@ func UpdateBatchInputForArray(_ context.Context, batchInput *batch.SubmitJobInpu func getEnvVarsForTask(ctx context.Context, execID pluginCore.TaskExecutionID, containerEnvVars []*core.KeyValuePair, defaultEnvVars map[string]string) []v1.EnvVar { - envVars, _ := flytek8s.DecorateEnvVars(ctx, flytek8s.ToK8sEnvVar(containerEnvVars), nil, execID, "") + envVars, _ := flytek8s.DecorateEnvVars(ctx, flytek8s.ToK8sEnvVar(containerEnvVars), nil, nil, execID, "") m := make(map[string]string, len(envVars)) for _, envVar := range envVars { m[envVar.Name] = envVar.Value From 4cb1473543c5b07eadd6ff3256801cf95243a9df Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Fri, 21 Jun 2024 17:14:22 -0400 Subject: [PATCH 29/30] fix broken mermaid diagrams (#5498) Signed-off-by: Niels Bantilan --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index ae4400dd31..3eff593393 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -298,7 +298,7 @@ # Sphinx-mermaid config mermaid_output_format = "raw" mermaid_version = "latest" -mermaid_init_js = "mermaid.initialize({startOnLoad:false});" +mermaid_init_js = "mermaid.initialize({startOnLoad:true});" # Makes it so that only the command is copied, not the output copybutton_prompt_text = "$ " From f54b74edc964a5af69cabeb2172874c6d6c7966c Mon Sep 17 00:00:00 2001 From: "Fabio M. Graetz, Ph.D" Date: Sat, 22 Jun 2024 00:38:06 +0200 Subject: [PATCH 30/30] Fix: replace with in OSS docs (#5501) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio Grätz Co-authored-by: Fabio Grätz --- flytectl/cmd/update/project.go | 4 ++-- flytectl/docs/source/gen/flytectl_update_project.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 38f959ba38..f6196e35ff 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -73,7 +73,7 @@ For example, to archive a project: :: - $ uctl update project --file update.yaml --archive + $ flytectl update project --file update.yaml --archive And to activate (unarchive) the same project: @@ -85,7 +85,7 @@ And to activate (unarchive) the same project: :: - $ uctl update project --file update.yaml --archive + $ flytectl update project --file update.yaml --archive Note that when using a *yaml* file, the *activate* flag is not used. Instead, the *archive* flag is used for *both* archiving and activating (unarchiving) with the difference being in the *state* field of the *yaml* file. diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 5d27380478..63a3c4ebaf 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -67,7 +67,7 @@ For example, to archive a project: :: - $ uctl update project --file update.yaml --archive + $ flytectl update project --file update.yaml --archive And to activate (unarchive) the same project: @@ -79,7 +79,7 @@ And to activate (unarchive) the same project: :: - $ uctl update project --file update.yaml --archive + $ flytectl update project --file update.yaml --archive Note that when using a *yaml* file, the *activate* flag is not used. Instead, the *archive* flag is used for *both* archiving and activating (unarchiving) with the difference being in the *state* field of the *yaml* file.