diff --git a/openapi/v2/service.swagger.yaml b/openapi/v2/service.swagger.yaml index 8ce6ff74..277d8995 100644 --- a/openapi/v2/service.swagger.yaml +++ b/openapi/v2/service.swagger.yaml @@ -3855,155 +3855,6 @@ paths: tags: - "\U0001F4A7 VDP" x-stage: beta - /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/trigger: - post: - summary: Trigger a pipeline - description: |- - Triggers the execution of a pipeline synchronously, i.e., the result is - sent back to the namespace right after the data is processed. This method is - intended for real-time inference when low latency is of concern. - - The pipeline is identified by its resource name, formed by the parent namespace - and ID of the pipeline. - - For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). - operationId: PipelinePublicService_TriggerNamespacePipeline - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/TriggerNamespacePipelineResponse' - "401": - description: Returned when the client credentials are not valid. - schema: {} - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/rpc.Status' - parameters: - - name: namespaceId - description: Namespace ID - in: path - required: true - type: string - - name: pipelineId - description: Pipeline ID - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - $ref: '#/definitions/TriggerNamespacePipelineBody' - - name: Instill-Requester-Uid - description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to - in: header - required: false - type: string - tags: - - "\U0001F4A7 VDP" - /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/trigger-stream: - post: - summary: Trigger a pipeline via streaming - description: |- - Triggers the execution of a pipeline asynchronously and streams back the response. - This method is intended for real-time inference when low latency is of concern - and the response needs to be processed incrementally. - - The pipeline is identified by its resource name, formed by the parent namespace - and ID of the pipeline. - operationId: PipelinePublicService_TriggerNamespacePipelineWithStream - responses: - "200": - description: A successful response.(streaming responses) - schema: - type: object - properties: - result: - $ref: '#/definitions/TriggerNamespacePipelineWithStreamResponse' - error: - $ref: '#/definitions/rpc.Status' - title: Stream result of TriggerNamespacePipelineWithStreamResponse - "401": - description: Returned when the client credentials are not valid. - schema: {} - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/rpc.Status' - parameters: - - name: namespaceId - description: Namespace ID - in: path - required: true - type: string - - name: pipelineId - description: Pipeline ID - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - $ref: '#/definitions/TriggerNamespacePipelineWithStreamBody' - - name: Instill-Requester-Uid - description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to - in: header - required: false - type: string - tags: - - "\U0001F4A7 VDP" - /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/trigger-async: - post: - summary: Trigger a pipeline asynchronously - description: |- - Triggers the execution of a pipeline asynchronously, i.e., the result - contains the necessary information to access the result and status of the - operation. This method is intended for cases that require long-running - workloads. - - The pipeline is identified by its resource name, formed by the parent namespace - and ID of the pipeline. - - For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). - operationId: PipelinePublicService_TriggerAsyncNamespacePipeline - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/TriggerAsyncNamespacePipelineResponse' - "401": - description: Returned when the client credentials are not valid. - schema: {} - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/rpc.Status' - parameters: - - name: namespaceId - description: Namespace ID - in: path - required: true - type: string - - name: pipelineId - description: Pipeline ID - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - $ref: '#/definitions/TriggerAsyncNamespacePipelineBody' - - name: Instill-Requester-Uid - description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to - in: header - required: false - type: string - tags: - - "\U0001F4A7 VDP" /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/releases: get: summary: List the releases in a pipeline @@ -4302,9 +4153,102 @@ paths: tags: - "\U0001F4A7 VDP" x-stage: beta + /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/trigger: + post: + summary: Trigger a pipeline + description: |- + Triggers the execution of a pipeline synchronously, i.e., the result is + sent back to the namespace right after the data is processed. This method is + intended for real-time inference when low latency is of concern. + + The pipeline is identified by its resource name, formed by the parent namespace + and ID of the pipeline. + + For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). + operationId: PipelinePublicService_TriggerNamespacePipeline + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/TriggerNamespacePipelineResponse' + "401": + description: Returned when the client credentials are not valid. + schema: {} + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpc.Status' + parameters: + - name: namespaceId + description: Namespace ID + in: path + required: true + type: string + - name: pipelineId + description: Pipeline ID + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/TriggerNamespacePipelineBody' + - name: Instill-Requester-Uid + description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to + in: header + required: false + type: string + tags: + - "\U0001F4A7 VDP" + x-stage: beta + /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}:trigger: + post: + summary: Trigger a pipeline + description: |- + Triggers the execution of a pipeline synchronously, i.e., the result is + sent back to the namespace right after the data is processed. This method is + intended for real-time inference when low latency is of concern. + + The pipeline is identified by its resource name, formed by the parent namespace + and ID of the pipeline. + + For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). + operationId: PipelinePublicService_TriggerNamespacePipeline2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/TriggerNamespacePipelineResponse' + "401": + description: Returned when the client credentials are not valid. + schema: {} + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpc.Status' + parameters: + - name: namespaceId + description: Namespace ID + in: path + required: true + type: string + - name: pipelineId + description: Pipeline ID + in: path + required: true + type: string + - name: Instill-Requester-Uid + description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to + in: header + required: false + type: string + tags: + - "\U0001F4A7 VDP" + x-stage: beta /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/releases/{releaseId}/trigger: post: - summary: Trigger a pipeline release + summary: Trigger a pipeline release with JSON description: |- Triggers the synchronous execution of of a pipeline. While the trigger endpoint (where the release version isn't specified) triggers the pipeline @@ -4354,23 +4298,23 @@ paths: type: string tags: - "\U0001F4A7 VDP" - /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/releases/{releaseId}/trigger-async: + /v1beta/namespaces/{namespaceId}/pipelines/{pipelineId}/releases/{releaseId}:trigger: post: - summary: Trigger a pipeline release asynchronously + summary: Trigger a pipeline release with JSON description: |- - Triggers the asynchronous execution of of a pipeline. While the trigger + Triggers the synchronous execution of of a pipeline. While the trigger endpoint (where the release version isn't specified) triggers the pipeline at its latest release, this method allows the client to specified any committed release. The pipeline is identified by its resource name, formed by its parent namespace and ID. - operationId: PipelinePublicService_TriggerAsyncNamespacePipelineRelease + operationId: PipelinePublicService_TriggerNamespacePipelineRelease2 responses: "200": description: A successful response. schema: - $ref: '#/definitions/TriggerAsyncNamespacePipelineReleaseResponse' + $ref: '#/definitions/TriggerNamespacePipelineReleaseResponse' "401": description: Returned when the client credentials are not valid. schema: {} @@ -4394,11 +4338,6 @@ paths: in: path required: true type: string - - name: body - in: body - required: true - schema: - $ref: '#/definitions/TriggerAsyncNamespacePipelineReleaseBody' - name: Instill-Requester-Uid description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to in: header @@ -9785,62 +9724,6 @@ definitions: description: |- TriggerAsyncNamespaceModelResponse contains the information to access the status of an asynchronous model inference. - TriggerAsyncNamespacePipelineBody: - type: object - properties: - inputs: - type: array - items: - type: object - description: Pipeline input parameters, it will be deprecated soon. - data: - type: array - items: - type: object - $ref: '#/definitions/TriggerData' - title: Data - description: |- - TriggerNamespacePipelineRequest represents a request to trigger a user-owned - pipeline synchronously. - TriggerAsyncNamespacePipelineReleaseBody: - type: object - properties: - inputs: - type: array - items: - type: object - description: Pipeline input parameters, it will be deprecated soon. - data: - type: array - items: - type: object - $ref: '#/definitions/TriggerData' - title: Data - description: |- - TriggerNamespacePipelineReleaseRequest represents a request to trigger a pinned - release of a user-owned pipeline asynchronously. - TriggerAsyncNamespacePipelineReleaseResponse: - type: object - properties: - operation: - description: Long-running operation information. - readOnly: true - allOf: - - $ref: '#/definitions/longrunning.Operation' - description: |- - TriggerAsyncNamespacePipelineReleaseResponse contains the information to access - the status of an asynchronous pipeline execution. - TriggerAsyncNamespacePipelineResponse: - type: object - properties: - operation: - description: Long-running operation information. - readOnly: true - allOf: - - $ref: '#/definitions/longrunning.Operation' - description: |- - TriggerAsyncNamespacePipelineResponse contains the information to access the - status of an asynchronous pipeline execution. TriggerData: type: object properties: @@ -10024,40 +9907,6 @@ definitions: description: |- TriggerNamespacePipelineResponse contains the pipeline execution results, i.e., the multiple model inference outputs. - TriggerNamespacePipelineWithStreamBody: - type: object - properties: - inputs: - type: array - items: - type: object - description: Pipeline input parameters, it will be deprecated soon. - data: - type: array - items: - type: object - $ref: '#/definitions/TriggerData' - title: Data - description: |- - TriggerNamespacePipelineWithStreamRequest represents a request to trigger a user-owned - pipeline synchronously and streams back the results. - TriggerNamespacePipelineWithStreamResponse: - type: object - properties: - outputs: - type: array - items: - type: object - description: Model inference outputs. - readOnly: true - metadata: - description: Traces of the pipeline inference. - readOnly: true - allOf: - - $ref: '#/definitions/TriggerMetadata' - description: |- - TriggerNamespacePipelineWithStreamResponse contains the pipeline execution results, i.e., - the multiple model inference outputs. UndeployNamespaceModelAdminResponse: type: object title: UndeployNamespaceModelAdminResponse represents a response for a undeployed model diff --git a/vdp/pipeline/v1beta/format.proto b/vdp/pipeline/v1beta/format.proto new file mode 100644 index 00000000..85ae7a6a --- /dev/null +++ b/vdp/pipeline/v1beta/format.proto @@ -0,0 +1,119 @@ +syntax = "proto3"; + +package vdp.pipeline.v1beta; + +import "google/protobuf/struct.proto"; + +// JsonValue represents a JSON value. +message JsonValue { + // The JSON value as a Struct. + google.protobuf.Struct value = 1; +} + +// StringValue represents a string value. +message StringValue { + // The string value. + string value = 1; +} + +// IntValue represents an integer value. +message IntValue { + // The integer value. + int32 value = 1; +} + +// DoubleValue represents a double value. +message DoubleValue { + // The double value. + double value = 1; +} + +// BoolValue represents a boolean value. +message BoolValue { + // The boolean value. + bool value = 1; +} + +// FileValue represents a generic file value. +message FileValue { + // The file value as bytes. + bytes value = 1; +} + +// DocumentValue represents a document file value. +message DocumentValue { + // The document file value as bytes. + bytes value = 1; +} + +// ImageValue represents an image file value. +message ImageValue { + // The image file value as bytes. + bytes value = 1; +} + +// AudioValue represents an audio file value. +message AudioValue { + // The audio file value as bytes. + bytes value = 1; +} + +// VideoValue represents a video file value. +message VideoValue { + // The video file value as bytes. + bytes value = 1; +} + +// StringArrayValue represents an array of string values. +message StringArrayValue { + // The array of string values. + repeated string value = 1; +} + +// IntArrayValue represents an array of integer values. +message IntArrayValue { + // The array of integer values. + repeated int32 value = 1; +} + +// DoubleArrayValue represents an array of double values. +message DoubleArrayValue { + // The array of double values. + repeated double value = 1; +} + +// BoolArrayValue represents an array of boolean values. +message BoolArrayValue { + // The array of boolean values. + repeated bool value = 1; +} + +// FileArrayValue represents an array of generic file values. +message FileArrayValue { + // The array of generic file values as bytes. + repeated bytes value = 1; +} + +// DocumentArrayValue represents an array of document file values. +message DocumentArrayValue { + // The array of document file values as bytes. + repeated bytes value = 1; +} + +// ImageArrayValue represents an array of image file values. +message ImageArrayValue { + // The array of image file values as bytes. + repeated bytes value = 1; +} + +// AudioArrayValue represents an array of audio file values. +message AudioArrayValue { + // The array of audio file values as bytes. + repeated bytes value = 1; +} + +// VideoArrayValue represents an array of video file values. +message VideoArrayValue { + // The array of video file values as bytes. + repeated bytes value = 1; +} diff --git a/vdp/pipeline/v1beta/pipeline.proto b/vdp/pipeline/v1beta/pipeline.proto index 68240123..f467d6da 100644 --- a/vdp/pipeline/v1beta/pipeline.proto +++ b/vdp/pipeline/v1beta/pipeline.proto @@ -170,38 +170,6 @@ message Pipeline { Endpoints endpoints = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// TriggerMetadata contains the traces of the pipeline inference. -message TriggerMetadata { - // Each key in the `traces` object is a component ID. The value is a Trace - // object containing the execution details. - map traces = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Trace contains the execution details of a component. -message Trace { - // Status holds the the component execution outcome. - enum Status { - // Unspecified. - STATUS_UNSPECIFIED = 0; - // Successfully completed. - STATUS_COMPLETED = 1; - // Skipped. - STATUS_SKIPPED = 2; - // Aborted with error. - STATUS_ERROR = 3; - } - // Statuses contains an execution status per input. - repeated Status statuses = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Component inputs. - repeated google.protobuf.Struct inputs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Component outputs. - repeated google.protobuf.Struct outputs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Error details. - google.protobuf.Struct error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Computation time in seconds. - float compute_time_in_seconds = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // GetHubStatsRequest represents a request to get hub stats. message GetHubStatsRequest {} @@ -537,74 +505,6 @@ message SendNamespacePipelineReleaseEventResponse { google.protobuf.Struct data = 1; } -// TriggerNamespacePipelineRequest represents a request to trigger a user-owned -// pipeline synchronously. -message TriggerNamespacePipelineRequest { - // Namespace ID - string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline ID - string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 3 [(google.api.field_behavior) = REQUIRED]; - // Data - repeated TriggerData data = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// TriggerNamespacePipelineResponse contains the pipeline execution results, i.e., -// the multiple model inference outputs. -message TriggerNamespacePipelineResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// TriggerNamespacePipelineWithStreamRequest represents a request to trigger a user-owned -// pipeline synchronously and streams back the results. -message TriggerNamespacePipelineWithStreamRequest { - // Namespace ID - string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline ID - string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 3 [(google.api.field_behavior) = OPTIONAL]; - // Data - repeated TriggerData data = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// TriggerNamespacePipelineWithStreamResponse contains the pipeline execution results, i.e., -// the multiple model inference outputs. -message TriggerNamespacePipelineWithStreamResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// TriggerNamespacePipelineRequest represents a request to trigger a user-owned -// pipeline synchronously. -message TriggerAsyncNamespacePipelineRequest { - // Namespace ID - string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline ID - string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 3 [(google.api.field_behavior) = OPTIONAL]; - // Data - repeated TriggerData data = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// TriggerAsyncNamespacePipelineResponse contains the information to access the -// status of an asynchronous pipeline execution. -message TriggerAsyncNamespacePipelineResponse { - // Long-running operation information. - google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // CreateNamespacePipelineReleaseRequest represents a request to release a version // in a user-owned pipeline. message CreateNamespacePipelineReleaseRequest { @@ -724,59 +624,6 @@ message DeleteNamespacePipelineReleaseRequest { // DeleteNamespacePipelineReleaseResponse is an empty response. message DeleteNamespacePipelineReleaseResponse {} -// TriggerNamespacePipelineReleaseRequest represents a request to trigger a pinned -// release of a user-owned pipeline. -message TriggerNamespacePipelineReleaseRequest { - // Namespace ID - string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline ID - string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Release ID - string release_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 4 [(google.api.field_behavior) = OPTIONAL]; - // Data - repeated TriggerData data = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// TriggerNamespacePipelineReleaseResponse contains the pipeline execution results, -// i.e., the multiple model inference outputs. -message TriggerNamespacePipelineReleaseResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// TriggerNamespacePipelineReleaseRequest represents a request to trigger a pinned -// release of a user-owned pipeline asynchronously. -message TriggerAsyncNamespacePipelineReleaseRequest { - // Namespace ID - string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline ID - string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Release ID - string release_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Data - repeated TriggerData data = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// TriggerAsyncNamespacePipelineReleaseResponse contains the information to access -// the status of an asynchronous pipeline execution. -message TriggerAsyncNamespacePipelineReleaseResponse { - // Long-running operation information. - google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // CreateUserPipelineRequest represents a request from a user to create a // pipeline. message CreateUserPipelineRequest { @@ -959,97 +806,6 @@ message RenameUserPipelineResponse { Pipeline pipeline = 1; } -// TriggerUserPipelineRequest represents a request to trigger a user-owned -// pipeline synchronously. -message TriggerUserPipelineRequest { - // The resource name of the pipeline, which allows its access by parent user - // and ID. - // - Format: `users/{user.id}/pipelines/{pipeline.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "user_pipeline_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerUserPipelineResponse contains the pipeline execution results, i.e., -// the multiple model inference outputs. -message TriggerUserPipelineResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2; -} - -// TriggerUserPipelineWithStreamRequest represents a request to trigger a user-owned -// pipeline synchronously and streams back the results. -message TriggerUserPipelineWithStreamRequest { - // The resource name of the pipeline, which allows its access by parent user - // and ID. - // - Format: `users/{user.id}/pipelines/{pipeline.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "user_pipeline_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerUserPipelineWithStreamResponse contains the pipeline execution results, i.e., -// the multiple model inference outputs. -message TriggerUserPipelineWithStreamResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2; -} - -// Data -message TriggerData { - // Variables - google.protobuf.Struct variable = 1 [(google.api.field_behavior) = OPTIONAL]; - // Variables - map secret = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// TriggerUserPipelineRequest represents a request to trigger a user-owned -// pipeline synchronously. -message TriggerAsyncUserPipelineRequest { - // The resource name of the pipeline, which allows its access by parent user - // and ID. - // - Format: `users/{user.id}/pipelines/{pipeline.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "user_pipeline_name"} - } - ]; - - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerAsyncUserPipelineResponse contains the information to access the -// status of an asynchronous pipeline execution. -message TriggerAsyncUserPipelineResponse { - // Long-running operation information. - google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // CreateUserPipelineReleaseRequest represents a request to release a version // in a user-owned pipeline. message CreateUserPipelineReleaseRequest { @@ -1215,61 +971,6 @@ message RenameUserPipelineReleaseResponse { PipelineRelease release = 1; } -// TriggerUserPipelineReleaseRequest represents a request to trigger a pinned -// release of a user-owned pipeline. -message TriggerUserPipelineReleaseRequest { - // The resource name of the pipeline release, which allows its access by - // parent pipeline and ID. - // - Format: `users/{user.id}/pipelines/{pipeline.id}/releases/{release.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "user_pipeline_release_name"} - } - ]; - - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerUserPipelineReleaseResponse contains the pipeline execution results, -// i.e., the multiple model inference outputs. -message TriggerUserPipelineReleaseResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2; -} - -// TriggerUserPipelineReleaseRequest represents a request to trigger a pinned -// release of a user-owned pipeline asynchronously. -message TriggerAsyncUserPipelineReleaseRequest { - // The resource name of the pipeline release, which allows its access by - // parent pipeline and ID. - // - Format: `users/{user.id}/pipelines/{pipeline.id}/releases/{release.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "user_pipeline_release_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerAsyncUserPipelineReleaseResponse contains the information to access -// the status of an asynchronous pipeline execution. -message TriggerAsyncUserPipelineReleaseResponse { - // Long-running operation information. - google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // CreateOrganizationPipelineRequest represents a request from an organization // to create a pipeline. message CreateOrganizationPipelineRequest { @@ -1443,88 +1144,6 @@ message RenameOrganizationPipelineResponse { Pipeline pipeline = 1; } -// TriggerOrganizationPipelineRequest represents a request to trigger an -// organization-owned pipeline synchronously. -message TriggerOrganizationPipelineRequest { - // The resource name of the pipeline, which allows its access by parent - // organization and ID. - // - Format: `organizations/{organization.id}/pipelines/{pipeline.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "organization_pipeline_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerOrganizationPipelineResponse contains the pipeline execution results, -// i.e., the multiple model inference outputs. -message TriggerOrganizationPipelineResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2; -} - -// TriggerOrganizationPipelineRequest represents a request to trigger an -// organization-owned pipeline synchronously. -message TriggerOrganizationPipelineStreamRequest { - // The resource name of the pipeline, which allows its access by parent - // organization and ID. - // - Format: `organizations/{organization.id}/pipelines/{pipeline.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "organization_pipeline_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerOrganizationPipelineResponse contains the pipeline execution results, -// i.e., the multiple model inference outputs. -message TriggerOrganizationPipelineStreamResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2; -} - -// TriggerOrganizationPipelineRequest represents a request to trigger an -// organization-owned pipeline synchronously. -message TriggerAsyncOrganizationPipelineRequest { - // The resource name of the pipeline, which allows its access by parent - // organization and ID. - // - Format: `organizations/{organization.id}/pipelines/{pipeline.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "organization_pipeline_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerAsyncOrganizationPipelineResponse contains the information to access -// the status of an asynchronous pipeline execution. -message TriggerAsyncOrganizationPipelineResponse { - // Long-running operation information. - google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // CreateOrganizationPipelineReleaseRequest represents a request to release a // version in an organization-owned pipeline. message CreateOrganizationPipelineReleaseRequest { @@ -1696,62 +1315,6 @@ message RenameOrganizationPipelineReleaseResponse { PipelineRelease release = 1; } -// TriggerOrganizationPipelineReleaseRequest represents a request to trigger a -// pinned release of an organization-owned pipeline. -message TriggerOrganizationPipelineReleaseRequest { - // The resource name of the pipeline release, which allows its access by - // parent pipeline and ID. - // - Format: - // `organizations/{organization.id}/pipelines/{pipeline.id}/releases/{release.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "organization_pipeline_release_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerOrganizationPipelineReleaseResponse contains the pipeline execution -// results, i.e., the multiple model inference outputs. -message TriggerOrganizationPipelineReleaseResponse { - // Model inference outputs. - repeated google.protobuf.Struct outputs = 1; - // Traces of the pipeline inference. - TriggerMetadata metadata = 2; -} - -// TriggerOrganizationPipelineReleaseRequest represents a request to trigger a -// pinned release of an organization-owned pipeline asynchronously. -message TriggerAsyncOrganizationPipelineReleaseRequest { - // The resource name of the pipeline release, which allows its access by - // parent pipeline and ID. - // - Format: - // `organizations/{organization.id}/pipelines/{pipeline.id}/releases/{release.id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - field_configuration: {path_param_name: "organization_pipeline_release_name"} - } - ]; - // Pipeline input parameters, it will be deprecated soon. - repeated google.protobuf.Struct inputs = 2; - // Data - repeated TriggerData data = 3; -} - -// TriggerAsyncOrganizationPipelineReleaseResponse contains the information to -// access the status of an asynchronous pipeline execution. -message TriggerAsyncOrganizationPipelineReleaseResponse { - // Long-running operation information. - google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // GetOperationRequest represents a request to query a long-running operation. message GetOperationRequest { // The name of the operation resource. Asynchronous methods will contain this diff --git a/vdp/pipeline/v1beta/pipeline_public_service.proto b/vdp/pipeline/v1beta/pipeline_public_service.proto index 8e1deee7..0f92b319 100644 --- a/vdp/pipeline/v1beta/pipeline_public_service.proto +++ b/vdp/pipeline/v1beta/pipeline_public_service.proto @@ -13,6 +13,7 @@ import "vdp/pipeline/v1beta/component_definition.proto"; import "vdp/pipeline/v1beta/integration.proto"; import "vdp/pipeline/v1beta/pipeline.proto"; import "vdp/pipeline/v1beta/secret.proto"; +import "vdp/pipeline/v1beta/trigger.proto"; // VDP // @@ -252,86 +253,6 @@ service PipelinePublicService { option (google.api.method_visibility).restriction = "INTERNAL"; } - // Trigger a pipeline - // - // Triggers the execution of a pipeline synchronously, i.e., the result is - // sent back to the namespace right after the data is processed. This method is - // intended for real-time inference when low latency is of concern. - // - // The pipeline is identified by its resource name, formed by the parent namespace - // and ID of the pipeline. - // - // For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). - rpc TriggerNamespacePipeline(TriggerNamespacePipelineRequest) returns (TriggerNamespacePipelineResponse) { - option (google.api.http) = { - post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/trigger" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - parameters: { - headers: { - name: "Instill-Requester-Uid" - description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" - type: STRING - } - } - }; - } - - // Trigger a pipeline via streaming - // - // Triggers the execution of a pipeline asynchronously and streams back the response. - // This method is intended for real-time inference when low latency is of concern - // and the response needs to be processed incrementally. - // - // The pipeline is identified by its resource name, formed by the parent namespace - // and ID of the pipeline. - rpc TriggerNamespacePipelineWithStream(TriggerNamespacePipelineWithStreamRequest) returns (stream TriggerNamespacePipelineWithStreamResponse) { - option (google.api.http) = { - post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/trigger-stream" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - parameters: { - headers: { - name: "Instill-Requester-Uid" - description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" - type: STRING - } - } - }; - } - - // Trigger a pipeline asynchronously - // - // Triggers the execution of a pipeline asynchronously, i.e., the result - // contains the necessary information to access the result and status of the - // operation. This method is intended for cases that require long-running - // workloads. - // - // The pipeline is identified by its resource name, formed by the parent namespace - // and ID of the pipeline. - // - // For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). - rpc TriggerAsyncNamespacePipeline(TriggerAsyncNamespacePipelineRequest) returns (TriggerAsyncNamespacePipelineResponse) { - option (google.api.http) = { - post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/trigger-async" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - parameters: { - headers: { - name: "Instill-Requester-Uid" - description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" - type: STRING - } - } - }; - } - // Create a pipeline release // // Commits the version of a pipeline, identified by its resource name, which @@ -440,19 +361,22 @@ service PipelinePublicService { }; } - // Trigger a pipeline release + // Trigger a pipeline // - // Triggers the synchronous execution of of a pipeline. While the trigger - // endpoint (where the release version isn't specified) triggers the pipeline - // at its latest release, this method allows the client to specified any - // committed release. + // Triggers the execution of a pipeline synchronously, i.e., the result is + // sent back to the namespace right after the data is processed. This method is + // intended for real-time inference when low latency is of concern. // - // The pipeline is identified by its resource name, formed by its parent namespace - // and ID. - rpc TriggerNamespacePipelineRelease(TriggerNamespacePipelineReleaseRequest) returns (TriggerNamespacePipelineReleaseResponse) { + // The pipeline is identified by its resource name, formed by the parent namespace + // and ID of the pipeline. + // + // For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). + rpc TriggerNamespacePipeline(TriggerNamespacePipelineRequest) returns (TriggerNamespacePipelineResponse) { option (google.api.http) = { - post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/releases/{release_id}/trigger" + post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/trigger" body: "*" + additional_bindings: [ + {post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}:trigger"}] }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: "💧 VDP" @@ -463,22 +387,65 @@ service PipelinePublicService { type: STRING } } + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } }; } - // Trigger a pipeline release asynchronously + // Trigger a pipeline (gRPC only) // - // Triggers the asynchronous execution of of a pipeline. While the trigger + // Triggers the execution of a pipeline synchronously, i.e., the result is + // sent back to the namespace right after the data is processed. This method is + // intended for real-time inference when low latency is of concern. + // + // The pipeline is identified by its resource name, formed by the parent namespace + // and ID of the pipeline. + // + // For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). + rpc TriggerNamespacePipelineWithMessage(TriggerNamespacePipelineWithMessageRequest) returns (TriggerNamespacePipelineWithMessageResponse) { + // Note: This API is only available via gRPC and is not exposed through + // HTTP/REST endpoints. It will not be included in the generated OpenAPI + // documentation. + option (google.api.method_visibility).restriction = "INTERNAL"; + } + + // Trigger a pipeline via streaming (gRPC only) + + // Triggers the execution of a pipeline and streams back the response + // incrementally. This method is intended for real-time inference scenarios + // that require low latency and the ability to process partial results as they + // become available. + + // The pipeline is identified by its resource name, formed by the parent + // namespace and ID of the pipeline. + + // Note: This API is only available via gRPC and is not exposed through + // HTTP/REST endpoints. It will not be included in the generated OpenAPI + // documentation. + rpc TriggerNamespacePipelineWithStream(TriggerNamespacePipelineWithStreamRequest) returns (stream TriggerNamespacePipelineWithStreamResponse) { + // Note: This API is only available via gRPC and is not exposed through + // HTTP/REST endpoints. It will not be included in the generated OpenAPI + // documentation. + option (google.api.method_visibility).restriction = "INTERNAL"; + } + + // Trigger a pipeline release with JSON + // + // Triggers the synchronous execution of of a pipeline. While the trigger // endpoint (where the release version isn't specified) triggers the pipeline // at its latest release, this method allows the client to specified any // committed release. // // The pipeline is identified by its resource name, formed by its parent namespace // and ID. - rpc TriggerAsyncNamespacePipelineRelease(TriggerAsyncNamespacePipelineReleaseRequest) returns (TriggerAsyncNamespacePipelineReleaseResponse) { + rpc TriggerNamespacePipelineRelease(TriggerNamespacePipelineReleaseRequest) returns (TriggerNamespacePipelineReleaseResponse) { option (google.api.http) = { - post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/releases/{release_id}/trigger-async" + post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/releases/{release_id}/trigger" body: "*" + additional_bindings: [ + {post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/releases/{release_id}:trigger"}] }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: "💧 VDP" @@ -492,6 +459,42 @@ service PipelinePublicService { }; } + // Trigger a pipeline release (gRPC only) + // + // Triggers the synchronous execution of of a pipeline. While the trigger + // endpoint (where the release version isn't specified) triggers the pipeline + // at its latest release, this method allows the client to specified any + // committed release. + // + // The pipeline is identified by its resource name, formed by its parent namespace + // and ID. + rpc TriggerNamespacePipelineReleaseWithMessage(TriggerNamespacePipelineReleaseWithMessageRequest) returns (TriggerNamespacePipelineReleaseWithMessageResponse) { + // Note: This API is only available via gRPC and is not exposed through + // HTTP/REST endpoints. It will not be included in the generated OpenAPI + // documentation. + option (google.api.method_visibility).restriction = "INTERNAL"; + } + + // Trigger a pipeline release via streaming (gRPC only) + + // Triggers the execution of a specific pipeline release and streams back the + // response incrementally. This method is intended for real-time inference + // scenarios that require low latency and the ability to process partial + // results as they become available. + + // The pipeline release is identified by its resource name, formed by the + // parent namespace, pipeline ID, and release ID. + + // Note: This API is only available via gRPC and is not exposed through + // HTTP/REST endpoints. It will not be included in the generated OpenAPI + // documentation. + rpc TriggerNamespacePipelineReleaseWithStream(TriggerNamespacePipelineReleaseWithStreamRequest) returns (stream TriggerNamespacePipelineReleaseWithStreamResponse) { + // Note: This API is only available via gRPC and is not exposed through + // HTTP/REST endpoints. It will not be included in the generated OpenAPI + // documentation. + option (google.api.method_visibility).restriction = "INTERNAL"; + } + // Create a secret // // Creates a new secret under the parenthood of an namespace. @@ -574,13 +577,226 @@ service PipelinePublicService { }; } - // List component definitions + // List component definitions + // + // Returns a paginated list of component definitions, regardless their type. + // This offers a single source of truth, with pagination and filter + // capabilities, for the components that might be used in a VDP pipeline. + rpc ListComponentDefinitions(ListComponentDefinitionsRequest) returns (ListComponentDefinitionsResponse) { + option (google.api.http) = {get: "/v1beta/component-definitions"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // Get the details of a long-running operation + // + // This method allows requesters to request the status and outcome of + // long-running operations such as asynchronous pipeline triggers. + rpc GetOperation(GetOperationRequest) returns (GetOperationResponse) { + option (google.api.http) = {get: "/v1beta/operations/{operation_id}"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + parameters: { + headers: { + name: "Instill-Requester-Uid" + description: "Indicates the authenticated user is making the request on behalf of another entity, typically an organization they belong to" + type: STRING + } + } + }; + } + + // List Pipeline Runs + // + // Returns a paginated list of runs for a given pipeline. When the requester + // is the owner of the pipeline, they will be able to all the pipeline runs, + // regardless the requester. Other requesters will only be able to see the + // runs requested by themselves. + rpc ListPipelineRuns(ListPipelineRunsRequest) returns (ListPipelineRunsResponse) { + option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + parameters: { + headers: { + name: "Instill-Requester-Uid" + description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" + type: STRING + } + } + }; + } + + // List Component runs + // + // Returns the information of each component execution within a pipeline run. + rpc ListComponentRuns(ListComponentRunsRequest) returns (ListComponentRunsResponse) { + option (google.api.http) = {get: "/v1beta/pipeline-runs/{pipeline_run_id}/component-runs"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + parameters: { + headers: { + name: "Instill-Requester-Uid" + description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" + type: STRING + } + } + }; + } + + // List Pipeline Runs of a Namespace (user or organization) + // + // Returns a paginated list of runs for 1 or more pipelines. This is mainly used by dashboard. + // The requester can view all the runs by the requester across different pipelines. + rpc ListPipelineRunsByRequester(ListPipelineRunsByRequesterRequest) returns (ListPipelineRunsByRequesterResponse) { + option (google.api.http) = {get: "/v1beta/dashboard/pipelines/runs"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + parameters: { + headers: { + name: "Instill-Requester-Uid" + description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" + type: STRING + } + } + }; + } + + // List namespace connections + // + // Returns a paginated list of connections created by a namespace. + rpc ListNamespaceConnections(ListNamespaceConnectionsRequest) returns (ListNamespaceConnectionsResponse) { + option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/connections"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // Get a namespace connection + // + // Returns the details of a connection. + rpc GetNamespaceConnection(GetNamespaceConnectionRequest) returns (GetNamespaceConnectionResponse) { + option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // Create a connection + // + // Creates a connection under the ownership of a namespace. + rpc CreateNamespaceConnection(CreateNamespaceConnectionRequest) returns (CreateNamespaceConnectionResponse) { + option (google.api.http) = { + post: "/v1beta/namespaces/{namespace_id}/connections" + body: "connection" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // Update a connection + // + // Updates a connection with the supplied connection fields. + rpc UpdateNamespaceConnection(UpdateNamespaceConnectionRequest) returns (UpdateNamespaceConnectionResponse) { + option (google.api.http) = { + patch: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}" + body: "connection" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // Delete a connection + // + // Deletes a connection. + rpc DeleteNamespaceConnection(DeleteNamespaceConnectionRequest) returns (DeleteNamespaceConnectionResponse) { + option (google.api.http) = {delete: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // Test a connection + // + // Makes a request to the 3rd party app that the connection is configured to + // communicate with, and checks the result of the call. If the test fails, + // the response status and error message will provide more information about + // the failure. + // + // Note that this action might affect the quota or billing of the integrated + // account in the 3rd party app. + rpc TestNamespaceConnection(TestNamespaceConnectionRequest) returns (TestNamespaceConnectionResponse) { + option (google.api.http) = {post: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}/test"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // List pipelines that reference a connection + // + // Returns a paginated list with the IDs of the pipelines that reference a + // given connection. All the pipelines will belong to the same namespace as + // the connection. + rpc ListPipelineIDsByConnectionID(ListPipelineIDsByConnectionIDRequest) returns (ListPipelineIDsByConnectionIDResponse) { + option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}/referenced-pipelines"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // List integrations + // + // Returns a paginated list of available integrations. + rpc ListIntegrations(ListIntegrationsRequest) returns (ListIntegrationsResponse) { + option (google.api.http) = {get: "/v1beta/integrations"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "💧 VDP" + extensions: { + key: "x-stage" + value: {string_value: "beta"} + } + }; + } + + // Get an integration // - // Returns a paginated list of component definitions, regardless their type. - // This offers a single source of truth, with pagination and filter - // capabilities, for the components that might be used in a VDP pipeline. - rpc ListComponentDefinitions(ListComponentDefinitionsRequest) returns (ListComponentDefinitionsResponse) { - option (google.api.http) = {get: "/v1beta/component-definitions"}; + // Returns the details of an integration. + rpc GetIntegration(GetIntegrationRequest) returns (GetIntegrationResponse) { + option (google.api.http) = {get: "/v1beta/integrations/{integration_id}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: "💧 VDP" extensions: { @@ -590,25 +806,119 @@ service PipelinePublicService { }; } - // Get the details of a long-running operation + // The following endpoints are deprecated and will be removed in future versions: + // - TriggerAsyncNamespacePipeline + // - TriggerAsyncNamespacePipelineRelease + // - CreateUserPipeline + // - ListUserPipelines + // - GetUserPipeline + // - UpdateUserPipeline + // - DeleteUserPipeline + // - ValidateUserPipeline + // - RenameUserPipeline + // - TriggerUserPipelineStream + // - TriggerUserPipeline + // - TriggerUserPipelineWithStream + // - TriggerAsyncUserPipeline + // - CreateUserPipelineRelease + // - ListUserPipelineReleases + // - GetUserPipelineRelease + // - UpdateUserPipelineRelease + // - DeleteUserPipelineRelease + // - RestoreUserPipelineRelease + // - RenameUserPipelineRelease + // - TriggerUserPipelineRelease + // - TriggerAsyncUserPipelineRelease + // - CreateOrganizationPipeline + // - ListOrganizationPipelines + // - GetOrganizationPipeline + // - UpdateOrganizationPipeline + // - DeleteOrganizationPipeline + // - ValidateOrganizationPipeline + // - RenameOrganizationPipeline + // - TriggerOrganizationPipelineStream + // - TriggerOrganizationPipeline + // - TriggerAsyncOrganizationPipeline + // - CreateOrganizationPipelineRelease + // - ListOrganizationPipelineReleases + // - GetOrganizationPipelineRelease + // - UpdateOrganizationPipelineRelease + // - DeleteOrganizationPipelineRelease + // - RestoreOrganizationPipelineRelease + // - RenameOrganizationPipelineRelease + // - TriggerOrganizationPipelineRelease + // - TriggerAsyncOrganizationPipelineRelease + // - ListConnectorDefinitions + // - GetConnectorDefinition + // - ListOperatorDefinitions + // - GetOperatorDefinition + // - CheckName + // - CreateUserSecret + // - ListUserSecrets + // - GetUserSecret + // - UpdateUserSecret + // - DeleteUserSecret + // - CreateOrganizationSecret + // - ListOrganizationSecrets + // - GetOrganizationSecret + // - UpdateOrganizationSecret + // - DeleteOrganizationSecret + + // Trigger a pipeline asynchronously // - // This method allows requesters to request the status and outcome of - // long-running operations such as asynchronous pipeline triggers. - rpc GetOperation(GetOperationRequest) returns (GetOperationResponse) { - option (google.api.http) = {get: "/v1beta/operations/{operation_id}"}; + // Triggers the execution of a pipeline asynchronously, i.e., the result + // contains the necessary information to access the result and status of the + // operation. This method is intended for cases that require long-running + // workloads. + // + // The pipeline is identified by its resource name, formed by the parent namespace + // and ID of the pipeline. + // + // For more information, see [Run NamespacePipeline](https://www.instill.tech/docs/vdp/run). + rpc TriggerAsyncNamespacePipeline(TriggerAsyncNamespacePipelineRequest) returns (TriggerAsyncNamespacePipelineResponse) { + option (google.api.http) = { + post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/trigger-async" + body: "*" + }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" + tags: "Trigger" parameters: { headers: { name: "Instill-Requester-Uid" - description: "Indicates the authenticated user is making the request on behalf of another entity, typically an organization they belong to" + description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" type: STRING } } }; + option deprecated = true; + option (google.api.method_visibility).restriction = "INTERNAL"; } - // The following endpoints are all deprecated + // Triggers the asynchronous execution of of a pipeline. While the trigger + // endpoint (where the release version isn't specified) triggers the pipeline + // at its latest release, this method allows the client to specified any + // committed release. + // + // The pipeline is identified by its resource name, formed by its parent namespace + // and ID. + rpc TriggerAsyncNamespacePipelineRelease(TriggerAsyncNamespacePipelineReleaseRequest) returns (TriggerAsyncNamespacePipelineReleaseResponse) { + option (google.api.http) = { + post: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/releases/{release_id}/trigger-async" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Trigger" + parameters: { + headers: { + name: "Instill-Requester-Uid" + description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" + type: STRING + } + } + }; + option deprecated = true; + option (google.api.method_visibility).restriction = "INTERNAL"; + } // Create a new user pipeline // @@ -1334,199 +1644,4 @@ service PipelinePublicService { option deprecated = true; option (google.api.method_visibility).restriction = "INTERNAL"; } - - // List Pipeline Runs - // - // Returns a paginated list of runs for a given pipeline. When the requester - // is the owner of the pipeline, they will be able to all the pipeline runs, - // regardless the requester. Other requesters will only be able to see the - // runs requested by themselves. - rpc ListPipelineRuns(ListPipelineRunsRequest) returns (ListPipelineRunsResponse) { - option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - parameters: { - headers: { - name: "Instill-Requester-Uid" - description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" - type: STRING - } - } - }; - } - - // List Component runs - // - // Returns the information of each component execution within a pipeline run. - rpc ListComponentRuns(ListComponentRunsRequest) returns (ListComponentRunsResponse) { - option (google.api.http) = {get: "/v1beta/pipeline-runs/{pipeline_run_id}/component-runs"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - parameters: { - headers: { - name: "Instill-Requester-Uid" - description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" - type: STRING - } - } - }; - } - - // List Pipeline Runs of a Namespace (user or organization) - // - // Returns a paginated list of runs for 1 or more pipelines. This is mainly used by dashboard. - // The requester can view all the runs by the requester across different pipelines. - rpc ListPipelineRunsByRequester(ListPipelineRunsByRequesterRequest) returns (ListPipelineRunsByRequesterResponse) { - option (google.api.http) = {get: "/v1beta/dashboard/pipelines/runs"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - parameters: { - headers: { - name: "Instill-Requester-Uid" - description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" - type: STRING - } - } - }; - } - - // List namespace connections - // - // Returns a paginated list of connections created by a namespace. - rpc ListNamespaceConnections(ListNamespaceConnectionsRequest) returns (ListNamespaceConnectionsResponse) { - option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/connections"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // Get a namespace connection - // - // Returns the details of a connection. - rpc GetNamespaceConnection(GetNamespaceConnectionRequest) returns (GetNamespaceConnectionResponse) { - option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // Create a connection - // - // Creates a connection under the ownership of a namespace. - rpc CreateNamespaceConnection(CreateNamespaceConnectionRequest) returns (CreateNamespaceConnectionResponse) { - option (google.api.http) = { - post: "/v1beta/namespaces/{namespace_id}/connections" - body: "connection" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // Update a connection - // - // Updates a connection with the supplied connection fields. - rpc UpdateNamespaceConnection(UpdateNamespaceConnectionRequest) returns (UpdateNamespaceConnectionResponse) { - option (google.api.http) = { - patch: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}" - body: "connection" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // Delete a connection - // - // Deletes a connection. - rpc DeleteNamespaceConnection(DeleteNamespaceConnectionRequest) returns (DeleteNamespaceConnectionResponse) { - option (google.api.http) = {delete: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // Test a connection - // - // Makes a request to the 3rd party app that the connection is configured to - // communicate with, and checks the result of the call. If the test fails, - // the response status and error message will provide more information about - // the failure. - // - // Note that this action might affect the quota or billing of the integrated - // account in the 3rd party app. - rpc TestNamespaceConnection(TestNamespaceConnectionRequest) returns (TestNamespaceConnectionResponse) { - option (google.api.http) = {post: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}/test"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // List pipelines that reference a connection - // - // Returns a paginated list with the IDs of the pipelines that reference a - // given connection. All the pipelines will belong to the same namespace as - // the connection. - rpc ListPipelineIDsByConnectionID(ListPipelineIDsByConnectionIDRequest) returns (ListPipelineIDsByConnectionIDResponse) { - option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/connections/{connection_id}/referenced-pipelines"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // List integrations - // - // Returns a paginated list of available integrations. - rpc ListIntegrations(ListIntegrationsRequest) returns (ListIntegrationsResponse) { - option (google.api.http) = {get: "/v1beta/integrations"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } - - // Get an integration - // - // Returns the details of an integration. - rpc GetIntegration(GetIntegrationRequest) returns (GetIntegrationResponse) { - option (google.api.http) = {get: "/v1beta/integrations/{integration_id}"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "💧 VDP" - extensions: { - key: "x-stage" - value: {string_value: "beta"} - } - }; - } } diff --git a/vdp/pipeline/v1beta/trigger.proto b/vdp/pipeline/v1beta/trigger.proto new file mode 100644 index 00000000..1608918a --- /dev/null +++ b/vdp/pipeline/v1beta/trigger.proto @@ -0,0 +1,729 @@ +syntax = "proto3"; + +package vdp.pipeline.v1beta; + +// Google API +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +// Protocol Buffers Well-Known Types +import "google/longrunning/operations.proto"; +import "google/protobuf/struct.proto"; +// OpenAPI definition +import "protoc-gen-openapiv2/options/annotations.proto"; +// VDP definitions +import "vdp/pipeline/v1beta/format.proto"; + +// InputData represents the input data for a pipeline. +message InputData { + // Variables + // A map of variable names to their formatted data. + map variable = 1; + // Secrets + // A map of secret names to their values. + map secret = 2; +} + +// OutputData represents the output data for a pipeline. +message OutputData { + // Outputs + // A map of output names to their formatted data. + map output = 1; +} + +// FormatedData represents different types of data that can be used as variables in a pipeline +message FormatedData { + // Only one of the following fields will be set + oneof variable_data { + // Struct value + // Represents a JSON value. + JsonValue json = 1; + // String value + // Represents a string value. + StringValue string = 2; + // Integer value + // Represents an integer value. + IntValue int = 3; + // Double value + // Represents a double value. + DoubleValue double = 4; + // Boolean value + // Represents a boolean value. + BoolValue bool = 5; + // Generic file data + // Represents a generic file value. + FileValue file = 6; + // Document file data + // Represents a document file value. + DocumentValue document = 7; + // Image file data + // Represents an image file value. + ImageValue image = 8; + // Audio file data + // Represents an audio file value. + AudioValue audio = 9; + // Video file data + // Represents a video file value. + VideoValue video = 10; + // Array of strings + // Represents an array of string values. + StringArrayValue string_array = 11; + // Array of integers + // Represents an array of integer values. + IntArrayValue int_array = 12; + // Array of doubles + // Represents an array of double values. + DoubleArrayValue double_array = 13; + // Array of booleans + // Represents an array of boolean values. + BoolArrayValue bool_array = 14; + // Array of generic files + // Represents an array of generic file values. + FileArrayValue file_array = 15; + // Array of document files + // Represents an array of document file values. + DocumentArrayValue document_array = 16; + // Array of image files + // Represents an array of image file values. + ImageArrayValue image_array = 17; + // Array of audio files + // Represents an array of audio file values. + AudioArrayValue audio_array = 18; + // Array of video files + // Represents an array of video file values. + VideoArrayValue video_array = 19; + } +} + +// RunMetadata contains metadata about a pipeline run execution, including traces +// for each component's execution. +message RunMetadata { + // ComponentTrace represents the execution trace for a single component in the + // pipeline, containing a sequence of execution attempts. + message ComponentTrace { + // ExecutionTrace represents a single execution attempt of a component, + // capturing its status and execution details. + message ExecutionTrace { + // Status holds the the component execution outcome. + enum Status { + // Unspecified status - the default uninitialized state. + STATUS_UNSPECIFIED = 0; + // Successfully completed - the component finished execution without errors. + STATUS_COMPLETED = 1; + // Skipped - the component was not executed due to pipeline logic. + STATUS_SKIPPED = 2; + // Aborted with error - the component failed during execution. + STATUS_ERROR = 3; + } + + // The execution status of this trace. + Status status = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // TODO(huitang): Add input and output once we have the new format. + // // Component input. + // google.protobuf.Struct input = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // // Component output. + // google.protobuf.Struct output = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // // Error details. + // google.protobuf.Struct error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // List of execution traces for this component, representing multiple execution + // attempts if retries occurred. + repeated ExecutionTrace execution_traces = 1; + } + + // Each key in the `traces` object is a component ID. The value is a Trace + // object containing the execution details for that specific component. + map component_traces = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// TriggerNamespacePipelineRequest represents a request to trigger a user-owned +// pipeline synchronously. +message TriggerNamespacePipelineRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 3 [(google.api.field_behavior) = REQUIRED]; + // Data + repeated TriggerData data = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// TriggerNamespacePipelineResponse contains the pipeline execution results, i.e., +// the multiple model inference outputs. +message TriggerNamespacePipelineResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// TriggerNamespacePipelineWithMessageRequest represents a request to trigger a user-owned +// pipeline synchronously. +message TriggerNamespacePipelineWithMessageRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + reserved 3, 4; + // Data + repeated InputData data = 5 [(google.api.field_behavior) = REQUIRED]; + // Async Mode + bool async = 6; +} + +// TriggerNamespacePipelineWithMessageResponse contains the pipeline execution results, i.e., +// the multiple model inference outputs. +message TriggerNamespacePipelineWithMessageResponse { + reserved 1, 2; + // Pipeline outputs. + repeated OutputData data = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run metadata. + RunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run ID. + string run_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// TriggerNamespacePipelineWithStreamRequest represents a request to trigger a user-owned +// pipeline synchronously and streams back the results. +message TriggerNamespacePipelineWithStreamRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + // Data + repeated InputData data = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// TriggerNamespacePipelineWithStreamResponse contains the pipeline execution results, i.e., +// the multiple model inference outputs. +message TriggerNamespacePipelineWithStreamResponse { + // Pipeline outputs. + repeated OutputData data = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run metadata. + RunMetadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run ID. + string run_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// TriggerNamespacePipelineReleaseRequest represents a request to trigger a pinned +// release of a user-owned pipeline. +message TriggerNamespacePipelineReleaseRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + // Release ID + string release_id = 3 [(google.api.field_behavior) = REQUIRED]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 4 [(google.api.field_behavior) = OPTIONAL]; + // Data + repeated TriggerData data = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// TriggerNamespacePipelineReleaseResponse contains the pipeline execution results, +// i.e., the multiple model inference outputs. +message TriggerNamespacePipelineReleaseResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// TriggerNamespacePipelineReleaseWithMessageRequest represents a request to trigger a pinned +// release of a user-owned pipeline. +message TriggerNamespacePipelineReleaseWithMessageRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + // Release ID + string release_id = 3 [(google.api.field_behavior) = REQUIRED]; + reserved 4, 5; + // Data + repeated InputData data = 6 [(google.api.field_behavior) = REQUIRED]; + // Async Mode + bool async = 7; +} + +// TriggerNamespacePipelineReleaseWithMessageResponse contains the pipeline execution results, +// i.e., the multiple model inference outputs. +message TriggerNamespacePipelineReleaseWithMessageResponse { + reserved 1, 2, 3; + // Pipeline outputs. + repeated OutputData data = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run ID. + string run_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run metadata. + RunMetadata metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// TriggerNamespacePipelineReleaseWithStreamRequest represents a request to trigger a pinned +// release of a user-owned pipeline. +message TriggerNamespacePipelineReleaseWithStreamRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + // Release ID + string release_id = 3 [(google.api.field_behavior) = REQUIRED]; + // Data + repeated InputData data = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// TriggerNamespacePipelineReleaseWithStreamResponse contains the pipeline execution results, +// i.e., the multiple model inference outputs. +message TriggerNamespacePipelineReleaseWithStreamResponse { + // Pipeline outputs. + repeated OutputData data = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run metadata. + RunMetadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Run ID. + string run_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The following messages are deprecated and will be removed in future versions: +// - TriggerData: Data structure for pipeline triggers +// - TriggerMetadata: Metadata structure for pipeline triggers +// - Trace: Trace information for pipeline components +// - TriggerAsyncNamespacePipelineRequest: Asynchronous pipeline trigger for namespace-owned pipelines +// - TriggerAsyncNamespacePipelineResponse: Response containing async operation details +// - TriggerAsyncNamespacePipelineReleaseRequest: Asynchronous pipeline release trigger for namespace-owned pipelines +// - TriggerAsyncNamespacePipelineReleaseResponse: Response containing async operation details +// - TriggerAsyncOrganizationPipelineRequest: Asynchronous pipeline trigger for org-owned pipelines +// - TriggerAsyncOrganizationPipelineResponse: Response containing async operation details +// - TriggerAsyncOrganizationPipelineReleaseRequest: Asynchronous pipeline release trigger for org-owned pipelines +// - TriggerAsyncOrganizationPipelineReleaseResponse: Response containing async operation details +// - TriggerAsyncUserPipelineRequest: Asynchronous pipeline trigger for user-owned pipelines +// - TriggerAsyncUserPipelineResponse: Response containing async operation details +// - TriggerAsyncUserPipelineReleaseRequest: Asynchronous pipeline release trigger for user-owned pipelines +// - TriggerAsyncUserPipelineReleaseResponse: Response containing async operation details +// - TriggerOrganizationPipelineRequest: Synchronous pipeline trigger for org-owned pipelines +// - TriggerOrganizationPipelineResponse: Response containing pipeline execution results +// - TriggerOrganizationPipelineReleaseRequest: Synchronous pipeline release trigger for org-owned pipelines +// - TriggerOrganizationPipelineReleaseResponse: Response containing pipeline release execution results +// - TriggerOrganizationPipelineStreamRequest: Streaming pipeline trigger for org-owned pipelines +// - TriggerOrganizationPipelineStreamResponse: Streaming response with pipeline results +// - TriggerUserPipelineRequest: Synchronous pipeline trigger for user-owned pipelines +// - TriggerUserPipelineResponse: Response containing pipeline execution results +// - TriggerUserPipelineReleaseRequest: Synchronous pipeline release trigger for user-owned pipelines +// - TriggerUserPipelineReleaseResponse: Response containing pipeline release execution results +// - TriggerUserPipelineWithStreamRequest: Streaming pipeline trigger for user-owned pipelines +// - TriggerUserPipelineWithStreamResponse: Streaming response with pipeline results + +// Data +message TriggerData { + // Variables + google.protobuf.Struct variable = 1 [(google.api.field_behavior) = OPTIONAL]; + // Variables + map secret = 2 [(google.api.field_behavior) = OPTIONAL]; + + // This message is deprecated and will be removed in future versions. + // Please use the new message `Data` instead. + option deprecated = true; +} + +// TriggerMetadata contains the traces of the pipeline inference. +message TriggerMetadata { + // Each key in the `traces` object is a component ID. The value is a Trace + // object containing the execution details. + map traces = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This message is deprecated and will be removed in future versions. + // Please use the new message `RunMetadata` instead. + option deprecated = true; +} + +// Trace contains the execution details of a component. +message Trace { + // Status holds the the component execution outcome. + enum Status { + // Unspecified. + STATUS_UNSPECIFIED = 0; + // Successfully completed. + STATUS_COMPLETED = 1; + // Skipped. + STATUS_SKIPPED = 2; + // Aborted with error. + STATUS_ERROR = 3; + } + // Statuses contains an execution status per input. + repeated Status statuses = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Component inputs. + repeated google.protobuf.Struct inputs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Component outputs. + repeated google.protobuf.Struct outputs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Error details. + google.protobuf.Struct error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Computation time in seconds. + float compute_time_in_seconds = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This message is deprecated and will be removed in future versions. + // Please use the new message `RunMetadataComponentTrace` instead. + option deprecated = true; +} + +// TriggerNamespacePipelineRequest represents a request to trigger a user-owned +// pipeline synchronously. +message TriggerAsyncNamespacePipelineRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 3 [(google.api.field_behavior) = OPTIONAL]; + // Data + repeated TriggerData data = 4 [(google.api.field_behavior) = OPTIONAL]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerAsyncNamespacePipelineResponse contains the information to access the +// status of an asynchronous pipeline execution. +message TriggerAsyncNamespacePipelineResponse { + // Long-running operation information. + google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerNamespacePipelineReleaseRequest represents a request to trigger a pinned +// release of a user-owned pipeline asynchronously. +message TriggerAsyncNamespacePipelineReleaseRequest { + // Namespace ID + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // Pipeline ID + string pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + // Release ID + string release_id = 3 [(google.api.field_behavior) = REQUIRED]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 4 [(google.api.field_behavior) = OPTIONAL]; + // Data + repeated TriggerData data = 5 [(google.api.field_behavior) = OPTIONAL]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerAsyncNamespacePipelineReleaseResponse contains the information to access +// the status of an asynchronous pipeline execution. +message TriggerAsyncNamespacePipelineReleaseResponse { + // Long-running operation information. + google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineRequest represents a request to trigger a user-owned +// pipeline synchronously. +message TriggerUserPipelineRequest { + // The resource name of the pipeline, which allows its access by parent user + // and ID. + // - Format: `users/{user.id}/pipelines/{pipeline.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "user_pipeline_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineResponse contains the pipeline execution results, i.e., +// the multiple model inference outputs. +message TriggerUserPipelineResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineWithStreamRequest represents a request to trigger a user-owned +// pipeline synchronously and streams back the results. +message TriggerUserPipelineWithStreamRequest { + // The resource name of the pipeline, which allows its access by parent user + // and ID. + // - Format: `users/{user.id}/pipelines/{pipeline.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "user_pipeline_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineWithStreamResponse contains the pipeline execution results, i.e., +// the multiple model inference outputs. +message TriggerUserPipelineWithStreamResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineRequest represents a request to trigger a user-owned +// pipeline synchronously. +message TriggerAsyncUserPipelineRequest { + // The resource name of the pipeline, which allows its access by parent user + // and ID. + // - Format: `users/{user.id}/pipelines/{pipeline.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "user_pipeline_name"} + } + ]; + + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerAsyncUserPipelineResponse contains the information to access the +// status of an asynchronous pipeline execution. +message TriggerAsyncUserPipelineResponse { + // Long-running operation information. + google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineReleaseRequest represents a request to trigger a pinned +// release of a user-owned pipeline. +message TriggerUserPipelineReleaseRequest { + // The resource name of the pipeline release, which allows its access by + // parent pipeline and ID. + // - Format: `users/{user.id}/pipelines/{pipeline.id}/releases/{release.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "user_pipeline_release_name"} + } + ]; + + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineReleaseResponse contains the pipeline execution results, +// i.e., the multiple model inference outputs. +message TriggerUserPipelineReleaseResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerUserPipelineReleaseRequest represents a request to trigger a pinned +// release of a user-owned pipeline asynchronously. +message TriggerAsyncUserPipelineReleaseRequest { + // The resource name of the pipeline release, which allows its access by + // parent pipeline and ID. + // - Format: `users/{user.id}/pipelines/{pipeline.id}/releases/{release.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "user_pipeline_release_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerAsyncUserPipelineReleaseResponse contains the information to access +// the status of an asynchronous pipeline execution. +message TriggerAsyncUserPipelineReleaseResponse { + // Long-running operation information. + google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineRequest represents a request to trigger an +// organization-owned pipeline synchronously. +message TriggerOrganizationPipelineRequest { + // The resource name of the pipeline, which allows its access by parent + // organization and ID. + // - Format: `organizations/{organization.id}/pipelines/{pipeline.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "organization_pipeline_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineResponse contains the pipeline execution results, +// i.e., the multiple model inference outputs. +message TriggerOrganizationPipelineResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineRequest represents a request to trigger an +// organization-owned pipeline synchronously. +message TriggerOrganizationPipelineStreamRequest { + // The resource name of the pipeline, which allows its access by parent + // organization and ID. + // - Format: `organizations/{organization.id}/pipelines/{pipeline.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "organization_pipeline_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineResponse contains the pipeline execution results, +// i.e., the multiple model inference outputs. +message TriggerOrganizationPipelineStreamResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineRequest represents a request to trigger an +// organization-owned pipeline synchronously. +message TriggerAsyncOrganizationPipelineRequest { + // The resource name of the pipeline, which allows its access by parent + // organization and ID. + // - Format: `organizations/{organization.id}/pipelines/{pipeline.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/Pipeline"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "organization_pipeline_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerAsyncOrganizationPipelineResponse contains the information to access +// the status of an asynchronous pipeline execution. +message TriggerAsyncOrganizationPipelineResponse { + // Long-running operation information. + google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineReleaseRequest represents a request to trigger a +// pinned release of an organization-owned pipeline. +message TriggerOrganizationPipelineReleaseRequest { + // The resource name of the pipeline release, which allows its access by + // parent pipeline and ID. + // - Format: + // `organizations/{organization.id}/pipelines/{pipeline.id}/releases/{release.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "organization_pipeline_release_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineReleaseResponse contains the pipeline execution +// results, i.e., the multiple model inference outputs. +message TriggerOrganizationPipelineReleaseResponse { + // Model inference outputs. + repeated google.protobuf.Struct outputs = 1; + // Traces of the pipeline inference. + TriggerMetadata metadata = 2; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerOrganizationPipelineReleaseRequest represents a request to trigger a +// pinned release of an organization-owned pipeline asynchronously. +message TriggerAsyncOrganizationPipelineReleaseRequest { + // The resource name of the pipeline release, which allows its access by + // parent pipeline and ID. + // - Format: + // `organizations/{organization.id}/pipelines/{pipeline.id}/releases/{release.id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "api.instill.tech/PipelineRelease"}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + field_configuration: {path_param_name: "organization_pipeline_release_name"} + } + ]; + // Pipeline input parameters, it will be deprecated soon. + repeated google.protobuf.Struct inputs = 2; + // Data + repeated TriggerData data = 3; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +} + +// TriggerAsyncOrganizationPipelineReleaseResponse contains the information to +// access the status of an asynchronous pipeline execution. +message TriggerAsyncOrganizationPipelineReleaseResponse { + // Long-running operation information. + google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This message is deprecated and will be removed in future versions. + option deprecated = true; +}