From ac0be0522eef78e55da4c9b1e0cb867b6846d79f Mon Sep 17 00:00:00 2001 From: James Liu <37026441+zijianjoy@users.noreply.github.com> Date: Wed, 20 Apr 2022 15:59:12 -0700 Subject: [PATCH] chore(frontend): KFPv2: Update KFP UI API version to the latest (#7583) * chore(frontend): Update KFP UI API version to the latest, so it can accept RuntimeConfig when creating PipelineRun * npm run format * format auth --- frontend/src/apis/experiment/api.ts | 8 +- frontend/src/apis/job/api.ts | 117 +++++++++++++++++++++++++-- frontend/src/apis/pipeline/api.ts | 121 +++++++++++++++++++++++++++- frontend/src/apis/run/api.ts | 117 +++++++++++++++++++++++++-- 4 files changed, 345 insertions(+), 18 deletions(-) diff --git a/frontend/src/apis/experiment/api.ts b/frontend/src/apis/experiment/api.ts index 8d503f085c7..c3d6fb743b2 100644 --- a/frontend/src/apis/experiment/api.ts +++ b/frontend/src/apis/experiment/api.ts @@ -486,7 +486,7 @@ export const ExperimentServiceApiFetchParamCreator = function(configuration?: Co * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. * @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. @@ -721,7 +721,7 @@ export const ExperimentServiceApiFp = function(configuration?: Configuration) { * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. * @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. @@ -844,7 +844,7 @@ export const ExperimentServiceApiFactory = function( * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. * @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. @@ -964,7 +964,7 @@ export class ExperimentServiceApi extends BaseAPI { * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. * @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. diff --git a/frontend/src/apis/job/api.ts b/frontend/src/apis/job/api.ts index 9bdc005722f..7d0660b5418 100644 --- a/frontend/src/apis/job/api.ts +++ b/frontend/src/apis/job/api.ts @@ -308,11 +308,17 @@ export interface ApiPipelineSpec { */ pipeline_manifest?: string; /** - * The parameter user provide to inject to the pipeline JSON. If a default value of a parameter exist in the JSON, the value user provided here will replace. + * * @type {Array} * @memberof ApiPipelineSpec */ parameters?: Array; + /** + * + * @type {PipelineSpecRuntimeConfig} + * @memberof ApiPipelineSpec + */ + runtime_config?: PipelineSpecRuntimeConfig; } /** @@ -443,6 +449,26 @@ export enum JobMode { DISABLED = 'DISABLED', } +/** + * The runtime config of a PipelineSpec. + * @export + * @interface PipelineSpecRuntimeConfig + */ +export interface PipelineSpecRuntimeConfig { + /** + * The runtime parameters of the PipelineSpec. The parameters will be used to replace the placeholders at runtime. + * @type {{ [key: string]: ProtobufValue; }} + * @memberof PipelineSpecRuntimeConfig + */ + parameters?: { [key: string]: ProtobufValue }; + /** + * + * @type {string} + * @memberof PipelineSpecRuntimeConfig + */ + pipeline_root?: string; +} + /** * `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } * @export @@ -463,6 +489,87 @@ export interface ProtobufAny { value?: string; } +/** + * `ListValue` is a wrapper around a repeated field of values. The JSON representation for `ListValue` is JSON array. + * @export + * @interface ProtobufListValue + */ +export interface ProtobufListValue { + /** + * Repeated field of dynamically typed values. + * @type {Array} + * @memberof ProtobufListValue + */ + values?: Array; +} + +/** + * `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value. + * @export + * @enum {string} + */ +export enum ProtobufNullValue { + NULLVALUE = 'NULL_VALUE', +} + +/** + * `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + * @export + * @interface ProtobufStruct + */ +export interface ProtobufStruct { + /** + * Unordered map of dynamically typed values. + * @type {{ [key: string]: ProtobufValue; }} + * @memberof ProtobufStruct + */ + fields?: { [key: string]: ProtobufValue }; +} + +/** + * `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of that variants, absence of any variant indicates an error. The JSON representation for `Value` is JSON value. + * @export + * @interface ProtobufValue + */ +export interface ProtobufValue { + /** + * Represents a null value. + * @type {ProtobufNullValue} + * @memberof ProtobufValue + */ + null_value?: ProtobufNullValue; + /** + * Represents a double value. + * @type {number} + * @memberof ProtobufValue + */ + number_value?: number; + /** + * Represents a string value. + * @type {string} + * @memberof ProtobufValue + */ + string_value?: string; + /** + * Represents a boolean value. + * @type {boolean} + * @memberof ProtobufValue + */ + bool_value?: boolean; + /** + * Represents a structured value. + * @type {ProtobufStruct} + * @memberof ProtobufValue + */ + struct_value?: ProtobufStruct; + /** + * Represents a repeated `Value`. + * @type {ProtobufListValue} + * @memberof ProtobufValue + */ + list_value?: ProtobufListValue; +} + /** * JobServiceApi - fetch parameter creator * @export @@ -720,7 +827,7 @@ export const JobServiceApiFetchParamCreator = function(configuration?: Configura * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -920,7 +1027,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) { * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1029,7 +1136,7 @@ export const JobServiceApiFactory = function( * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1136,7 +1243,7 @@ export class JobServiceApi extends BaseAPI { * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof JobServiceApi diff --git a/frontend/src/apis/pipeline/api.ts b/frontend/src/apis/pipeline/api.ts index 1df92f7572c..25268daa983 100644 --- a/frontend/src/apis/pipeline/api.ts +++ b/frontend/src/apis/pipeline/api.ts @@ -668,6 +668,61 @@ export const PipelineServiceApiFetchParamCreator = function(configuration?: Conf options: localVarRequestOptions, }; }, + /** + * + * @summary Finds a pipeline by Name (and namespace) + * @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\"). + * @param {string} name The Name of the pipeline to be retrieved. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPipelineByName(namespace: string, name: string, options: any = {}): FetchArgs { + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new RequiredError( + 'namespace', + 'Required parameter namespace was null or undefined when calling getPipelineByName.', + ); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new RequiredError( + 'name', + 'Required parameter name was null or undefined when calling getPipelineByName.', + ); + } + const localVarPath = `/apis/v1beta1/namespaces/{namespace}/pipelines/{name}` + .replace(`{${'namespace'}}`, encodeURIComponent(String(namespace))) + .replace(`{${'name'}}`, encodeURIComponent(String(name))); + const localVarUrlObj = url.parse(localVarPath, true); + const localVarRequestOptions = Object.assign({ method: 'GET' }, options); + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = + typeof configuration.apiKey === 'function' + ? configuration.apiKey('authorization') + : configuration.apiKey; + localVarHeaderParameter['authorization'] = localVarApiKeyValue; + } + + localVarUrlObj.query = Object.assign( + {}, + localVarUrlObj.query, + localVarQueryParameter, + options.query, + ); + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Gets a pipeline version by pipeline version ID. @@ -899,7 +954,7 @@ export const PipelineServiceApiFetchParamCreator = function(configuration?: Conf * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. * @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. @@ -1165,6 +1220,32 @@ export const PipelineServiceApiFp = function(configuration?: Configuration) { }); }; }, + /** + * + * @summary Finds a pipeline by Name (and namespace) + * @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\"). + * @param {string} name The Name of the pipeline to be retrieved. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPipelineByName( + namespace: string, + name: string, + options?: any, + ): (fetch?: FetchAPI, basePath?: string) => Promise { + const localVarFetchArgs = PipelineServiceApiFetchParamCreator( + configuration, + ).getPipelineByName(namespace, name, options); + return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => { + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }; + }, /** * * @summary Gets a pipeline version by pipeline version ID. @@ -1292,7 +1373,7 @@ export const PipelineServiceApiFp = function(configuration?: Configuration) { * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. * @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. @@ -1427,6 +1508,21 @@ export const PipelineServiceApiFactory = function( getPipeline(id: string, options?: any) { return PipelineServiceApiFp(configuration).getPipeline(id, options)(fetch, basePath); }, + /** + * + * @summary Finds a pipeline by Name (and namespace) + * @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\"). + * @param {string} name The Name of the pipeline to be retrieved. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPipelineByName(namespace: string, name: string, options?: any) { + return PipelineServiceApiFp(configuration).getPipelineByName( + namespace, + name, + options, + )(fetch, basePath); + }, /** * * @summary Gets a pipeline version by pipeline version ID. @@ -1506,7 +1602,7 @@ export const PipelineServiceApiFactory = function( * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. * @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. @@ -1637,6 +1733,23 @@ export class PipelineServiceApi extends BaseAPI { ); } + /** + * + * @summary Finds a pipeline by Name (and namespace) + * @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\"). + * @param {string} name The Name of the pipeline to be retrieved. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PipelineServiceApi + */ + public getPipelineByName(namespace: string, name: string, options?: any) { + return PipelineServiceApiFp(this.configuration).getPipelineByName( + namespace, + name, + options, + )(this.fetch, this.basePath); + } + /** * * @summary Gets a pipeline version by pipeline version ID. @@ -1727,7 +1840,7 @@ export class PipelineServiceApi extends BaseAPI { * @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. * @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. * @param {*} [options] Override http request option. diff --git a/frontend/src/apis/run/api.ts b/frontend/src/apis/run/api.ts index 2c77aaccda6..c2c581fd75f 100644 --- a/frontend/src/apis/run/api.ts +++ b/frontend/src/apis/run/api.ts @@ -178,11 +178,17 @@ export interface ApiPipelineSpec { */ pipeline_manifest?: string; /** - * The parameter user provide to inject to the pipeline JSON. If a default value of a parameter exist in the JSON, the value user provided here will replace. + * * @type {Array} * @memberof ApiPipelineSpec */ parameters?: Array; + /** + * + * @type {PipelineSpecRuntimeConfig} + * @memberof ApiPipelineSpec + */ + runtime_config?: PipelineSpecRuntimeConfig; } /** @@ -478,6 +484,26 @@ export interface ApiStatus { details?: Array; } +/** + * The runtime config of a PipelineSpec. + * @export + * @interface PipelineSpecRuntimeConfig + */ +export interface PipelineSpecRuntimeConfig { + /** + * The runtime parameters of the PipelineSpec. The parameters will be used to replace the placeholders at runtime. + * @type {{ [key: string]: ProtobufValue; }} + * @memberof PipelineSpecRuntimeConfig + */ + parameters?: { [key: string]: ProtobufValue }; + /** + * + * @type {string} + * @memberof PipelineSpecRuntimeConfig + */ + pipeline_root?: string; +} + /** * `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } * @export @@ -498,6 +524,87 @@ export interface ProtobufAny { value?: string; } +/** + * `ListValue` is a wrapper around a repeated field of values. The JSON representation for `ListValue` is JSON array. + * @export + * @interface ProtobufListValue + */ +export interface ProtobufListValue { + /** + * Repeated field of dynamically typed values. + * @type {Array} + * @memberof ProtobufListValue + */ + values?: Array; +} + +/** + * `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value. + * @export + * @enum {string} + */ +export enum ProtobufNullValue { + NULLVALUE = 'NULL_VALUE', +} + +/** + * `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + * @export + * @interface ProtobufStruct + */ +export interface ProtobufStruct { + /** + * Unordered map of dynamically typed values. + * @type {{ [key: string]: ProtobufValue; }} + * @memberof ProtobufStruct + */ + fields?: { [key: string]: ProtobufValue }; +} + +/** + * `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of that variants, absence of any variant indicates an error. The JSON representation for `Value` is JSON value. + * @export + * @interface ProtobufValue + */ +export interface ProtobufValue { + /** + * Represents a null value. + * @type {ProtobufNullValue} + * @memberof ProtobufValue + */ + null_value?: ProtobufNullValue; + /** + * Represents a double value. + * @type {number} + * @memberof ProtobufValue + */ + number_value?: number; + /** + * Represents a string value. + * @type {string} + * @memberof ProtobufValue + */ + string_value?: string; + /** + * Represents a boolean value. + * @type {boolean} + * @memberof ProtobufValue + */ + bool_value?: boolean; + /** + * Represents a structured value. + * @type {ProtobufStruct} + * @memberof ProtobufValue + */ + struct_value?: ProtobufStruct; + /** + * Represents a repeated `Value`. + * @type {ProtobufListValue} + * @memberof ProtobufValue + */ + list_value?: ProtobufListValue; +} + /** * * @export @@ -763,7 +870,7 @@ export const RunServiceApiFetchParamCreator = function(configuration?: Configura * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1226,7 +1333,7 @@ export const RunServiceApiFp = function(configuration?: Configuration) { * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1453,7 +1560,7 @@ export const RunServiceApiFactory = function( * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1610,7 +1717,7 @@ export class RunServiceApi extends BaseAPI { * @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default. * @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to. * @param {string} [resource_reference_key_id] The ID of the resource that referred to. - * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + * @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RunServiceApi