Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce getPipeline calls in RunList #1852

Merged
merged 3 commits into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions frontend/mock-backend/fixed-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const jobs: ApiJob[] = [
}
],
pipeline_id: pipelines[0].id,
pipeline_name: pipelines[0].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -177,6 +178,7 @@ const jobs: ApiJob[] = [
}
],
pipeline_id: pipelines[1].id,
pipeline_name: pipelines[1].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -221,6 +223,7 @@ const jobs: ApiJob[] = [
}
],
pipeline_id: pipelines[2].id,
pipeline_name: pipelines[2].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -290,7 +293,8 @@ const runs: ApiRunDetail[] = [
{ name: 'paramName1', value: 'paramVal1' },
{ name: 'paramName2', value: 'paramVal2' },
],
pipeline_id: '8fbe3bd6-a01f-11e8-98d0-529269fb1459',
pipeline_id: pipelines[0].id,
pipeline_name: pipelines[0].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -327,7 +331,8 @@ const runs: ApiRunDetail[] = [
{ name: 'paramName1', value: 'paramVal1' },
{ name: 'paramName2', value: 'paramVal2' },
],
pipeline_id: '8fbe3bd6-a01f-11e8-98d0-529269fb1459',
pipeline_id: pipelines[0].id,
pipeline_name: pipelines[0].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -360,7 +365,8 @@ const runs: ApiRunDetail[] = [
{ name: 'paramName1', value: 'paramVal1' },
{ name: 'paramName2', value: 'paramVal2' },
],
pipeline_id: '8fbe41b2-a01f-11e8-98d0-529269fb1459',
pipeline_id: pipelines[2].id,
pipeline_name: pipelines[2].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -393,7 +399,8 @@ const runs: ApiRunDetail[] = [
{ name: 'paramName1', value: 'paramVal1' },
{ name: 'paramName2', value: 'paramVal2' },
],
pipeline_id: '8fbe42f2-a01f-11e8-98d0-529269fb1459',
pipeline_id: pipelines[3].id,
pipeline_name: pipelines[3].name,
},
scheduled_at: new Date('2018-06-17T22:58:23.000Z'),
status: 'Failed',
Expand Down Expand Up @@ -439,7 +446,8 @@ const runs: ApiRunDetail[] = [
{ name: 'paramName1', value: 'paramVal1' },
{ name: 'paramName2', value: 'paramVal2' },
],
pipeline_id: '8fbe3f78-a01f-11e8-98d0-529269fb1459',
pipeline_id: pipelines[1].id,
pipeline_name: pipelines[1].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -488,7 +496,8 @@ const runs: ApiRunDetail[] = [
{ name: 'paramName1', value: 'paramVal1' },
{ name: 'paramName2', value: 'paramVal2' },
],
pipeline_id: '8fbe3f78-a01f-11e8-98d0-529269fb1459',
pipeline_id: pipelines[1].id,
pipeline_name: pipelines[1].name,
},
resource_references: [{
key: {
Expand Down Expand Up @@ -603,6 +612,7 @@ function generateNRuns(): ApiRunDetail[] {
{ name: 'paramName2', value: 'paramVal2' },
],
pipeline_id: 'Some-pipeline-id-' + i,
pipeline_name: 'Kubeflow Pipeline number ' + i,
},
resource_references: [{
key: {
Expand Down
60 changes: 36 additions & 24 deletions frontend/src/apis/job/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export interface ApiJob {
*/
error?: string;
/**
*
* Input. Whether the job is enabled or not.
* @type {boolean}
* @memberof ApiJob
*/
Expand All @@ -197,7 +197,7 @@ export interface ApiJob {
*/
export interface ApiListJobsResponse {
/**
*
* A list of jobs returned.
* @type {Array<ApiJob>}
* @memberof ApiListJobsResponse
*/
Expand Down Expand Up @@ -274,6 +274,12 @@ export interface ApiPipelineSpec {
* @memberof ApiPipelineSpec
*/
pipeline_id?: string;
/**
* Optional output field. The name of the pipeline. Not empty if the pipeline id is not empty.
* @type {string}
* @memberof ApiPipelineSpec
*/
pipeline_name?: string;
/**
* Optional input field. The marshalled raw argo JSON workflow. This will be deprecated when pipeline_manifest is in use.
* @type {string}
Expand Down Expand Up @@ -337,6 +343,12 @@ export interface ApiResourceReference {
* @memberof ApiResourceReference
*/
key?: ApiResourceKey;
/**
* The name of the resource that referred to.
* @type {string}
* @memberof ApiResourceReference
*/
name?: string;
/**
* Required field. The relationship from referred resource to the object.
* @type {ApiRelationship}
Expand Down Expand Up @@ -383,7 +395,7 @@ export interface ApiStatus {
}

/**
*
* Trigger defines what starts a pipeline run.
* @export
* @interface ApiTrigger
*/
Expand Down Expand Up @@ -420,7 +432,7 @@ export enum JobMode {
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
Expand All @@ -442,7 +454,7 @@ export const JobServiceApiFetchParamCreator = function (configuration?: Configur
return {
/**
*
* @param {ApiJob} body
* @param {ApiJob} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -481,7 +493,7 @@ export const JobServiceApiFetchParamCreator = function (configuration?: Configur
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -517,7 +529,7 @@ export const JobServiceApiFetchParamCreator = function (configuration?: Configur
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -553,7 +565,7 @@ export const JobServiceApiFetchParamCreator = function (configuration?: Configur
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -589,7 +601,7 @@ export const JobServiceApiFetchParamCreator = function (configuration?: Configur
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -694,7 +706,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @param {ApiJob} body
* @param {ApiJob} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -712,7 +724,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -730,7 +742,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -748,7 +760,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -766,7 +778,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -816,7 +828,7 @@ export const JobServiceApiFactory = function (configuration?: Configuration, fet
return {
/**
*
* @param {ApiJob} body
* @param {ApiJob} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -825,7 +837,7 @@ export const JobServiceApiFactory = function (configuration?: Configuration, fet
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -834,7 +846,7 @@ export const JobServiceApiFactory = function (configuration?: Configuration, fet
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -843,7 +855,7 @@ export const JobServiceApiFactory = function (configuration?: Configuration, fet
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand All @@ -852,7 +864,7 @@ export const JobServiceApiFactory = function (configuration?: Configuration, fet
},
/**
*
* @param {string} id
* @param {string} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -885,7 +897,7 @@ export const JobServiceApiFactory = function (configuration?: Configuration, fet
export class JobServiceApi extends BaseAPI {
/**
*
* @param {} body
* @param {} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
Expand All @@ -896,7 +908,7 @@ export class JobServiceApi extends BaseAPI {

/**
*
* @param {} id
* @param {} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
Expand All @@ -907,7 +919,7 @@ export class JobServiceApi extends BaseAPI {

/**
*
* @param {} id
* @param {} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
Expand All @@ -918,7 +930,7 @@ export class JobServiceApi extends BaseAPI {

/**
*
* @param {} id
* @param {} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
Expand All @@ -929,7 +941,7 @@ export class JobServiceApi extends BaseAPI {

/**
*
* @param {} id
* @param {} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
Expand Down
Loading