From 5742991c1ab3523e76010b33d9e1bb6d7f4ae4f4 Mon Sep 17 00:00:00 2001 From: Niklas Hansson Date: Fri, 16 Oct 2020 01:19:25 +0200 Subject: [PATCH] feat(API): exposing api for setting the default version of pipeline. Fixes #4049 (#4406) * initial work on exposing the default version of pipeline * update description * added missing files * updated api build, unsure if this is correct ... * updated after feedback * clean up * remove empty line * started to make the integration test * added integreation test * fixed build and feedback * updated the tests * Updated the test * new test * typo * updated the pipeline default * updated the pipeline version * formatting * error in comparison --- backend/api/go_client/pipeline.pb.go | 274 ++++++++++++------ backend/api/go_client/pipeline.pb.gw.go | 62 ++++ .../pipeline_service/BUILD.bazel | 2 + .../pipeline_service_client.go | 29 ++ ...ate_pipeline_default_version_parameters.go | 171 +++++++++++ ...date_pipeline_default_version_responses.go | 124 ++++++++ backend/api/pipeline.proto | 16 + .../swagger/kfp_api_single_file.swagger.json | 39 +++ backend/api/swagger/pipeline.swagger.json | 39 +++ .../apiserver/resource/resource_manager.go | 4 + .../src/apiserver/server/pipeline_server.go | 18 ++ .../client/api_server/pipeline_client.go | 23 ++ .../client/api_server/pipeline_client_fake.go | 10 + .../integration/pipeline_version_api_test.go | 16 + 14 files changed, 732 insertions(+), 95 deletions(-) create mode 100644 backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go create mode 100644 backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go diff --git a/backend/api/go_client/pipeline.pb.go b/backend/api/go_client/pipeline.pb.go index 0c5a5a1cfbc..942314f8cb8 100755 --- a/backend/api/go_client/pipeline.pb.go +++ b/backend/api/go_client/pipeline.pb.go @@ -52,7 +52,7 @@ func (m *Url) Reset() { *m = Url{} } func (m *Url) String() string { return proto.CompactTextString(m) } func (*Url) ProtoMessage() {} func (*Url) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{0} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{0} } func (m *Url) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Url.Unmarshal(m, b) @@ -90,7 +90,7 @@ func (m *CreatePipelineRequest) Reset() { *m = CreatePipelineRequest{} } func (m *CreatePipelineRequest) String() string { return proto.CompactTextString(m) } func (*CreatePipelineRequest) ProtoMessage() {} func (*CreatePipelineRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{1} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{1} } func (m *CreatePipelineRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreatePipelineRequest.Unmarshal(m, b) @@ -117,6 +117,52 @@ func (m *CreatePipelineRequest) GetPipeline() *Pipeline { return nil } +type UpdatePipelineDefaultVersionRequest struct { + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + VersionId string `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdatePipelineDefaultVersionRequest) Reset() { *m = UpdatePipelineDefaultVersionRequest{} } +func (m *UpdatePipelineDefaultVersionRequest) String() string { return proto.CompactTextString(m) } +func (*UpdatePipelineDefaultVersionRequest) ProtoMessage() {} +func (*UpdatePipelineDefaultVersionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{2} +} +func (m *UpdatePipelineDefaultVersionRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdatePipelineDefaultVersionRequest.Unmarshal(m, b) +} +func (m *UpdatePipelineDefaultVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdatePipelineDefaultVersionRequest.Marshal(b, m, deterministic) +} +func (dst *UpdatePipelineDefaultVersionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdatePipelineDefaultVersionRequest.Merge(dst, src) +} +func (m *UpdatePipelineDefaultVersionRequest) XXX_Size() int { + return xxx_messageInfo_UpdatePipelineDefaultVersionRequest.Size(m) +} +func (m *UpdatePipelineDefaultVersionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdatePipelineDefaultVersionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdatePipelineDefaultVersionRequest proto.InternalMessageInfo + +func (m *UpdatePipelineDefaultVersionRequest) GetPipelineId() string { + if m != nil { + return m.PipelineId + } + return "" +} + +func (m *UpdatePipelineDefaultVersionRequest) GetVersionId() string { + if m != nil { + return m.VersionId + } + return "" +} + type GetPipelineRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -128,7 +174,7 @@ func (m *GetPipelineRequest) Reset() { *m = GetPipelineRequest{} } func (m *GetPipelineRequest) String() string { return proto.CompactTextString(m) } func (*GetPipelineRequest) ProtoMessage() {} func (*GetPipelineRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{2} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{3} } func (m *GetPipelineRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetPipelineRequest.Unmarshal(m, b) @@ -169,7 +215,7 @@ func (m *ListPipelinesRequest) Reset() { *m = ListPipelinesRequest{} } func (m *ListPipelinesRequest) String() string { return proto.CompactTextString(m) } func (*ListPipelinesRequest) ProtoMessage() {} func (*ListPipelinesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{3} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{4} } func (m *ListPipelinesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListPipelinesRequest.Unmarshal(m, b) @@ -230,7 +276,7 @@ func (m *ListPipelinesResponse) Reset() { *m = ListPipelinesResponse{} } func (m *ListPipelinesResponse) String() string { return proto.CompactTextString(m) } func (*ListPipelinesResponse) ProtoMessage() {} func (*ListPipelinesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{4} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{5} } func (m *ListPipelinesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListPipelinesResponse.Unmarshal(m, b) @@ -282,7 +328,7 @@ func (m *DeletePipelineRequest) Reset() { *m = DeletePipelineRequest{} } func (m *DeletePipelineRequest) String() string { return proto.CompactTextString(m) } func (*DeletePipelineRequest) ProtoMessage() {} func (*DeletePipelineRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{5} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{6} } func (m *DeletePipelineRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeletePipelineRequest.Unmarshal(m, b) @@ -320,7 +366,7 @@ func (m *GetTemplateRequest) Reset() { *m = GetTemplateRequest{} } func (m *GetTemplateRequest) String() string { return proto.CompactTextString(m) } func (*GetTemplateRequest) ProtoMessage() {} func (*GetTemplateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{6} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{7} } func (m *GetTemplateRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetTemplateRequest.Unmarshal(m, b) @@ -358,7 +404,7 @@ func (m *GetTemplateResponse) Reset() { *m = GetTemplateResponse{} } func (m *GetTemplateResponse) String() string { return proto.CompactTextString(m) } func (*GetTemplateResponse) ProtoMessage() {} func (*GetTemplateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{7} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{8} } func (m *GetTemplateResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetTemplateResponse.Unmarshal(m, b) @@ -396,7 +442,7 @@ func (m *GetPipelineVersionTemplateRequest) Reset() { *m = GetPipelineVe func (m *GetPipelineVersionTemplateRequest) String() string { return proto.CompactTextString(m) } func (*GetPipelineVersionTemplateRequest) ProtoMessage() {} func (*GetPipelineVersionTemplateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{8} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{9} } func (m *GetPipelineVersionTemplateRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetPipelineVersionTemplateRequest.Unmarshal(m, b) @@ -434,7 +480,7 @@ func (m *CreatePipelineVersionRequest) Reset() { *m = CreatePipelineVers func (m *CreatePipelineVersionRequest) String() string { return proto.CompactTextString(m) } func (*CreatePipelineVersionRequest) ProtoMessage() {} func (*CreatePipelineVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{9} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{10} } func (m *CreatePipelineVersionRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreatePipelineVersionRequest.Unmarshal(m, b) @@ -472,7 +518,7 @@ func (m *GetPipelineVersionRequest) Reset() { *m = GetPipelineVersionReq func (m *GetPipelineVersionRequest) String() string { return proto.CompactTextString(m) } func (*GetPipelineVersionRequest) ProtoMessage() {} func (*GetPipelineVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{10} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{11} } func (m *GetPipelineVersionRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetPipelineVersionRequest.Unmarshal(m, b) @@ -514,7 +560,7 @@ func (m *ListPipelineVersionsRequest) Reset() { *m = ListPipelineVersion func (m *ListPipelineVersionsRequest) String() string { return proto.CompactTextString(m) } func (*ListPipelineVersionsRequest) ProtoMessage() {} func (*ListPipelineVersionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{11} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{12} } func (m *ListPipelineVersionsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListPipelineVersionsRequest.Unmarshal(m, b) @@ -582,7 +628,7 @@ func (m *ListPipelineVersionsResponse) Reset() { *m = ListPipelineVersio func (m *ListPipelineVersionsResponse) String() string { return proto.CompactTextString(m) } func (*ListPipelineVersionsResponse) ProtoMessage() {} func (*ListPipelineVersionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{12} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{13} } func (m *ListPipelineVersionsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListPipelineVersionsResponse.Unmarshal(m, b) @@ -634,7 +680,7 @@ func (m *DeletePipelineVersionRequest) Reset() { *m = DeletePipelineVers func (m *DeletePipelineVersionRequest) String() string { return proto.CompactTextString(m) } func (*DeletePipelineVersionRequest) ProtoMessage() {} func (*DeletePipelineVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{13} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{14} } func (m *DeletePipelineVersionRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeletePipelineVersionRequest.Unmarshal(m, b) @@ -679,7 +725,7 @@ func (m *Pipeline) Reset() { *m = Pipeline{} } func (m *Pipeline) String() string { return proto.CompactTextString(m) } func (*Pipeline) ProtoMessage() {} func (*Pipeline) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{14} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{15} } func (m *Pipeline) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Pipeline.Unmarshal(m, b) @@ -772,7 +818,7 @@ func (m *PipelineVersion) Reset() { *m = PipelineVersion{} } func (m *PipelineVersion) String() string { return proto.CompactTextString(m) } func (*PipelineVersion) ProtoMessage() {} func (*PipelineVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_pipeline_b225388ce0ee2aa9, []int{15} + return fileDescriptor_pipeline_1812fe44d51f79e6, []int{16} } func (m *PipelineVersion) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PipelineVersion.Unmarshal(m, b) @@ -844,6 +890,7 @@ func (m *PipelineVersion) GetResourceReferences() []*ResourceReference { func init() { proto.RegisterType((*Url)(nil), "api.Url") proto.RegisterType((*CreatePipelineRequest)(nil), "api.CreatePipelineRequest") + proto.RegisterType((*UpdatePipelineDefaultVersionRequest)(nil), "api.UpdatePipelineDefaultVersionRequest") proto.RegisterType((*GetPipelineRequest)(nil), "api.GetPipelineRequest") proto.RegisterType((*ListPipelinesRequest)(nil), "api.ListPipelinesRequest") proto.RegisterType((*ListPipelinesResponse)(nil), "api.ListPipelinesResponse") @@ -882,6 +929,7 @@ type PipelineServiceClient interface { ListPipelineVersions(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) DeletePipelineVersion(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*empty.Empty, error) GetPipelineVersionTemplate(ctx context.Context, in *GetPipelineVersionTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) + UpdatePipelineDefaultVersion(ctx context.Context, in *UpdatePipelineDefaultVersionRequest, opts ...grpc.CallOption) (*empty.Empty, error) } type pipelineServiceClient struct { @@ -982,6 +1030,15 @@ func (c *pipelineServiceClient) GetPipelineVersionTemplate(ctx context.Context, return out, nil } +func (c *pipelineServiceClient) UpdatePipelineDefaultVersion(ctx context.Context, in *UpdatePipelineDefaultVersionRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/api.PipelineService/UpdatePipelineDefaultVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PipelineServiceServer is the server API for PipelineService service. type PipelineServiceServer interface { CreatePipeline(context.Context, *CreatePipelineRequest) (*Pipeline, error) @@ -994,6 +1051,7 @@ type PipelineServiceServer interface { ListPipelineVersions(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) DeletePipelineVersion(context.Context, *DeletePipelineVersionRequest) (*empty.Empty, error) GetPipelineVersionTemplate(context.Context, *GetPipelineVersionTemplateRequest) (*GetTemplateResponse, error) + UpdatePipelineDefaultVersion(context.Context, *UpdatePipelineDefaultVersionRequest) (*empty.Empty, error) } func RegisterPipelineServiceServer(s *grpc.Server, srv PipelineServiceServer) { @@ -1180,6 +1238,24 @@ func _PipelineService_GetPipelineVersionTemplate_Handler(srv interface{}, ctx co return interceptor(ctx, in, info, handler) } +func _PipelineService_UpdatePipelineDefaultVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePipelineDefaultVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).UpdatePipelineDefaultVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.PipelineService/UpdatePipelineDefaultVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).UpdatePipelineDefaultVersion(ctx, req.(*UpdatePipelineDefaultVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _PipelineService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.PipelineService", HandlerType: (*PipelineServiceServer)(nil), @@ -1224,89 +1300,97 @@ var _PipelineService_serviceDesc = grpc.ServiceDesc{ MethodName: "GetPipelineVersionTemplate", Handler: _PipelineService_GetPipelineVersionTemplate_Handler, }, + { + MethodName: "UpdatePipelineDefaultVersion", + Handler: _PipelineService_UpdatePipelineDefaultVersion_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "backend/api/pipeline.proto", } func init() { - proto.RegisterFile("backend/api/pipeline.proto", fileDescriptor_pipeline_b225388ce0ee2aa9) -} - -var fileDescriptor_pipeline_b225388ce0ee2aa9 = []byte{ - // 1177 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0x66, 0xed, 0xc4, 0xb1, 0x8f, 0xeb, 0x04, 0xa6, 0x4d, 0xe2, 0x6c, 0x9c, 0xc6, 0x59, 0xa2, - 0x34, 0x09, 0xad, 0xdd, 0x24, 0x08, 0x41, 0xa4, 0x22, 0x35, 0x80, 0x2a, 0xc4, 0x8f, 0x2a, 0x27, - 0xe1, 0xa2, 0x5c, 0x58, 0x63, 0xfb, 0xd8, 0x5d, 0xb2, 0xde, 0x5d, 0x66, 0xc6, 0x29, 0x49, 0x55, - 0x09, 0x15, 0x90, 0x90, 0xb8, 0x83, 0x0b, 0xee, 0x78, 0x02, 0x1e, 0x01, 0x89, 0x87, 0xe0, 0x86, - 0x07, 0xe0, 0x41, 0xd0, 0xce, 0xce, 0xac, 0x77, 0xd7, 0x3f, 0x49, 0xae, 0x92, 0x39, 0xe7, 0x9b, - 0x3d, 0xe7, 0x7c, 0xf3, 0xcd, 0x39, 0x63, 0x30, 0x5b, 0xb4, 0x7d, 0x86, 0x6e, 0xa7, 0x4e, 0x7d, - 0xbb, 0xee, 0xdb, 0x3e, 0x3a, 0xb6, 0x8b, 0x35, 0x9f, 0x79, 0xc2, 0x23, 0x59, 0xea, 0xdb, 0x66, - 0xa5, 0xe7, 0x79, 0x3d, 0x07, 0xa5, 0x9f, 0xba, 0xae, 0x27, 0xa8, 0xb0, 0x3d, 0x97, 0x87, 0x10, - 0x73, 0x5d, 0x79, 0xe5, 0xaa, 0x35, 0xe8, 0xd6, 0x85, 0xdd, 0x47, 0x2e, 0x68, 0xdf, 0x57, 0x80, - 0xd5, 0x34, 0x00, 0xfb, 0xbe, 0xb8, 0x50, 0xce, 0xe5, 0x78, 0x70, 0x64, 0xcc, 0x63, 0x7a, 0x57, - 0x22, 0x2b, 0xca, 0x68, 0x1f, 0x05,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 0x98, 0x4c, 0x72, 0x32, 0x73, 0x25, 0x27, 0x5b, - 0xb0, 0xd0, 0xf6, 0x3a, 0xd8, 0x54, 0xf7, 0x29, 0xe0, 0x27, 0xd4, 0x72, 0x29, 0x30, 0x1f, 0x4b, - 0x6b, 0x30, 0x87, 0x76, 0xa0, 0xe8, 0xd3, 0xf6, 0x59, 0xa0, 0xbe, 0x00, 0x93, 0x4b, 0x71, 0x08, - 0xca, 0x19, 0x40, 0x9f, 0xc0, 0xed, 0xd1, 0x19, 0xc8, 0xcb, 0x73, 0x32, 0x97, 0xa5, 0xc4, 0x35, - 0x6d, 0x68, 0x77, 0x83, 0xb0, 0xb4, 0x89, 0xef, 0xff, 0x5b, 0x18, 0xd2, 0x77, 0x8c, 0xec, 0xdc, - 0x6e, 0x23, 0xe9, 0xc2, 0x7c, 0xb2, 0x51, 0x11, 0x53, 0x7e, 0x71, 0xec, 0x04, 0x34, 0x93, 0xdd, - 0xdf, 0xda, 0x79, 0xfd, 0xcf, 0x7f, 0xbf, 0x65, 0xde, 0xb6, 0x96, 0x83, 0x41, 0xcd, 0xeb, 0xe7, - 0x7b, 0x2d, 0x14, 0x74, 0x2f, 0x7a, 0x64, 0xf0, 0xc3, 0x68, 0x20, 0x92, 0xaf, 0xa1, 0x18, 0x6b, - 0x60, 0x64, 0x59, 0x7e, 0x68, 0x74, 0x44, 0xa6, 0x23, 0x6c, 0xca, 0x08, 0x77, 0x49, 0x65, 0x42, - 0x84, 0xfa, 0x4b, 0xbb, 0xf3, 0x8a, 0xf4, 0xa0, 0x94, 0x18, 0x60, 0x64, 0x45, 0x7e, 0x65, 0xdc, - 0x68, 0x35, 0xcd, 0x71, 0xae, 0xb0, 0x8d, 0x58, 0xeb, 0x32, 0xda, 0x0a, 0x99, 0x54, 0x0f, 0xf9, - 0x06, 0xe6, 0x93, 0xd7, 0x5d, 0xb1, 0x35, 0x76, 0x62, 0x99, 0x4b, 0x23, 0x12, 0xfb, 0x24, 0x78, - 0x1a, 0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, 0x41, 0xc5, 0x80, 0x3f, 0x5b, 0x87, 0x35, 0xc8, 0x1d, 0x21, - 0x65, 0xc8, 0xc8, 0xed, 0x7c, 0xc6, 0x2c, 0xd1, 0x81, 0x78, 0xee, 0x31, 0xfb, 0x52, 0xfe, 0x4e, - 0xa8, 0x66, 0x5a, 0xb7, 0x00, 0x22, 0xc0, 0x1b, 0xcf, 0x0e, 0x7a, 0xb6, 0x78, 0x3e, 0x68, 0xd5, - 0xda, 0x5e, 0xbf, 0x7e, 0x36, 0x68, 0x61, 0xd7, 0xf1, 0x5e, 0xc4, 0xee, 0x4e, 0xfc, 0x27, 0x4a, - 0xcf, 0x6b, 0xb6, 0x1d, 0x1b, 0x5d, 0xd1, 0xca, 0x49, 0xba, 0x0f, 0xfe, 0x0f, 0x00, 0x00, 0xff, - 0xff, 0x97, 0x09, 0x18, 0xd4, 0x75, 0x0d, 0x00, 0x00, + proto.RegisterFile("backend/api/pipeline.proto", fileDescriptor_pipeline_1812fe44d51f79e6) +} + +var fileDescriptor_pipeline_1812fe44d51f79e6 = []byte{ + // 1244 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0xdd, 0x4e, 0xe3, 0x46, + 0x14, 0xae, 0x13, 0x08, 0xc9, 0x09, 0x81, 0x76, 0xf8, 0x0b, 0x26, 0x6c, 0xc0, 0x8b, 0x58, 0xa0, + 0xbb, 0xc9, 0x02, 0x55, 0xd5, 0x22, 0x6d, 0xa5, 0x4d, 0xa9, 0x56, 0xdb, 0x3f, 0xad, 0x02, 0xf4, + 0x62, 0x7b, 0x11, 0x39, 0xf6, 0x49, 0xd6, 0xc5, 0xb1, 0xdd, 0xf1, 0x84, 0x2d, 0xac, 0x90, 0xaa, + 0x6d, 0xab, 0x56, 0xea, 0x5d, 0x7b, 0xd1, 0xbb, 0x3e, 0xc1, 0x3e, 0x42, 0xa5, 0x3e, 0x44, 0x5f,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 0x0e, 0x51, 0x65, + 0x39, 0xaa, 0x02, 0xb7, 0x70, 0x58, 0x9b, 0x30, 0xeb, 0xe0, 0x0f, 0xac, 0x15, 0xab, 0x2b, 0x64, + 0xad, 0x14, 0x98, 0x9f, 0xc9, 0xda, 0xb4, 0x7b, 0xb0, 0x70, 0x88, 0x36, 0x0e, 0x1e, 0x72, 0x9a, + 0xbc, 0x90, 0xe2, 0x63, 0xec, 0x79, 0xb6, 0xce, 0x46, 0x46, 0xed, 0xc2, 0x5c, 0x22, 0x4a, 0x54, + 0xa6, 0x42, 0x9e, 0x09, 0x9b, 0x08, 0x8e, 0xd6, 0x5a, 0x03, 0xd6, 0x63, 0x67, 0x27, 0x84, 0x91, + 0xce, 0x93, 0x3c, 0x7f, 0x25, 0x7d, 0xfe, 0x5f, 0x43, 0x25, 0x29, 0xd5, 0x94, 0xbe, 0x6a, 0x30, + 0x25, 0x82, 0x85, 0x60, 0xe7, 0x13, 0xbc, 0xca, 0x68, 0x19, 0xa4, 0x1d, 0xc0, 0xf2, 0x20, 0xa6, + 0x1b, 0x62, 0xf9, 0x57, 0x81, 0x95, 0xf8, 0xf9, 0x8a, 0xdd, 0x91, 0xd8, 0xf6, 0x61, 0x3a, 0xba, + 0xca, 0xa7, 0x78, 0x2e, 0x00, 0xbd, 0xcb, 0x01, 0x35, 0x85, 0xe3, 0x0b, 0x3c, 0x6f, 0x16, 0xe9, + 0xd5, 0x62, 0xbc, 0x04, 0x93, 0xf2, 0xcd, 0xa6, 0xe5, 0x1b, 0x53, 0xe8, 0xc4, 0x08, 0x85, 0x4e, + 0x26, 0x14, 0xfa, 0x97, 0x02, 0x95, 0xe1, 0x15, 0x88, 0xe3, 0x7c, 0x08, 0x79, 0x51, 0xaf, 0xd4, + 0xe9, 0x70, 0x3e, 0xa3, 0xa8, 0x9b, 0xca, 0xf1, 0x1a, 0x55, 0x6b, 0x8f, 0xa0, 0x92, 0x54, 0xeb, + 0xed, 0x8e, 0xe6, 0x4d, 0x06,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x32, 0x97, 0xcf, 0xa8, 0x25, 0xbd, 0xcf, 0x5e, 0xb8, 0xd4, + 0xba, 0xe0, 0xbf, 0x9e, 0xd6, 0x32, 0xed, 0x69, 0x80, 0x28, 0xe0, 0x9d, 0xe7, 0xfb, 0x5d, 0x8b, + 0xbd, 0xe8, 0xb7, 0x6b, 0x86, 0xdb, 0xab, 0x9f, 0xf6, 0xdb, 0xd8, 0xb1, 0xdd, 0x97, 0x31, 0x70, + 0xf1, 0x1f, 0x6e, 0x5d, 0xb7, 0x65, 0xd8, 0x16, 0x3a, 0xac, 0x9d, 0xe3, 0x35, 0xee, 0xbf, 0x0d, + 0x00, 0x00, 0xff, 0xff, 0x67, 0xd1, 0x51, 0x07, 0xac, 0x0e, 0x00, 0x00, } diff --git a/backend/api/go_client/pipeline.pb.gw.go b/backend/api/go_client/pipeline.pb.gw.go index 0ec180e87bd..adc40b78fbb 100755 --- a/backend/api/go_client/pipeline.pb.gw.go +++ b/backend/api/go_client/pipeline.pb.gw.go @@ -272,6 +272,44 @@ func request_PipelineService_GetPipelineVersionTemplate_0(ctx context.Context, m } +func request_PipelineService_UpdatePipelineDefaultVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePipelineDefaultVersionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pipeline_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") + } + + protoReq.PipelineId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) + } + + val, ok = pathParams["version_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") + } + + protoReq.VersionId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) + } + + msg, err := client.UpdatePipelineDefaultVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + // RegisterPipelineServiceHandlerFromEndpoint is same as RegisterPipelineServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPipelineServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -510,6 +548,26 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv }) + mux.Handle("POST", pattern_PipelineService_UpdatePipelineDefaultVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PipelineService_UpdatePipelineDefaultVersion_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_UpdatePipelineDefaultVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -533,6 +591,8 @@ var ( pattern_PipelineService_DeletePipelineVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipeline_versions", "version_id"}, "")) pattern_PipelineService_GetPipelineVersionTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "pipeline_versions", "version_id", "templates"}, "")) + + pattern_PipelineService_UpdatePipelineDefaultVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta1", "pipelines", "pipeline_id", "default_version", "version_id"}, "")) ) var ( @@ -555,4 +615,6 @@ var ( forward_PipelineService_DeletePipelineVersion_0 = runtime.ForwardResponseMessage forward_PipelineService_GetPipelineVersionTemplate_0 = runtime.ForwardResponseMessage + + forward_PipelineService_UpdatePipelineDefaultVersion_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/go_http_client/pipeline_client/pipeline_service/BUILD.bazel b/backend/api/go_http_client/pipeline_client/pipeline_service/BUILD.bazel index 58fce3e5241..cca2221c2c2 100644 --- a/backend/api/go_http_client/pipeline_client/pipeline_service/BUILD.bazel +++ b/backend/api/go_http_client/pipeline_client/pipeline_service/BUILD.bazel @@ -24,6 +24,8 @@ go_library( "list_pipelines_parameters.go", "list_pipelines_responses.go", "pipeline_service_client.go", + "update_pipeline_default_version_parameters.go", + "update_pipeline_default_version_responses.go", ], importpath = "github.com/kubeflow/pipelines/backend/api/go_http_client/pipeline_client/pipeline_service", visibility = ["//visibility:public"], diff --git a/backend/api/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go b/backend/api/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go index a516dcfa6f4..75240b2693c 100644 --- a/backend/api/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go +++ b/backend/api/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go @@ -328,6 +328,35 @@ func (a *Client) ListPipelines(params *ListPipelinesParams, authInfo runtime.Cli } +/* +UpdatePipelineDefaultVersion updates the default pipeline version of a specific pipeline +*/ +func (a *Client) UpdatePipelineDefaultVersion(params *UpdatePipelineDefaultVersionParams, authInfo runtime.ClientAuthInfoWriter) (*UpdatePipelineDefaultVersionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdatePipelineDefaultVersionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "UpdatePipelineDefaultVersion", + Method: "POST", + PathPattern: "/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &UpdatePipelineDefaultVersionReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*UpdatePipelineDefaultVersionOK), nil + +} + // SetTransport changes the transport on the client func (a *Client) SetTransport(transport runtime.ClientTransport) { a.transport = transport diff --git a/backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go b/backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go new file mode 100644 index 00000000000..7406c08a7a1 --- /dev/null +++ b/backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go @@ -0,0 +1,171 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewUpdatePipelineDefaultVersionParams creates a new UpdatePipelineDefaultVersionParams object +// with the default values initialized. +func NewUpdatePipelineDefaultVersionParams() *UpdatePipelineDefaultVersionParams { + var () + return &UpdatePipelineDefaultVersionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewUpdatePipelineDefaultVersionParamsWithTimeout creates a new UpdatePipelineDefaultVersionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewUpdatePipelineDefaultVersionParamsWithTimeout(timeout time.Duration) *UpdatePipelineDefaultVersionParams { + var () + return &UpdatePipelineDefaultVersionParams{ + + timeout: timeout, + } +} + +// NewUpdatePipelineDefaultVersionParamsWithContext creates a new UpdatePipelineDefaultVersionParams object +// with the default values initialized, and the ability to set a context for a request +func NewUpdatePipelineDefaultVersionParamsWithContext(ctx context.Context) *UpdatePipelineDefaultVersionParams { + var () + return &UpdatePipelineDefaultVersionParams{ + + Context: ctx, + } +} + +// NewUpdatePipelineDefaultVersionParamsWithHTTPClient creates a new UpdatePipelineDefaultVersionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewUpdatePipelineDefaultVersionParamsWithHTTPClient(client *http.Client) *UpdatePipelineDefaultVersionParams { + var () + return &UpdatePipelineDefaultVersionParams{ + HTTPClient: client, + } +} + +/*UpdatePipelineDefaultVersionParams contains all the parameters to send to the API endpoint +for the update pipeline default version operation typically these are written to a http.Request +*/ +type UpdatePipelineDefaultVersionParams struct { + + /*PipelineID + The ID of the pipeline to be updated. + + */ + PipelineID string + /*VersionID + The ID of the default version. + + */ + VersionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) WithTimeout(timeout time.Duration) *UpdatePipelineDefaultVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) WithContext(ctx context.Context) *UpdatePipelineDefaultVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) WithHTTPClient(client *http.Client) *UpdatePipelineDefaultVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPipelineID adds the pipelineID to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) WithPipelineID(pipelineID string) *UpdatePipelineDefaultVersionParams { + o.SetPipelineID(pipelineID) + return o +} + +// SetPipelineID adds the pipelineId to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) SetPipelineID(pipelineID string) { + o.PipelineID = pipelineID +} + +// WithVersionID adds the versionID to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) WithVersionID(versionID string) *UpdatePipelineDefaultVersionParams { + o.SetVersionID(versionID) + return o +} + +// SetVersionID adds the versionId to the update pipeline default version params +func (o *UpdatePipelineDefaultVersionParams) SetVersionID(versionID string) { + o.VersionID = versionID +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdatePipelineDefaultVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param pipeline_id + if err := r.SetPathParam("pipeline_id", o.PipelineID); err != nil { + return err + } + + // path param version_id + if err := r.SetPathParam("version_id", o.VersionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go b/backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go new file mode 100644 index 00000000000..75bc922984e --- /dev/null +++ b/backend/api/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go @@ -0,0 +1,124 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + pipeline_model "github.com/kubeflow/pipelines/backend/api/go_http_client/pipeline_model" +) + +// UpdatePipelineDefaultVersionReader is a Reader for the UpdatePipelineDefaultVersion structure. +type UpdatePipelineDefaultVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdatePipelineDefaultVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 200: + result := NewUpdatePipelineDefaultVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + result := NewUpdatePipelineDefaultVersionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewUpdatePipelineDefaultVersionOK creates a UpdatePipelineDefaultVersionOK with default headers values +func NewUpdatePipelineDefaultVersionOK() *UpdatePipelineDefaultVersionOK { + return &UpdatePipelineDefaultVersionOK{} +} + +/*UpdatePipelineDefaultVersionOK handles this case with default header values. + +A successful response. +*/ +type UpdatePipelineDefaultVersionOK struct { + Payload interface{} +} + +func (o *UpdatePipelineDefaultVersionOK) Error() string { + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] updatePipelineDefaultVersionOK %+v", 200, o.Payload) +} + +func (o *UpdatePipelineDefaultVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdatePipelineDefaultVersionDefault creates a UpdatePipelineDefaultVersionDefault with default headers values +func NewUpdatePipelineDefaultVersionDefault(code int) *UpdatePipelineDefaultVersionDefault { + return &UpdatePipelineDefaultVersionDefault{ + _statusCode: code, + } +} + +/*UpdatePipelineDefaultVersionDefault handles this case with default header values. + +UpdatePipelineDefaultVersionDefault update pipeline default version default +*/ +type UpdatePipelineDefaultVersionDefault struct { + _statusCode int + + Payload *pipeline_model.APIStatus +} + +// Code gets the status code for the update pipeline default version default response +func (o *UpdatePipelineDefaultVersionDefault) Code() int { + return o._statusCode +} + +func (o *UpdatePipelineDefaultVersionDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] UpdatePipelineDefaultVersion default %+v", o._statusCode, o.Payload) +} + +func (o *UpdatePipelineDefaultVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.APIStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/pipeline.proto b/backend/api/pipeline.proto index 2988de1ea8e..9a3db557701 100644 --- a/backend/api/pipeline.proto +++ b/backend/api/pipeline.proto @@ -139,6 +139,14 @@ service PipelineService { get: "/apis/v1beta1/pipeline_versions/{version_id}/templates" }; } + + // Update the default pipeline version of a specific pipeline. + rpc UpdatePipelineDefaultVersion(UpdatePipelineDefaultVersionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}" + + }; + } } message Url { @@ -153,6 +161,14 @@ message CreatePipelineRequest { Pipeline pipeline = 1; } +message UpdatePipelineDefaultVersionRequest { + // The ID of the pipeline to be updated. + string pipeline_id = 1; + + // The ID of the default version. + string version_id = 2; +} + message GetPipelineRequest { // The ID of the pipeline to be retrieved. string id = 1; diff --git a/backend/api/swagger/kfp_api_single_file.swagger.json b/backend/api/swagger/kfp_api_single_file.swagger.json index 4769a8edde8..358bd2e867d 100644 --- a/backend/api/swagger/kfp_api_single_file.swagger.json +++ b/backend/api/swagger/kfp_api_single_file.swagger.json @@ -1028,6 +1028,45 @@ ] } }, + "/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}": { + "post": { + "summary": "Update the default pipeline version of a specific pipeline.", + "operationId": "UpdatePipelineDefaultVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "", + "schema": { + "$ref": "#/definitions/apiStatus" + } + } + }, + "parameters": [ + { + "name": "pipeline_id", + "description": "The ID of the pipeline to be updated.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version_id", + "description": "The ID of the default version.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "PipelineService" + ] + } + }, "/apis/v1beta1/experiments": { "get": { "summary": "Finds all experiments. Supports pagination, and sorting on certain fields.", diff --git a/backend/api/swagger/pipeline.swagger.json b/backend/api/swagger/pipeline.swagger.json index 5f383bef958..6f1a971b835 100644 --- a/backend/api/swagger/pipeline.swagger.json +++ b/backend/api/swagger/pipeline.swagger.json @@ -396,6 +396,45 @@ "PipelineService" ] } + }, + "/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}": { + "post": { + "summary": "Update the default pipeline version of a specific pipeline.", + "operationId": "UpdatePipelineDefaultVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "", + "schema": { + "$ref": "#/definitions/apiStatus" + } + } + }, + "parameters": [ + { + "name": "pipeline_id", + "description": "The ID of the pipeline to be updated.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version_id", + "description": "The ID of the default version.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "PipelineService" + ] + } } }, "definitions": { diff --git a/backend/src/apiserver/resource/resource_manager.go b/backend/src/apiserver/resource/resource_manager.go index 63ea07c3d79..ec3d0311c13 100644 --- a/backend/src/apiserver/resource/resource_manager.go +++ b/backend/src/apiserver/resource/resource_manager.go @@ -234,6 +234,10 @@ func (r *ResourceManager) DeletePipeline(pipelineId string) error { return nil } +func (r *ResourceManager) UpdatePipelineDefaultVersion(pipelineId string, versionId string) error { + return r.pipelineStore.UpdatePipelineDefaultVersion(pipelineId, versionId) +} + func (r *ResourceManager) CreatePipeline(name string, description string, pipelineFile []byte) (*model.Pipeline, error) { // Extract the parameter from the pipeline params, err := util.GetParameters(pipelineFile) diff --git a/backend/src/apiserver/server/pipeline_server.go b/backend/src/apiserver/server/pipeline_server.go index b682357c373..54e7e97139f 100644 --- a/backend/src/apiserver/server/pipeline_server.go +++ b/backend/src/apiserver/server/pipeline_server.go @@ -79,6 +79,11 @@ var ( Name: "pipeline_server_pipeline_count", Help: "The current number of pipelines in Kubeflow Pipelines instance", }) + + updatePipelineDefaultVersionRequests = promauto.NewCounter(prometheus.CounterOpts{ + Name: "pipeline_server_update_default_version_requests", + Help: "The total number of UpdatePipelineDefaultVersion requests", + }) ) type PipelineServerOptions struct { @@ -128,6 +133,19 @@ func (s *PipelineServer) CreatePipeline(ctx context.Context, request *api.Create return ToApiPipeline(pipeline), nil } +func (s *PipelineServer) UpdatePipelineDefaultVersion(ctx context.Context, request *api.UpdatePipelineDefaultVersionRequest) (*empty.Empty, error) { + if s.options.CollectMetrics { + updatePipelineDefaultVersionRequests.Inc() + } + + err := s.resourceManager.UpdatePipelineDefaultVersion(request.PipelineId, request.VersionId) + if err != nil { + return nil, util.Wrap(err, "Update Pipeline Default Version failed.") + } + + return &empty.Empty{}, nil +} + func (s *PipelineServer) GetPipeline(ctx context.Context, request *api.GetPipelineRequest) (*api.Pipeline, error) { if s.options.CollectMetrics { getPipelineRequests.Inc() diff --git a/backend/src/common/client/api_server/pipeline_client.go b/backend/src/common/client/api_server/pipeline_client.go index 90d2d4a4d7d..31073642cc3 100644 --- a/backend/src/common/client/api_server/pipeline_client.go +++ b/backend/src/common/client/api_server/pipeline_client.go @@ -23,12 +23,35 @@ type PipelineInterface interface { List(params *params.ListPipelinesParams) ([]*model.APIPipeline, int, string, error) ListAll(params *params.ListPipelinesParams, maxResultSize int) ( []*model.APIPipeline, error) + UpdateDefaultVersion(params *params.UpdatePipelineDefaultVersionParams) error } type PipelineClient struct { apiClient *apiclient.Pipeline } +func (c *PipelineClient) UpdateDefaultVersion(parameters *params.UpdatePipelineDefaultVersionParams) error { + // Create context with timeout + ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) + defer cancel() + // Make service call + parameters.Context = ctx + _, err := c.apiClient.PipelineService.UpdatePipelineDefaultVersion(parameters, PassThroughAuth) + if err != nil { + if defaultError, ok := err.(*params.GetPipelineDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + } else { + err = CreateErrorCouldNotRecoverAPIStatus(err) + } + + return util.NewUserError(err, + fmt.Sprintf("Failed to update pipeline. Params: '%v'", parameters), + fmt.Sprintf("Failed to update pipeline '%v'", parameters.PipelineID)) + } + + return nil +} + func NewPipelineClient(clientConfig clientcmd.ClientConfig, debug bool) ( *PipelineClient, error) { diff --git a/backend/src/common/client/api_server/pipeline_client_fake.go b/backend/src/common/client/api_server/pipeline_client_fake.go index 9e7edd4fcde..47c6339bfd5 100644 --- a/backend/src/common/client/api_server/pipeline_client_fake.go +++ b/backend/src/common/client/api_server/pipeline_client_fake.go @@ -8,6 +8,7 @@ import ( workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" "github.com/ghodss/yaml" "github.com/go-openapi/strfmt" + params "github.com/kubeflow/pipelines/backend/api/go_http_client/pipeline_client/pipeline_service" pipelineparams "github.com/kubeflow/pipelines/backend/api/go_http_client/pipeline_client/pipeline_service" pipelinemodel "github.com/kubeflow/pipelines/backend/api/go_http_client/pipeline_model" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -128,3 +129,12 @@ func (c *PipelineClientFake) ListAll(params *pipelineparams.ListPipelinesParams, maxResultSize int) ([]*pipelinemodel.APIPipeline, error) { return listAllForPipeline(c, params, maxResultSize) } + +func (c *PipelineClientFake) UpdateDefaultVersion(params *params.UpdatePipelineDefaultVersionParams) error { + switch params.PipelineID { + case PipelineForClientErrorTest: + return fmt.Errorf(ClientErrorString) + default: + return nil + } +} diff --git a/backend/test/integration/pipeline_version_api_test.go b/backend/test/integration/pipeline_version_api_test.go index c5eccef0536..54e02a8dcde 100644 --- a/backend/test/integration/pipeline_version_api_test.go +++ b/backend/test/integration/pipeline_version_api_test.go @@ -84,7 +84,23 @@ func (s *PipelineVersionApiTest) TestPipelineVersionAPI() { assert.Nil(t, err) assert.Equal(t, "arguments-parameters.yaml", argumentYAMLPipelineVersion.Name) + /* ---------- Update pipeline default version ---------- */ + time.Sleep(1 * time.Second) + sortBy := "created_at" + versions, _, _, err := s.pipelineClient.ListPipelineVersions(¶ms.ListPipelineVersionsParams{ResourceKeyID: &pipelineId, SortBy: &sortBy}) + assert.Nil(t, err) + + err = s.pipelineClient.UpdateDefaultVersion(¶ms.UpdatePipelineDefaultVersionParams{PipelineID: pipelineId, + VersionID: versions[0].ID}) + assert.Nil(t, err) + + time.Sleep(1 * time.Second) + pipelineSelected, err := s.pipelineClient.Get(¶ms.GetPipelineParams{ID: pipelineId}) + assert.Nil(t, err) + assert.Equal(t, pipelineSelected.DefaultVersion.ID, versions[0].ID) + /* ---------- Upload the same pipeline version again. Should fail due to name uniqueness ---------- */ + time.Sleep(1 * time.Second) _, err = s.pipelineUploadClient.UploadPipelineVersion("../resources/arguments-parameters.yaml", uploadParams.NewUploadPipelineVersionParams()) assert.NotNil(t, err) assert.Contains(t, err.Error(), "Failed to upload pipeline version.")