From 3fb8761ad0dbf892dac237b27372f35690955c7a Mon Sep 17 00:00:00 2001 From: Lukasz Zajaczkowski Date: Mon, 4 Nov 2024 12:45:17 +0100 Subject: [PATCH] bump console client (#572) * bump console client * gen mocks --- go.mod | 2 +- go.sum | 4 ++-- hack/gen-client-mocks.sh | 2 +- pkg/console/console.go | 2 +- pkg/console/pipelines.go | 2 +- pkg/test/mocks/Client.go | 2 +- pkg/test/mocks/ConsoleClient.go | 12 ++++++------ pkg/test/mocks/Kube.go | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index d92dd409b..25832aa40 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/packethost/packngo v0.29.0 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 - github.com/pluralsh/console/go/client v1.17.1-0.20240918005717-8285a4b181b1 + github.com/pluralsh/console/go/client v1.22.3 github.com/pluralsh/console/go/controller v0.0.0-20240918005717-8285a4b181b1 github.com/pluralsh/gqlclient v1.12.2 github.com/pluralsh/plural-operator v0.5.5 diff --git a/go.sum b/go.sum index 8318c33ff..e9fb9d362 100644 --- a/go.sum +++ b/go.sum @@ -1699,8 +1699,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pluralsh/console/go/client v1.17.1-0.20240918005717-8285a4b181b1 h1:aTQquJlO/yMJNy+D4q/9OYDWrTabWgIzTG+prOPuBmY= -github.com/pluralsh/console/go/client v1.17.1-0.20240918005717-8285a4b181b1/go.mod h1:lpoWASYsM9keNePS3dpFiEisUHEfObIVlSL3tzpKn8k= +github.com/pluralsh/console/go/client v1.22.3 h1:5CUV4E/EH5G84ZVIIdr4NuUzM92AKUrZBLEh2SjLeEc= +github.com/pluralsh/console/go/client v1.22.3/go.mod h1:lpoWASYsM9keNePS3dpFiEisUHEfObIVlSL3tzpKn8k= github.com/pluralsh/console/go/controller v0.0.0-20240918005717-8285a4b181b1 h1:AXudlzS4Q8Y8J+0Q+kb8b4D/2tok4mryTJOKRvRlzJA= github.com/pluralsh/console/go/controller v0.0.0-20240918005717-8285a4b181b1/go.mod h1:B0WeS6z0Ila4kTBosiMOjNsTKNHrvXRJuLoPT37MEzU= github.com/pluralsh/controller-reconcile-helper v0.0.4 h1:1o+7qYSyoeqKFjx+WgQTxDz4Q2VMpzprJIIKShxqG0E= diff --git a/hack/gen-client-mocks.sh b/hack/gen-client-mocks.sh index c861b47b1..9847f224b 100755 --- a/hack/gen-client-mocks.sh +++ b/hack/gen-client-mocks.sh @@ -6,7 +6,7 @@ cd $(dirname $0)/.. source hack/lib.sh -CONTAINERIZE_IMAGE=golang:1.22.5 containerize ./hack/gen-client-mocks.sh +CONTAINERIZE_IMAGE=golang:1.23.1 containerize ./hack/gen-client-mocks.sh go run github.com/vektra/mockery/v2@latest --dir=pkg/api/ --name=Client --output=pkg/test/mocks go run github.com/vektra/mockery/v2@latest --dir=pkg/kubernetes --name=Kube --output=pkg/test/mocks diff --git a/pkg/console/console.go b/pkg/console/console.go index f9dd928c7..16caf9103 100644 --- a/pkg/console/console.go +++ b/pkg/console/console.go @@ -42,7 +42,7 @@ type ConsoleClient interface { ListProviders() (*consoleclient.ListProviders, error) CreateProviderCredentials(name string, attr consoleclient.ProviderCredentialAttributes) (*consoleclient.CreateProviderCredential, error) DeleteProviderCredentials(id string) (*consoleclient.DeleteProviderCredential, error) - SavePipeline(name string, attrs consoleclient.PipelineAttributes) (*consoleclient.PipelineFragment, error) + SavePipeline(name string, attrs consoleclient.PipelineAttributes) (*consoleclient.PipelineFragmentMinimal, error) CreatePipelineContext(id string, attrs consoleclient.PipelineContextAttributes) (*consoleclient.PipelineContextFragment, error) GetPipelineContext(id string) (*consoleclient.PipelineContextFragment, error) CreateCluster(attributes consoleclient.ClusterAttributes) (*consoleclient.CreateCluster, error) diff --git a/pkg/console/pipelines.go b/pkg/console/pipelines.go index d35ce3d41..0215c9b40 100644 --- a/pkg/console/pipelines.go +++ b/pkg/console/pipelines.go @@ -44,7 +44,7 @@ type Gate struct { Cluster string `json:"cluster"` } -func (c *consoleClient) SavePipeline(name string, attrs gqlclient.PipelineAttributes) (*gqlclient.PipelineFragment, error) { +func (c *consoleClient) SavePipeline(name string, attrs gqlclient.PipelineAttributes) (*gqlclient.PipelineFragmentMinimal, error) { result, err := c.client.SavePipeline(c.ctx, name, attrs) if err != nil { return nil, api.GetErrorResponse(err, "SavePipeline") diff --git a/pkg/test/mocks/Client.go b/pkg/test/mocks/Client.go index 64a79f0a7..81e29523b 100644 --- a/pkg/test/mocks/Client.go +++ b/pkg/test/mocks/Client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.45.0. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package mocks diff --git a/pkg/test/mocks/ConsoleClient.go b/pkg/test/mocks/ConsoleClient.go index 881added5..62abed716 100644 --- a/pkg/test/mocks/ConsoleClient.go +++ b/pkg/test/mocks/ConsoleClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.45.0. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package mocks @@ -904,23 +904,23 @@ func (_m *ConsoleClient) MyCluster() (*client.MyCluster, error) { } // SavePipeline provides a mock function with given fields: name, attrs -func (_m *ConsoleClient) SavePipeline(name string, attrs client.PipelineAttributes) (*client.PipelineFragment, error) { +func (_m *ConsoleClient) SavePipeline(name string, attrs client.PipelineAttributes) (*client.PipelineFragmentMinimal, error) { ret := _m.Called(name, attrs) if len(ret) == 0 { panic("no return value specified for SavePipeline") } - var r0 *client.PipelineFragment + var r0 *client.PipelineFragmentMinimal var r1 error - if rf, ok := ret.Get(0).(func(string, client.PipelineAttributes) (*client.PipelineFragment, error)); ok { + if rf, ok := ret.Get(0).(func(string, client.PipelineAttributes) (*client.PipelineFragmentMinimal, error)); ok { return rf(name, attrs) } - if rf, ok := ret.Get(0).(func(string, client.PipelineAttributes) *client.PipelineFragment); ok { + if rf, ok := ret.Get(0).(func(string, client.PipelineAttributes) *client.PipelineFragmentMinimal); ok { r0 = rf(name, attrs) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*client.PipelineFragment) + r0 = ret.Get(0).(*client.PipelineFragmentMinimal) } } diff --git a/pkg/test/mocks/Kube.go b/pkg/test/mocks/Kube.go index d1a9dc6cf..f9a3511be 100644 --- a/pkg/test/mocks/Kube.go +++ b/pkg/test/mocks/Kube.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.45.0. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package mocks