diff --git a/reposerver/apiclient/mocks/RepoServerServiceClient.go b/reposerver/apiclient/mocks/RepoServerServiceClient.go index f9585f62b206c..f2e3d7fd512bf 100644 --- a/reposerver/apiclient/mocks/RepoServerServiceClient.go +++ b/reposerver/apiclient/mocks/RepoServerServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.3.0. DO NOT EDIT. +// Code generated by mockery v2.9.4. DO NOT EDIT. package mocks @@ -169,8 +169,8 @@ func (_m *RepoServerServiceClient) ListApps(ctx context.Context, in *apiclient.L return r0, r1 } -// -func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apiclient.TestRepositoryRequest, opts ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error) { +// ListRefs provides a mock function with given fields: ctx, in, opts +func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.ListRefsRequest, opts ...grpc.CallOption) (*apiclient.Refs, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -180,17 +180,17 @@ func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apicl _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *apiclient.TestRepositoryResponse - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) *apiclient.TestRepositoryResponse); ok { + var r0 *apiclient.Refs + if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) *apiclient.Refs); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiclient.TestRepositoryResponse) + r0 = ret.Get(0).(*apiclient.Refs) } } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -199,8 +199,8 @@ func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apicl return r0, r1 } -// ListRefs provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.ListRefsRequest, opts ...grpc.CallOption) (*apiclient.Refs, error) { +// ResolveRevision provides a mock function with given fields: ctx, in, opts +func (_m *RepoServerServiceClient) ResolveRevision(ctx context.Context, in *apiclient.ResolveRevisionRequest, opts ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -210,17 +210,47 @@ func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.L _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *apiclient.Refs - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) *apiclient.Refs); ok { + var r0 *apiclient.ResolveRevisionResponse + if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) *apiclient.ResolveRevisionResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiclient.Refs) + r0 = ret.Get(0).(*apiclient.ResolveRevisionResponse) } } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// TestRepository provides a mock function with given fields: ctx, in, opts +func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apiclient.TestRepositoryRequest, opts ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *apiclient.TestRepositoryResponse + if rf, ok := ret.Get(0).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) *apiclient.TestRepositoryResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*apiclient.TestRepositoryResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) diff --git a/reposerver/apiclient/repository.pb.go b/reposerver/apiclient/repository.pb.go index 5ba35362b7f62..a61884fb18b07 100644 --- a/reposerver/apiclient/repository.pb.go +++ b/reposerver/apiclient/repository.pb.go @@ -298,6 +298,127 @@ func (m *TestRepositoryResponse) GetVerifiedRepository() bool { return false } +// ResolveRevisionRequest +type ResolveRevisionRequest struct { + Repo *v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` + App *v1alpha1.Application `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"` + AmbiguousRevision string `protobuf:"bytes,3,opt,name=ambiguousRevision,proto3" json:"ambiguousRevision,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResolveRevisionRequest) Reset() { *m = ResolveRevisionRequest{} } +func (m *ResolveRevisionRequest) String() string { return proto.CompactTextString(m) } +func (*ResolveRevisionRequest) ProtoMessage() {} +func (*ResolveRevisionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_dd8723cfcc820480, []int{3} +} +func (m *ResolveRevisionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResolveRevisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResolveRevisionRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResolveRevisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResolveRevisionRequest.Merge(m, src) +} +func (m *ResolveRevisionRequest) XXX_Size() int { + return m.Size() +} +func (m *ResolveRevisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ResolveRevisionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ResolveRevisionRequest proto.InternalMessageInfo + +func (m *ResolveRevisionRequest) GetRepo() *v1alpha1.Repository { + if m != nil { + return m.Repo + } + return nil +} + +func (m *ResolveRevisionRequest) GetApp() *v1alpha1.Application { + if m != nil { + return m.App + } + return nil +} + +func (m *ResolveRevisionRequest) GetAmbiguousRevision() string { + if m != nil { + return m.AmbiguousRevision + } + return "" +} + +// ResolveRevisionResponse +type ResolveRevisionResponse struct { + // returns the resolved revision + Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` + AmbiguousRevision string `protobuf:"bytes,2,opt,name=ambiguousRevision,proto3" json:"ambiguousRevision,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResolveRevisionResponse) Reset() { *m = ResolveRevisionResponse{} } +func (m *ResolveRevisionResponse) String() string { return proto.CompactTextString(m) } +func (*ResolveRevisionResponse) ProtoMessage() {} +func (*ResolveRevisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dd8723cfcc820480, []int{4} +} +func (m *ResolveRevisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResolveRevisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResolveRevisionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResolveRevisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResolveRevisionResponse.Merge(m, src) +} +func (m *ResolveRevisionResponse) XXX_Size() int { + return m.Size() +} +func (m *ResolveRevisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ResolveRevisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ResolveRevisionResponse proto.InternalMessageInfo + +func (m *ResolveRevisionResponse) GetRevision() string { + if m != nil { + return m.Revision + } + return "" +} + +func (m *ResolveRevisionResponse) GetAmbiguousRevision() string { + if m != nil { + return m.AmbiguousRevision + } + return "" +} + type ManifestResponse struct { Manifests []string `protobuf:"bytes,1,rep,name=manifests,proto3" json:"manifests,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` @@ -316,7 +437,7 @@ func (m *ManifestResponse) Reset() { *m = ManifestResponse{} } func (m *ManifestResponse) String() string { return proto.CompactTextString(m) } func (*ManifestResponse) ProtoMessage() {} func (*ManifestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{3} + return fileDescriptor_dd8723cfcc820480, []int{5} } func (m *ManifestResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -398,7 +519,7 @@ func (m *ListRefsRequest) Reset() { *m = ListRefsRequest{} } func (m *ListRefsRequest) String() string { return proto.CompactTextString(m) } func (*ListRefsRequest) ProtoMessage() {} func (*ListRefsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{4} + return fileDescriptor_dd8723cfcc820480, []int{6} } func (m *ListRefsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -447,7 +568,7 @@ func (m *Refs) Reset() { *m = Refs{} } func (m *Refs) String() string { return proto.CompactTextString(m) } func (*Refs) ProtoMessage() {} func (*Refs) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{5} + return fileDescriptor_dd8723cfcc820480, []int{7} } func (m *Refs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -503,7 +624,7 @@ func (m *ListAppsRequest) Reset() { *m = ListAppsRequest{} } func (m *ListAppsRequest) String() string { return proto.CompactTextString(m) } func (*ListAppsRequest) ProtoMessage() {} func (*ListAppsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{6} + return fileDescriptor_dd8723cfcc820480, []int{8} } func (m *ListAppsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -558,7 +679,7 @@ func (m *AppList) Reset() { *m = AppList{} } func (m *AppList) String() string { return proto.CompactTextString(m) } func (*AppList) ProtoMessage() {} func (*AppList) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{7} + return fileDescriptor_dd8723cfcc820480, []int{9} } func (m *AppList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -613,7 +734,7 @@ func (m *RepoServerAppDetailsQuery) Reset() { *m = RepoServerAppDetailsQ func (m *RepoServerAppDetailsQuery) String() string { return proto.CompactTextString(m) } func (*RepoServerAppDetailsQuery) ProtoMessage() {} func (*RepoServerAppDetailsQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{8} + return fileDescriptor_dd8723cfcc820480, []int{10} } func (m *RepoServerAppDetailsQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,7 +835,7 @@ func (m *RepoAppDetailsResponse) Reset() { *m = RepoAppDetailsResponse{} func (m *RepoAppDetailsResponse) String() string { return proto.CompactTextString(m) } func (*RepoAppDetailsResponse) ProtoMessage() {} func (*RepoAppDetailsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{9} + return fileDescriptor_dd8723cfcc820480, []int{11} } func (m *RepoAppDetailsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -794,7 +915,7 @@ func (m *RepoServerRevisionMetadataRequest) Reset() { *m = RepoServerRev func (m *RepoServerRevisionMetadataRequest) String() string { return proto.CompactTextString(m) } func (*RepoServerRevisionMetadataRequest) ProtoMessage() {} func (*RepoServerRevisionMetadataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{10} + return fileDescriptor_dd8723cfcc820480, []int{12} } func (m *RepoServerRevisionMetadataRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -859,7 +980,7 @@ func (m *KsonnetAppSpec) Reset() { *m = KsonnetAppSpec{} } func (m *KsonnetAppSpec) String() string { return proto.CompactTextString(m) } func (*KsonnetAppSpec) ProtoMessage() {} func (*KsonnetAppSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{11} + return fileDescriptor_dd8723cfcc820480, []int{13} } func (m *KsonnetAppSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -928,7 +1049,7 @@ func (m *HelmAppSpec) Reset() { *m = HelmAppSpec{} } func (m *HelmAppSpec) String() string { return proto.CompactTextString(m) } func (*HelmAppSpec) ProtoMessage() {} func (*HelmAppSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{12} + return fileDescriptor_dd8723cfcc820480, []int{14} } func (m *HelmAppSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1005,7 +1126,7 @@ func (m *KustomizeAppSpec) Reset() { *m = KustomizeAppSpec{} } func (m *KustomizeAppSpec) String() string { return proto.CompactTextString(m) } func (*KustomizeAppSpec) ProtoMessage() {} func (*KustomizeAppSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{13} + return fileDescriptor_dd8723cfcc820480, []int{15} } func (m *KustomizeAppSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1057,7 +1178,7 @@ func (m *KsonnetEnvironment) Reset() { *m = KsonnetEnvironment{} } func (m *KsonnetEnvironment) String() string { return proto.CompactTextString(m) } func (*KsonnetEnvironment) ProtoMessage() {} func (*KsonnetEnvironment) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{14} + return fileDescriptor_dd8723cfcc820480, []int{16} } func (m *KsonnetEnvironment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1121,7 +1242,7 @@ func (m *KsonnetEnvironmentDestination) Reset() { *m = KsonnetEnvironmen func (m *KsonnetEnvironmentDestination) String() string { return proto.CompactTextString(m) } func (*KsonnetEnvironmentDestination) ProtoMessage() {} func (*KsonnetEnvironmentDestination) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{15} + return fileDescriptor_dd8723cfcc820480, []int{17} } func (m *KsonnetEnvironmentDestination) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1175,7 +1296,7 @@ func (m *DirectoryAppSpec) Reset() { *m = DirectoryAppSpec{} } func (m *DirectoryAppSpec) String() string { return proto.CompactTextString(m) } func (*DirectoryAppSpec) ProtoMessage() {} func (*DirectoryAppSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{16} + return fileDescriptor_dd8723cfcc820480, []int{18} } func (m *DirectoryAppSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1215,7 +1336,7 @@ func (m *HelmChartsRequest) Reset() { *m = HelmChartsRequest{} } func (m *HelmChartsRequest) String() string { return proto.CompactTextString(m) } func (*HelmChartsRequest) ProtoMessage() {} func (*HelmChartsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{17} + return fileDescriptor_dd8723cfcc820480, []int{19} } func (m *HelmChartsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1263,7 +1384,7 @@ func (m *HelmChart) Reset() { *m = HelmChart{} } func (m *HelmChart) String() string { return proto.CompactTextString(m) } func (*HelmChart) ProtoMessage() {} func (*HelmChart) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{18} + return fileDescriptor_dd8723cfcc820480, []int{20} } func (m *HelmChart) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1317,7 +1438,7 @@ func (m *HelmChartsResponse) Reset() { *m = HelmChartsResponse{} } func (m *HelmChartsResponse) String() string { return proto.CompactTextString(m) } func (*HelmChartsResponse) ProtoMessage() {} func (*HelmChartsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{19} + return fileDescriptor_dd8723cfcc820480, []int{21} } func (m *HelmChartsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1357,6 +1478,8 @@ func init() { proto.RegisterType((*ManifestRequest)(nil), "repository.ManifestRequest") proto.RegisterType((*TestRepositoryRequest)(nil), "repository.TestRepositoryRequest") proto.RegisterType((*TestRepositoryResponse)(nil), "repository.TestRepositoryResponse") + proto.RegisterType((*ResolveRevisionRequest)(nil), "repository.ResolveRevisionRequest") + proto.RegisterType((*ResolveRevisionResponse)(nil), "repository.ResolveRevisionResponse") proto.RegisterType((*ManifestResponse)(nil), "repository.ManifestResponse") proto.RegisterType((*ListRefsRequest)(nil), "repository.ListRefsRequest") proto.RegisterType((*Refs)(nil), "repository.Refs") @@ -1383,96 +1506,101 @@ func init() { } var fileDescriptor_dd8723cfcc820480 = []byte{ - // 1423 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x5b, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0x26, 0x4e, 0x62, 0x1f, 0xb7, 0x89, 0x33, 0xbd, 0xfc, 0xf7, 0x6f, 0x52, 0x2b, 0x5d, - 0x89, 0x2a, 0x50, 0xba, 0x56, 0xdd, 0x0a, 0xaa, 0x56, 0x42, 0x32, 0x69, 0x9b, 0x4a, 0x69, 0x9a, - 0xb0, 0x29, 0x48, 0xa0, 0x8a, 0x6a, 0xb2, 0x3e, 0x59, 0x0f, 0xb6, 0x77, 0xa7, 0xbb, 0x6b, 0xa3, - 0x54, 0xe2, 0x11, 0xf1, 0xc0, 0x33, 0x7c, 0x1d, 0x5e, 0xb8, 0x3d, 0xf2, 0x11, 0x50, 0xbf, 0x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 0xb5, 0xa6, 0xfc, 0x88, 0x22, 0x19, 0x8c, - 0x0f, 0xf1, 0x73, 0xf4, 0x65, 0x75, 0xad, 0x44, 0x45, 0xa2, 0x90, 0xa2, 0x32, 0x62, 0xf1, 0x2e, - 0xd0, 0x57, 0x37, 0x16, 0xa2, 0x32, 0x4a, 0x49, 0x64, 0x13, 0x56, 0x27, 0xe8, 0xb3, 0xa3, 0xe3, - 0x03, 0xe6, 0xb8, 0x34, 0x1c, 0xfb, 0xa8, 0x37, 0x64, 0x29, 0x16, 0xc9, 0x64, 0x04, 0xe7, 0xfb, - 0x38, 0x1c, 0x89, 0x94, 0x6f, 0xf9, 0xd8, 0x0b, 0xf4, 0x35, 0x99, 0xdf, 0xed, 0xd9, 0x6f, 0x50, - 0x9a, 0xb3, 0xf2, 0xd6, 0x45, 0x60, 0xae, 0x67, 0xc5, 0x2f, 0x25, 0x7a, 0x23, 0x24, 0x0a, 0xac, - 0x40, 0x26, 0xd7, 0x60, 0x25, 0xf4, 0xa9, 0x3d, 0x60, 0xae, 0xb3, 0x8b, 0x61, 0xdf, 0xeb, 0xe9, - 0x17, 0x64, 0x26, 0x0a, 0x54, 0x63, 0x0c, 0x97, 0x9e, 0xca, 0x67, 0x9f, 0xd6, 0xcc, 0x59, 0x00, - 0x80, 0xf1, 0x08, 0x2e, 0x17, 0xdd, 0x06, 0xdc, 0x73, 0x03, 0x24, 0x26, 0x10, 0x99, 0x64, 0x86, - 0xbd, 0x8c, 0x2b, 0xa3, 0xa8, 0x5a, 0x25, 0x1c, 0xe3, 0x37, 0x0d, 0x1a, 0x19, 0x78, 0xc5, 0x46, - 0xd6, 0xa1, 0x36, 0x8a, 0x69, 0x81, 0xae, 0xc9, 0x0b, 0xce, 0x08, 0x79, 0x2c, 0x98, 0x2f, 0x62, - 0xc1, 0x65, 0x58, 0x8a, 0x50, 0x5e, 0xc2, 0x4f, 0xcd, 0x8a, 0x77, 0x39, 0xcc, 0xaa, 0x14, 0x30, - 0xab, 0x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 0xf6, 0xe5, 0xb1, - 0xb3, 0xda, 0x23, 0x57, 0x4a, 0x8b, 0x2c, 0xcd, 0x5e, 0xeb, 0x24, 0x76, 0x72, 0xd4, 0x4f, 0xba, - 0x7f, 0xbc, 0x6a, 0x69, 0x7f, 0xbe, 0x6a, 0x69, 0x7f, 0xbd, 0x6a, 0x69, 0x5f, 0xde, 0xfa, 0x97, - 0xcf, 0x5b, 0xca, 0x97, 0x38, 0xca, 0x99, 0x3d, 0x64, 0xe8, 0x86, 0x87, 0x4b, 0xf2, 0x63, 0xd6, - 0xad, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x25, 0x4e, 0x84, 0xa1, 0xa8, 0x13, 0x00, 0x00, + // 1502 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x18, 0x5b, 0x6f, 0x1b, 0x45, + 0x37, 0xeb, 0x38, 0x17, 0x1f, 0xb7, 0x89, 0x33, 0xbd, 0xed, 0xb7, 0x5f, 0x1a, 0xa5, 0x8b, 0xa8, + 0x02, 0x6d, 0xd7, 0xaa, 0x5b, 0x41, 0xd5, 0x4a, 0x48, 0x26, 0x6d, 0x53, 0x94, 0xa6, 0x09, 0x9b, + 0x82, 0x04, 0x54, 0x54, 0x93, 0xf5, 0x64, 0x3d, 0x78, 0xbd, 0x3b, 0xdd, 0xd9, 0x35, 0x4a, 0x25, + 0x1e, 0x78, 0xe2, 0x81, 0x67, 0xf8, 0x3b, 0xbc, 0x70, 0x7b, 0xe4, 0x27, 0xa0, 0xf2, 0x2b, 0x78, + 0x43, 0x33, 0x7b, 0x5f, 0xaf, 0x03, 0x92, 0xd3, 0xf4, 0xc5, 0x9e, 0x39, 0xf7, 0x39, 0x73, 0x6e, + 0xb3, 0x70, 0xd5, 0x27, 0xcc, 0xe3, 0xc4, 0x1f, 0x11, 0xbf, 0x2d, 0x97, 0x34, 0xf0, 0xfc, 0xa3, + 0xdc, 0xd2, 0x60, 0xbe, 0x17, 0x78, 0x08, 0x32, 0x88, 0x76, 0xde, 0xf6, 0x6c, 0x4f, 0x82, 0xdb, + 0x62, 0x15, 0x51, 0x68, 0xab, 0xb6, 0xe7, 0xd9, 0x0e, 0x69, 0x63, 0x46, 0xdb, 0xd8, 0x75, 0xbd, + 0x00, 0x07, 0xd4, 0x73, 0x79, 0x8c, 0xd5, 0x07, 0x77, 0xb8, 0x41, 0x3d, 0x89, 0xb5, 0x3c, 0x9f, + 0xb4, 0x47, 0x37, 0xdb, 0x36, 0x71, 0x89, 0x8f, 0x03, 0xd2, 0x8b, 0x69, 0x1e, 0xdb, 0x34, 0xe8, + 0x87, 0x07, 0x86, 0xe5, 0x0d, 0xdb, 0xd8, 0x97, 0x2a, 0xbe, 0x92, 0x8b, 0x1b, 0x56, 0xaf, 0x3d, + 0xea, 0xb4, 0xd9, 0xc0, 0x16, 0xfc, 0xbc, 0x8d, 0x19, 0x73, 0xa8, 0x25, 0xe5, 0xb7, 0x47, 0x37, + 0xb1, 0xc3, 0xfa, 0x78, 0x4c, 0x9a, 0xfe, 0xf7, 0x02, 0x2c, 0xef, 0x60, 0x97, 0x1e, 0x12, 0x1e, + 0x98, 0xe4, 0x45, 0x48, 0x78, 0x80, 0x9e, 0x41, 0x5d, 0x9c, 0x43, 0x55, 0xd6, 0x95, 0x8d, 0x66, + 0xe7, 0x91, 0x91, 0x29, 0x34, 0x12, 0x85, 0x72, 0xf1, 0xdc, 0xea, 0x19, 0xa3, 0x8e, 0xc1, 0x06, + 0xb6, 0x21, 0x14, 0x1a, 0x39, 0x85, 0x46, 0xa2, 0xd0, 0x30, 0x53, 0x8f, 0x98, 0x52, 0x2a, 0xd2, + 0x60, 0xd1, 0x27, 0x23, 0xca, 0xa9, 0xe7, 0xaa, 0xb5, 0x75, 0x65, 0xa3, 0x61, 0xa6, 0x7b, 0xa4, + 0xc2, 0x82, 0xeb, 0x6d, 0x62, 0xab, 0x4f, 0xd4, 0x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b, + 0xb2, 0xfe, 0xc7, 0xa3, 0x01, 0x7a, 0xbb, 0xa8, 0x64, 0xc2, 0xf4, 0xa9, 0xe9, 0x65, 0xb2, 0xf1, + 0xe9, 0x42, 0x9f, 0x41, 0x3f, 0x2a, 0x70, 0x6e, 0x8b, 0x04, 0xe5, 0x4e, 0x8b, 0x6e, 0x54, 0x2b, + 0x99, 0xd0, 0x91, 0xb5, 0x27, 0xd3, 0x66, 0x44, 0x51, 0xac, 0x3e, 0x83, 0xf6, 0xe4, 0xb1, 0xb3, + 0xc8, 0x46, 0x97, 0x2b, 0x43, 0x38, 0xf5, 0xde, 0xda, 0x24, 0x74, 0x72, 0xd4, 0x0f, 0xbb, 0xbf, + 0xbf, 0x5a, 0x53, 0xfe, 0x78, 0xb5, 0xa6, 0xfc, 0xf9, 0x6a, 0x4d, 0xf9, 0xfc, 0xd6, 0xbf, 0x7c, + 0xa5, 0xcc, 0x7d, 0x50, 0xc5, 0x8c, 0x5a, 0x0e, 0x25, 0x6e, 0x70, 0x30, 0x2f, 0xbf, 0x49, 0xde, + 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xdf, 0x39, 0x38, 0x6f, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1491,6 +1619,8 @@ type RepoServerServiceClient interface { GenerateManifest(ctx context.Context, in *ManifestRequest, opts ...grpc.CallOption) (*ManifestResponse, error) // Returns a bool val if the repository is valid and has proper access TestRepository(ctx context.Context, in *TestRepositoryRequest, opts ...grpc.CallOption) (*TestRepositoryResponse, error) + // Returns a valid revision + ResolveRevision(ctx context.Context, in *ResolveRevisionRequest, opts ...grpc.CallOption) (*ResolveRevisionResponse, error) // Returns a list of refs (e.g. branches and tags) in the repo ListRefs(ctx context.Context, in *ListRefsRequest, opts ...grpc.CallOption) (*Refs, error) // ListApps returns a list of apps in the repo @@ -1529,6 +1659,15 @@ func (c *repoServerServiceClient) TestRepository(ctx context.Context, in *TestRe return out, nil } +func (c *repoServerServiceClient) ResolveRevision(ctx context.Context, in *ResolveRevisionRequest, opts ...grpc.CallOption) (*ResolveRevisionResponse, error) { + out := new(ResolveRevisionResponse) + err := c.cc.Invoke(ctx, "/repository.RepoServerService/ResolveRevision", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *repoServerServiceClient) ListRefs(ctx context.Context, in *ListRefsRequest, opts ...grpc.CallOption) (*Refs, error) { out := new(Refs) err := c.cc.Invoke(ctx, "/repository.RepoServerService/ListRefs", in, out, opts...) @@ -1580,6 +1719,8 @@ type RepoServerServiceServer interface { GenerateManifest(context.Context, *ManifestRequest) (*ManifestResponse, error) // Returns a bool val if the repository is valid and has proper access TestRepository(context.Context, *TestRepositoryRequest) (*TestRepositoryResponse, error) + // Returns a valid revision + ResolveRevision(context.Context, *ResolveRevisionRequest) (*ResolveRevisionResponse, error) // Returns a list of refs (e.g. branches and tags) in the repo ListRefs(context.Context, *ListRefsRequest) (*Refs, error) // ListApps returns a list of apps in the repo @@ -1602,6 +1743,9 @@ func (*UnimplementedRepoServerServiceServer) GenerateManifest(ctx context.Contex func (*UnimplementedRepoServerServiceServer) TestRepository(ctx context.Context, req *TestRepositoryRequest) (*TestRepositoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestRepository not implemented") } +func (*UnimplementedRepoServerServiceServer) ResolveRevision(ctx context.Context, req *ResolveRevisionRequest) (*ResolveRevisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResolveRevision not implemented") +} func (*UnimplementedRepoServerServiceServer) ListRefs(ctx context.Context, req *ListRefsRequest) (*Refs, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRefs not implemented") } @@ -1658,6 +1802,24 @@ func _RepoServerService_TestRepository_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _RepoServerService_ResolveRevision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResolveRevisionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepoServerServiceServer).ResolveRevision(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/repository.RepoServerService/ResolveRevision", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepoServerServiceServer).ResolveRevision(ctx, req.(*ResolveRevisionRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _RepoServerService_ListRefs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRefsRequest) if err := dec(in); err != nil { @@ -1760,6 +1922,10 @@ var _RepoServerService_serviceDesc = grpc.ServiceDesc{ MethodName: "TestRepository", Handler: _RepoServerService_TestRepository_Handler, }, + { + MethodName: "ResolveRevision", + Handler: _RepoServerService_ResolveRevision_Handler, + }, { MethodName: "ListRefs", Handler: _RepoServerService_ListRefs_Handler, @@ -2055,6 +2221,105 @@ func (m *TestRepositoryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *ResolveRevisionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResolveRevisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResolveRevisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.AmbiguousRevision) > 0 { + i -= len(m.AmbiguousRevision) + copy(dAtA[i:], m.AmbiguousRevision) + i = encodeVarintRepository(dAtA, i, uint64(len(m.AmbiguousRevision))) + i-- + dAtA[i] = 0x1a + } + if m.App != nil { + { + size, err := m.App.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Repo != nil { + { + size, err := m.Repo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResolveRevisionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResolveRevisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResolveRevisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.AmbiguousRevision) > 0 { + i -= len(m.AmbiguousRevision) + copy(dAtA[i:], m.AmbiguousRevision) + i = encodeVarintRepository(dAtA, i, uint64(len(m.AmbiguousRevision))) + i-- + dAtA[i] = 0x12 + } + if len(m.Revision) > 0 { + i -= len(m.Revision) + copy(dAtA[i:], m.Revision) + i = encodeVarintRepository(dAtA, i, uint64(len(m.Revision))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ManifestResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3106,6 +3371,50 @@ func (m *TestRepositoryResponse) Size() (n int) { return n } +func (m *ResolveRevisionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Repo != nil { + l = m.Repo.Size() + n += 1 + l + sovRepository(uint64(l)) + } + if m.App != nil { + l = m.App.Size() + n += 1 + l + sovRepository(uint64(l)) + } + l = len(m.AmbiguousRevision) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ResolveRevisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Revision) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) + } + l = len(m.AmbiguousRevision) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *ManifestResponse) Size() (n int) { if m == nil { return 0 @@ -4235,6 +4544,276 @@ func (m *TestRepositoryResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResolveRevisionRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResolveRevisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResolveRevisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Repo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Repo == nil { + m.Repo = &v1alpha1.Repository{} + } + if err := m.Repo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field App", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.App == nil { + m.App = &v1alpha1.Application{} + } + if err := m.App.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AmbiguousRevision", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AmbiguousRevision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRepository(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRepository + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResolveRevisionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResolveRevisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResolveRevisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Revision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AmbiguousRevision", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AmbiguousRevision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRepository(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRepository + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ManifestResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 2721261e1026e..2f99e1474b549 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -1645,3 +1645,52 @@ func (s *Service) TestRepository(ctx context.Context, q *apiclient.TestRepositor } return apiResp, nil } + +// ResolveRevision resolves the revision/ambiguousRevision specified in the ResolveRevisionRequest request into a concrete revision. +func (s *Service) ResolveRevision(ctx context.Context, q *apiclient.ResolveRevisionRequest) (*apiclient.ResolveRevisionResponse, error) { + + repo := q.Repo + app := q.App + ambiguousRevision := q.AmbiguousRevision + var revision string + if app.Spec.Source.IsHelm() { + + if helm.IsVersion(ambiguousRevision) { + return &apiclient.ResolveRevisionResponse{Revision: ambiguousRevision, AmbiguousRevision: ambiguousRevision}, nil + } + client := helm.NewClient(repo.Repo, repo.GetHelmCreds(), repo.EnableOCI || app.Spec.Source.IsHelmOci(), repo.Proxy) + index, err := client.GetIndex(false) + if err != nil { + return &apiclient.ResolveRevisionResponse{Revision: "", AmbiguousRevision: ""}, err + } + entries, err := index.GetEntries(app.Spec.Source.Chart) + if err != nil { + return &apiclient.ResolveRevisionResponse{Revision: "", AmbiguousRevision: ""}, err + } + constraints, err := semver.NewConstraint(ambiguousRevision) + if err != nil { + return &apiclient.ResolveRevisionResponse{Revision: "", AmbiguousRevision: ""}, err + } + version, err := entries.MaxVersion(constraints) + if err != nil { + return &apiclient.ResolveRevisionResponse{Revision: "", AmbiguousRevision: ""}, err + } + return &apiclient.ResolveRevisionResponse{ + Revision: version.String(), + AmbiguousRevision: fmt.Sprintf("%v (%v)", ambiguousRevision, version.String()), + }, nil + } else { + gitClient, err := git.NewClient(repo.Repo, repo.GetGitCreds(), repo.IsInsecure(), repo.IsLFSEnabled(), repo.Proxy) + if err != nil { + return &apiclient.ResolveRevisionResponse{Revision: "", AmbiguousRevision: ""}, err + } + revision, err = gitClient.LsRemote(ambiguousRevision) + if err != nil { + return &apiclient.ResolveRevisionResponse{Revision: "", AmbiguousRevision: ""}, err + } + return &apiclient.ResolveRevisionResponse{ + Revision: revision, + AmbiguousRevision: fmt.Sprintf("%s (%s)", ambiguousRevision, revision), + }, nil + } +} diff --git a/reposerver/repository/repository.proto b/reposerver/repository/repository.proto index 1a4effbbecec7..c9fb0a3e00806 100644 --- a/reposerver/repository/repository.proto +++ b/reposerver/repository/repository.proto @@ -42,6 +42,20 @@ message TestRepositoryResponse { bool verifiedRepository = 1; } +// ResolveRevisionRequest +message ResolveRevisionRequest { + github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Repository repo = 1; + github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application app = 2; + string ambiguousRevision = 3; +} + +// ResolveRevisionResponse +message ResolveRevisionResponse { + // returns the resolved revision + string revision = 1; + string ambiguousRevision = 2; +} + message ManifestResponse { repeated string manifests = 1; string namespace = 2; @@ -174,6 +188,10 @@ service RepoServerService { // Returns a bool val if the repository is valid and has proper access rpc TestRepository(TestRepositoryRequest) returns (TestRepositoryResponse) { } + + // Returns a valid revision + rpc ResolveRevision(ResolveRevisionRequest) returns (ResolveRevisionResponse) { + } // Returns a list of refs (e.g. branches and tags) in the repo rpc ListRefs(ListRefsRequest) returns (Refs) { diff --git a/reposerver/repository/repository_test.go b/reposerver/repository/repository_test.go index 7ede399f37800..4f1dc92a32b46 100644 --- a/reposerver/repository/repository_test.go +++ b/reposerver/repository/repository_test.go @@ -1587,3 +1587,47 @@ func Test_getHelmDependencyRepos(t *testing.T) { assert.Equal(t, repos[0].Repo, repo1) assert.Equal(t, repos[1].Repo, repo2) } + +func TestResolveRevision(t *testing.T) { + + service := newService(".") + repo := &argoappv1.Repository{Repo: "https://github.com/argoproj/argo-cd"} + app := &argoappv1.Application{} + resolveRevisionResponse, err := service.ResolveRevision(context.Background(), &apiclient.ResolveRevisionRequest{ + Repo: repo, + App: app, + AmbiguousRevision: "v2.2.2", + }) + + expectedResolveRevisionResponse := &apiclient.ResolveRevisionResponse{ + Revision: "03b17e0233e64787ffb5fcf65c740cc2a20822ba", + AmbiguousRevision: "v2.2.2 (03b17e0233e64787ffb5fcf65c740cc2a20822ba)", + } + + assert.NotNil(t, resolveRevisionResponse.Revision) + assert.Nil(t, err) + assert.Equal(t, expectedResolveRevisionResponse, resolveRevisionResponse) + +} + +func TestResolveRevisionNegativeScenarios(t *testing.T) { + + service := newService(".") + repo := &argoappv1.Repository{Repo: "https://github.com/argoproj/argo-cd"} + app := &argoappv1.Application{} + resolveRevisionResponse, err := service.ResolveRevision(context.Background(), &apiclient.ResolveRevisionRequest{ + Repo: repo, + App: app, + AmbiguousRevision: "v2.a.2", + }) + + expectedResolveRevisionResponse := &apiclient.ResolveRevisionResponse{ + Revision: "", + AmbiguousRevision: "", + } + + assert.NotNil(t, resolveRevisionResponse.Revision) + assert.NotNil(t, err) + assert.Equal(t, expectedResolveRevisionResponse, resolveRevisionResponse) + +} diff --git a/server/application/application.go b/server/application/application.go index c7474f53a860e..21079d9fde352 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -11,7 +11,6 @@ import ( "strings" "time" - "github.com/Masterminds/semver" kubecache "github.com/argoproj/gitops-engine/pkg/cache" "github.com/argoproj/gitops-engine/pkg/diff" "github.com/argoproj/gitops-engine/pkg/sync/common" @@ -50,7 +49,7 @@ import ( "github.com/argoproj/argo-cd/v2/util/db" "github.com/argoproj/argo-cd/v2/util/env" "github.com/argoproj/argo-cd/v2/util/git" - "github.com/argoproj/argo-cd/v2/util/helm" + "github.com/argoproj/argo-cd/v2/util/io" ioutil "github.com/argoproj/argo-cd/v2/util/io" "github.com/argoproj/argo-cd/v2/util/lua" "github.com/argoproj/argo-cd/v2/util/rbac" @@ -1512,52 +1511,32 @@ func (s *Server) resolveRevision(ctx context.Context, app *appv1.Application, sy if ambiguousRevision == "" { ambiguousRevision = app.Spec.Source.TargetRevision } - var revision string - if app.Spec.Source.IsHelm() { - repo, err := s.db.GetRepository(ctx, app.Spec.Source.RepoURL) - if err != nil { - return "", "", err - } - if helm.IsVersion(ambiguousRevision) { - return ambiguousRevision, ambiguousRevision, nil - } - client := helm.NewClient(repo.Repo, repo.GetHelmCreds(), repo.EnableOCI || app.Spec.Source.IsHelmOci(), repo.Proxy) - index, err := client.GetIndex(false) - if err != nil { - return "", "", err - } - entries, err := index.GetEntries(app.Spec.Source.Chart) - if err != nil { - return "", "", err - } - constraints, err := semver.NewConstraint(ambiguousRevision) - if err != nil { - return "", "", err - } - version, err := entries.MaxVersion(constraints) - if err != nil { - return "", "", err - } - return version.String(), fmt.Sprintf("%v (%v)", ambiguousRevision, version.String()), nil - } else { + repo, err := s.db.GetRepository(ctx, app.Spec.Source.RepoURL) + if err != nil { + return "", "", err + } + conn, repoClient, err := s.repoClientset.NewRepoServerClient() + if err != nil { + return "", "", err + } + defer io.Close(conn) + + if !app.Spec.Source.IsHelm() { if git.IsCommitSHA(ambiguousRevision) { // If it's already a commit SHA, then no need to look it up return ambiguousRevision, ambiguousRevision, nil } - repo, err := s.db.GetRepository(ctx, app.Spec.Source.RepoURL) - if err != nil { - return "", "", err - } - gitClient, err := git.NewClient(repo.Repo, repo.GetGitCreds(), repo.IsInsecure(), repo.IsLFSEnabled(), repo.Proxy) - if err != nil { - return "", "", err - } - revision, err = gitClient.LsRemote(ambiguousRevision) - if err != nil { - return "", "", err - } - return revision, fmt.Sprintf("%s (%s)", ambiguousRevision, revision), nil } + + resolveRevisionResponse, err := repoClient.ResolveRevision(ctx, &apiclient.ResolveRevisionRequest{ + Repo: repo, + App: app, + AmbiguousRevision: ambiguousRevision, + }) + if err != nil { + return "", "", err + } + return resolveRevisionResponse.Revision, resolveRevisionResponse.AmbiguousRevision, nil } func (s *Server) TerminateOperation(ctx context.Context, termOpReq *application.OperationTerminateRequest) (*application.OperationTerminateResponse, error) { diff --git a/server/application/application_test.go b/server/application/application_test.go index c2e51840ee355..cf388b2983ad8 100644 --- a/server/application/application_test.go +++ b/server/application/application_test.go @@ -72,6 +72,36 @@ func fakeAppList() *apiclient.AppList { } } +func fakeResolveRevesionResponse() *apiclient.ResolveRevisionResponse { + return &apiclient.ResolveRevisionResponse{ + Revision: "f9ba9e98119bf8c1176fbd65dbae26a71d044add", + AmbiguousRevision: "HEAD (f9ba9e98119bf8c1176fbd65dbae26a71d044add)", + } +} + +func fakeResolveRevesionResponseHelm() *apiclient.ResolveRevisionResponse { + return &apiclient.ResolveRevisionResponse{ + Revision: "0.7.*", + AmbiguousRevision: "0.7.* (0.7.2)", + } +} + +func fakeRepoServerClient(isHelm bool) *mocks.RepoServerServiceClient { + mockRepoServiceClient := mocks.RepoServerServiceClient{} + mockRepoServiceClient.On("ListApps", mock.Anything, mock.Anything).Return(fakeAppList(), nil) + mockRepoServiceClient.On("GenerateManifest", mock.Anything, mock.Anything).Return(&apiclient.ManifestResponse{}, nil) + mockRepoServiceClient.On("GetAppDetails", mock.Anything, mock.Anything).Return(&apiclient.RepoAppDetailsResponse{}, nil) + mockRepoServiceClient.On("TestRepository", mock.Anything, mock.Anything).Return(&apiclient.TestRepositoryResponse{}, nil) + + if isHelm { + mockRepoServiceClient.On("ResolveRevision", mock.Anything, mock.Anything).Return(fakeResolveRevesionResponseHelm(), nil) + } else { + mockRepoServiceClient.On("ResolveRevision", mock.Anything, mock.Anything).Return(fakeResolveRevesionResponse(), nil) + } + + return &mockRepoServiceClient +} + // return an ApplicationServiceServer which returns fake data func newTestAppServer(objects ...runtime.Object) *Server { f := func(enf *rbac.Enforcer) { @@ -107,13 +137,7 @@ func newTestAppServerWithEnforcerConfigure(f func(*rbac.Enforcer), objects ...ru _, err = db.CreateCluster(ctx, fakeCluster()) errors.CheckError(err) - mockRepoServiceClient := mocks.RepoServerServiceClient{} - mockRepoServiceClient.On("ListApps", mock.Anything, mock.Anything).Return(fakeAppList(), nil) - mockRepoServiceClient.On("GenerateManifest", mock.Anything, mock.Anything).Return(&apiclient.ManifestResponse{}, nil) - mockRepoServiceClient.On("GetAppDetails", mock.Anything, mock.Anything).Return(&apiclient.RepoAppDetailsResponse{}, nil) - mockRepoServiceClient.On("TestRepository", mock.Anything, mock.Anything).Return(&apiclient.TestRepositoryResponse{}, nil) - - mockRepoClient := &mocks.Clientset{RepoServerServiceClient: &mockRepoServiceClient} + mockRepoClient := &mocks.Clientset{RepoServerServiceClient: fakeRepoServerClient(false)} defaultProj := &appsv1.AppProject{ ObjectMeta: metav1.ObjectMeta{Name: "default", Namespace: "default"}, @@ -491,7 +515,6 @@ func TestSyncAndTerminate(t *testing.T) { } app, err := appServer.Create(ctx, &createReq) assert.Nil(t, err) - app, err = appServer.Sync(ctx, &application.ApplicationSyncRequest{Name: &app.Name}) assert.Nil(t, err) assert.NotNil(t, app) @@ -531,6 +554,8 @@ func TestSyncHelm(t *testing.T) { testApp.Spec.Source.Chart = "argo-cd" testApp.Spec.Source.TargetRevision = "0.7.*" + appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: fakeRepoServerClient(true)} + app, err := appServer.Create(ctx, &application.ApplicationCreateRequest{Application: *testApp}) assert.NoError(t, err)