diff --git a/go.mod b/go.mod index f1db2c89..da77c1fc 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/open-policy-agent/gatekeeper/v3 v3.17.1 github.com/orcaman/concurrent-map/v2 v2.0.1 github.com/pkg/errors v0.9.1 - github.com/pluralsh/console/go/client v1.22.3 + github.com/pluralsh/console/go/client v1.22.5 github.com/pluralsh/controller-reconcile-helper v0.1.0 github.com/pluralsh/gophoenix v0.1.3-0.20231201014135-dff1b4309e34 github.com/pluralsh/polly v0.1.10 diff --git a/go.sum b/go.sum index ab52064b..7af683a4 100644 --- a/go.sum +++ b/go.sum @@ -666,8 +666,8 @@ github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rK github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -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/client v1.22.5 h1:kOc2uP0Nrgh5IyiqfQTEAKQr4aXEUEYr697FLmeAaN0= +github.com/pluralsh/console/go/client v1.22.5/go.mod h1:lpoWASYsM9keNePS3dpFiEisUHEfObIVlSL3tzpKn8k= github.com/pluralsh/controller-reconcile-helper v0.1.0 h1:BV3dYZFH5rn8ZvZjtpkACSv/GmLEtRftNQj/Y4ddHEo= github.com/pluralsh/controller-reconcile-helper v0.1.0/go.mod h1:RxAbvSB4/jkvx616krCdNQXPbpGJXW3J1L3rASxeFOA= github.com/pluralsh/gophoenix v0.1.3-0.20231201014135-dff1b4309e34 h1:ab2PN+6if/Aq3/sJM0AVdy1SYuMAnq4g20VaKhTm/Bw= diff --git a/internal/controller/stackrunjob_controller_test.go b/internal/controller/stackrunjob_controller_test.go index 4ebe3eb0..b756ee69 100644 --- a/internal/controller/stackrunjob_controller_test.go +++ b/internal/controller/stackrunjob_controller_test.go @@ -110,11 +110,11 @@ var _ = Describe("Stack Run Job Controller", Ordered, func() { runId := strings.TrimPrefix(completedName, "stack-") fakeConsoleClient := mocks.NewClientMock(mocks.TestingT) - fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunFragment{ + fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunMinimalFragment{ ID: runId, Status: console.StackStatusSuccessful, }, nil) - fakeConsoleClient.On("UpdateStackRun", runId, mock.Anything).Return(&console.StackRunFragment{}, nil) + fakeConsoleClient.On("UpdateStackRun", runId, mock.Anything).Return(&console.StackRunMinimalFragment{}, nil) reconciler := &StackRunJobReconciler{ Client: kClient, @@ -129,7 +129,7 @@ var _ = Describe("Stack Run Job Controller", Ordered, func() { runId := strings.TrimPrefix(completedName, "stack-") fakeConsoleClient := mocks.NewClientMock(mocks.TestingT) - fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunFragment{ + fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunMinimalFragment{ ID: runId, Status: console.StackStatusSuccessful, }, nil) @@ -145,7 +145,7 @@ var _ = Describe("Stack Run Job Controller", Ordered, func() { It("should exit without errors as stack run status was already updated", func() { fakeConsoleClient := mocks.NewClientMock(mocks.TestingT) - fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunFragment{ + fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunMinimalFragment{ ID: "2", Status: console.StackStatusFailed, }, nil) @@ -163,7 +163,7 @@ var _ = Describe("Stack Run Job Controller", Ordered, func() { runId := strings.TrimPrefix(runningName, "stack-") fakeConsoleClient := mocks.NewClientMock(mocks.TestingT) - fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunFragment{ + fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunMinimalFragment{ ID: runId, Status: console.StackStatusRunning, }, nil) diff --git a/pkg/client/console.go b/pkg/client/console.go index 37d2010a..56cd0717 100644 --- a/pkg/client/console.go +++ b/pkg/client/console.go @@ -61,12 +61,12 @@ type Client interface { GetNamespace(id string) (*console.ManagedNamespaceFragment, error) ListNamespaces(after *string, first *int64) (*console.ListClusterNamespaces_ClusterManagedNamespaces, error) GetStackRunBase(id string) (*v1.StackRun, error) - GetStackRun(id string) (*console.StackRunFragment, error) + GetStackRun(id string) (*console.StackRunMinimalFragment, error) AddStackRunLogs(id, logs string) error CompleteStackRun(id string, attributes console.StackRunAttributes) error UpdateStackRun(id string, attributes console.StackRunAttributes) error UpdateStackRunStep(id string, attributes console.RunStepAttributes) error - ListClusterStackRuns(after *string, first *int64) (*console.ListClusterStacks_ClusterStackRuns, error) + ListClusterStackRuns(after *string, first *int64) (*console.ListClusterStackIds_ClusterStackRuns, error) GetUser(email string) (*console.UserFragment, error) GetGroup(name string) (*console.GroupFragment, error) SaveUpgradeInsights(attributes []*console.UpgradeInsightAttributes) (*console.SaveUpgradeInsights, error) diff --git a/pkg/client/stack.go b/pkg/client/stack.go index ebf331f2..f9393de1 100644 --- a/pkg/client/stack.go +++ b/pkg/client/stack.go @@ -63,8 +63,8 @@ func (c *client) UpdateStackRunStep(id string, attributes gqlclient.RunStepAttri return nil } -func (c *client) GetStackRun(id string) (*gqlclient.StackRunFragment, error) { - restore, err := c.consoleClient.GetStackRun(c.ctx, id) +func (c *client) GetStackRun(id string) (*gqlclient.StackRunMinimalFragment, error) { + restore, err := c.consoleClient.GetStackRunMinimal(c.ctx, id) if err != nil { return nil, err } @@ -72,13 +72,13 @@ func (c *client) GetStackRun(id string) (*gqlclient.StackRunFragment, error) { return restore.StackRun, nil } -func (c *client) ListClusterStackRuns(after *string, first *int64) (*gqlclient.ListClusterStacks_ClusterStackRuns, error) { - resp, err := c.consoleClient.ListClusterStacks(c.ctx, after, first, nil, nil) +func (c *client) ListClusterStackRuns(after *string, first *int64) (*gqlclient.ListClusterStackIds_ClusterStackRuns, error) { + resp, err := c.consoleClient.ListClusterStackIds(c.ctx, after, first, nil, nil) if err != nil { return nil, err } if resp.ClusterStackRuns == nil { - return nil, fmt.Errorf("the response from ListInfrastructureStacks is nil") + return nil, fmt.Errorf("the response from ListClusterStackIds is nil") } return resp.ClusterStackRuns, nil } diff --git a/pkg/controller/stacks/job.go b/pkg/controller/stacks/job.go index 32725825..a7291d58 100644 --- a/pkg/controller/stacks/job.go +++ b/pkg/controller/stacks/job.go @@ -78,7 +78,7 @@ func init() { } } -func (r *StackReconciler) reconcileRunJob(ctx context.Context, run *console.StackRunFragment) (*batchv1.Job, error) { +func (r *StackReconciler) reconcileRunJob(ctx context.Context, run *console.StackRunMinimalFragment) (*batchv1.Job, error) { logger := log.FromContext(ctx) name := GetRunResourceName(run) @@ -129,7 +129,7 @@ func (r *StackReconciler) reconcileRunJob(ctx context.Context, run *console.Stac } // GetRunResourceName returns a resource name used for a job and a secret connected to a given run. -func GetRunResourceName(run *console.StackRunFragment) string { +func GetRunResourceName(run *console.StackRunMinimalFragment) string { return fmt.Sprintf("stack-%s", run.ID) } @@ -146,7 +146,7 @@ func (r *StackReconciler) GetRunResourceNamespace(jobSpec *batchv1.JobSpec) (nam return } -func (r *StackReconciler) GenerateRunJob(run *console.StackRunFragment, jobSpec *batchv1.JobSpec, name, namespace string) (*batchv1.Job, error) { +func (r *StackReconciler) GenerateRunJob(run *console.StackRunMinimalFragment, jobSpec *batchv1.JobSpec, name, namespace string) (*batchv1.Job, error) { var err error // If user-defined job spec was not available initialize it here. if jobSpec == nil { @@ -223,7 +223,7 @@ func getRunJobSpec(name string, jobSpecFragment *console.JobSpecFragment) *batch return jobSpec } -func (r *StackReconciler) ensureDefaultContainer(containers []corev1.Container, run *console.StackRunFragment) []corev1.Container { +func (r *StackReconciler) ensureDefaultContainer(containers []corev1.Container, run *console.StackRunMinimalFragment) []corev1.Container { if index := algorithms.Index(containers, func(container corev1.Container) bool { return container.Name == DefaultJobContainer }); index == -1 { @@ -240,7 +240,7 @@ func (r *StackReconciler) ensureDefaultContainer(containers []corev1.Container, return containers } -func (r *StackReconciler) getDefaultContainer(run *console.StackRunFragment) corev1.Container { +func (r *StackReconciler) getDefaultContainer(run *console.StackRunMinimalFragment) corev1.Container { return corev1.Container{ Name: DefaultJobContainer, Image: r.getDefaultContainerImage(run), @@ -254,7 +254,7 @@ func (r *StackReconciler) getDefaultContainer(run *console.StackRunFragment) cor } } -func (r *StackReconciler) getDefaultContainerImage(run *console.StackRunFragment) string { +func (r *StackReconciler) getDefaultContainerImage(run *console.StackRunMinimalFragment) string { // In case image is not provided, it will use our default image. // Image name format: : // Note: User has to make sure that the tag is correct and matches our naming scheme. @@ -284,11 +284,11 @@ func (r *StackReconciler) getDefaultContainerImage(run *console.StackRunFragment return fmt.Sprintf("%s:%s-%s-%s", r.getImage(run), r.getTag(run), strings.ToLower(string(run.Type)), r.getVersion(run)) } -func (r *StackReconciler) hasCustomImage(run *console.StackRunFragment) bool { +func (r *StackReconciler) hasCustomImage(run *console.StackRunMinimalFragment) bool { return run.Configuration.Image != nil && len(*run.Configuration.Image) > 0 } -func (r *StackReconciler) getImage(run *console.StackRunFragment) string { +func (r *StackReconciler) getImage(run *console.StackRunMinimalFragment) string { if r.hasCustomImage(run) { return *run.Configuration.Image } @@ -296,11 +296,11 @@ func (r *StackReconciler) getImage(run *console.StackRunFragment) string { return defaultContainerImages[run.Type] } -func (r *StackReconciler) hasCustomVersion(run *console.StackRunFragment) bool { +func (r *StackReconciler) hasCustomVersion(run *console.StackRunMinimalFragment) bool { return run.Configuration.Version != nil && len(*run.Configuration.Version) > 0 } -func (r *StackReconciler) getVersion(run *console.StackRunFragment) string { +func (r *StackReconciler) getVersion(run *console.StackRunMinimalFragment) string { if r.hasCustomVersion(run) { return *run.Configuration.Version } @@ -308,11 +308,11 @@ func (r *StackReconciler) getVersion(run *console.StackRunFragment) string { return defaultContainerVersions[run.Type] } -func (r *StackReconciler) hasCustomTag(run *console.StackRunFragment) bool { +func (r *StackReconciler) hasCustomTag(run *console.StackRunMinimalFragment) bool { return run.Configuration.Tag != nil && len(*run.Configuration.Tag) > 0 } -func (r *StackReconciler) getTag(run *console.StackRunFragment) string { +func (r *StackReconciler) getTag(run *console.StackRunMinimalFragment) string { if r.hasCustomTag(run) { return *run.Configuration.Tag } @@ -320,7 +320,7 @@ func (r *StackReconciler) getTag(run *console.StackRunFragment) string { return defaultImageTag } -func (r *StackReconciler) getDefaultContainerEnvFrom(run *console.StackRunFragment) []corev1.EnvFromSource { +func (r *StackReconciler) getDefaultContainerEnvFrom(run *console.StackRunMinimalFragment) []corev1.EnvFromSource { return []corev1.EnvFromSource{ { SecretRef: &corev1.SecretEnvSource{ @@ -390,7 +390,7 @@ func ensureDefaultContainerSecurityContext(sc *corev1.SecurityContext) *corev1.S } } -func (r *StackReconciler) ensureDefaultContainerResourcesRequests(containers []corev1.Container, run *console.StackRunFragment) ([]corev1.Container, error) { +func (r *StackReconciler) ensureDefaultContainerResourcesRequests(containers []corev1.Container, run *console.StackRunMinimalFragment) ([]corev1.Container, error) { if run.JobSpec == nil || run.JobSpec.Requests == nil { return containers, nil } diff --git a/pkg/controller/stacks/job_test.go b/pkg/controller/stacks/job_test.go index 02625c3b..88c4fdd7 100644 --- a/pkg/controller/stacks/job_test.go +++ b/pkg/controller/stacks/job_test.go @@ -28,12 +28,12 @@ func TestGetDefaultContainerImage(t *testing.T) { reconciler := NewStackReconciler(fakeConsoleClient, kClient, scheme.Scheme, time.Minute, 0, namespace, "", "") cases := []struct { name string - run *console.StackRunFragment + run *console.StackRunMinimalFragment expectedImage string }{ { name: "use_defaults_when_no_configuration_provided", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{}, }, @@ -41,7 +41,7 @@ func TestGetDefaultContainerImage(t *testing.T) { }, { name: "custom_tool_version_provided", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{ Version: lo.ToPtr("1.8.4"), @@ -51,7 +51,7 @@ func TestGetDefaultContainerImage(t *testing.T) { }, { name: "custom_tag_provided", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{ Tag: lo.ToPtr("0.4.99"), @@ -61,7 +61,7 @@ func TestGetDefaultContainerImage(t *testing.T) { }, { name: "custom_image_and_tag_provided", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{ Image: lo.ToPtr("ghcr.io/pluralsh/custom"), @@ -72,7 +72,7 @@ func TestGetDefaultContainerImage(t *testing.T) { }, { name: "custom_image_provided", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{ Image: lo.ToPtr("ghcr.io/pluralsh/custom"), @@ -82,7 +82,7 @@ func TestGetDefaultContainerImage(t *testing.T) { }, { name: "custom_image_and_version_provided", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{ Image: lo.ToPtr("ghcr.io/pluralsh/custom"), @@ -93,7 +93,7 @@ func TestGetDefaultContainerImage(t *testing.T) { }, { name: "ignore_version_when_custom_tag_provided", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{ Tag: lo.ToPtr("1.8.4"), @@ -120,12 +120,12 @@ func TestGenerateRunJob(t *testing.T) { reconciler := NewStackReconciler(fakeConsoleClient, kClient, scheme.Scheme, time.Minute, 0, namespace, "", "") cases := []struct { name string - run *console.StackRunFragment + run *console.StackRunMinimalFragment expectedJobSpec batchv1.JobSpec }{ { name: "use_empty_job_spec", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ ID: runID, Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{}, @@ -138,7 +138,7 @@ func TestGenerateRunJob(t *testing.T) { }, { name: "use_defaults", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ ID: runID, Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{}, @@ -150,7 +150,7 @@ func TestGenerateRunJob(t *testing.T) { }, { name: "add_labels", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ ID: runID, Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{}, @@ -171,7 +171,7 @@ func TestGenerateRunJob(t *testing.T) { }, { name: "add_sa", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ ID: runID, Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{}, @@ -188,7 +188,7 @@ func TestGenerateRunJob(t *testing.T) { }, { name: "add_resources", - run: &console.StackRunFragment{ + run: &console.StackRunMinimalFragment{ ID: runID, Type: console.StackTypeTerraform, Configuration: console.StackConfigurationFragment{}, diff --git a/pkg/controller/stacks/reconciler.go b/pkg/controller/stacks/reconciler.go index b318e870..4602f30e 100644 --- a/pkg/controller/stacks/reconciler.go +++ b/pkg/controller/stacks/reconciler.go @@ -28,7 +28,7 @@ type StackReconciler struct { k8sClient ctrlclient.Client scheme *runtime.Scheme stackQueue workqueue.TypedRateLimitingInterface[string] - stackCache *client.Cache[console.StackRunFragment] + stackCache *client.Cache[console.StackRunMinimalFragment] namespace string consoleURL string deployToken string @@ -41,7 +41,7 @@ func NewStackReconciler(consoleClient client.Client, k8sClient ctrlclient.Client k8sClient: k8sClient, scheme: scheme, stackQueue: workqueue.NewTypedRateLimitingQueue(workqueue.DefaultTypedControllerRateLimiter[string]()), - stackCache: client.NewCache[console.StackRunFragment](refresh, func(id string) (*console.StackRunFragment, error) { + stackCache: client.NewCache[console.StackRunMinimalFragment](refresh, func(id string) (*console.StackRunMinimalFragment, error) { return consoleClient.GetStackRun(id) }), consoleURL: consoleURL, @@ -88,10 +88,10 @@ func (r *StackReconciler) ShutdownQueue() { r.stackQueue.ShutDown() } -func (r *StackReconciler) ListStacks(ctx context.Context) *algorithms.Pager[*console.StackRunEdgeFragment] { +func (r *StackReconciler) ListStacks(ctx context.Context) *algorithms.Pager[*console.StackRunIDEdgeFragment] { logger := log.FromContext(ctx) logger.Info("create stack run pager") - fetch := func(page *string, size int64) ([]*console.StackRunEdgeFragment, *algorithms.PageInfo, error) { + fetch := func(page *string, size int64) ([]*console.StackRunIDEdgeFragment, *algorithms.PageInfo, error) { resp, err := r.consoleClient.ListClusterStackRuns(page, &size) if err != nil { logger.Error(err, "failed to fetch stack run") @@ -104,7 +104,7 @@ func (r *StackReconciler) ListStacks(ctx context.Context) *algorithms.Pager[*con } return resp.Edges, pageInfo, nil } - return algorithms.NewPager[*console.StackRunEdgeFragment](common.DefaultPageSize, fetch) + return algorithms.NewPager[*console.StackRunIDEdgeFragment](common.DefaultPageSize, fetch) } func (r *StackReconciler) Poll(ctx context.Context) error { diff --git a/pkg/controller/stacks/reconciler_test.go b/pkg/controller/stacks/reconciler_test.go index e411bb9f..c457ebae 100644 --- a/pkg/controller/stacks/reconciler_test.go +++ b/pkg/controller/stacks/reconciler_test.go @@ -95,7 +95,7 @@ var _ = Describe("Reconciler", Ordered, func() { It("should exit without errors as job is already created", func() { fakeConsoleClient := mocks.NewClientMock(mocks.TestingT) - fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunFragment{ + fakeConsoleClient.On("GetStackRun", mock.Anything).Return(&console.StackRunMinimalFragment{ ID: stackRunId, Approval: lo.ToPtr(false), Status: console.StackStatusPending, @@ -109,7 +109,7 @@ var _ = Describe("Reconciler", Ordered, func() { It("should create new job with default values", func() { stackRunId := "default-values" - stackRun := &console.StackRunFragment{ + stackRun := &console.StackRunMinimalFragment{ ID: stackRunId, Approval: lo.ToPtr(false), Status: console.StackStatusPending, @@ -136,7 +136,7 @@ var _ = Describe("Reconciler", Ordered, func() { labelsValue := "labels-123" annotationsValue := "annotations-123" stackRunId := "user-defined-spec" - stackRun := &console.StackRunFragment{ + stackRun := &console.StackRunMinimalFragment{ ID: stackRunId, JobSpec: &console.JobSpecFragment{ Namespace: namespace, @@ -201,7 +201,7 @@ var _ = Describe("Reconciler", Ordered, func() { Expect(err).NotTo(HaveOccurred()) stackRunId := "user-defined-raw-spec" - stackRun := &console.StackRunFragment{ + stackRun := &console.StackRunMinimalFragment{ ID: stackRunId, JobSpec: &console.JobSpecFragment{ Namespace: "", diff --git a/pkg/controller/stacks/socket_publisher.go b/pkg/controller/stacks/socket_publisher.go index 5bc75d59..daa95165 100644 --- a/pkg/controller/stacks/socket_publisher.go +++ b/pkg/controller/stacks/socket_publisher.go @@ -9,7 +9,7 @@ import ( type socketPublisher struct { stackRunQueue workqueue.TypedRateLimitingInterface[string] - stackRunCache *client.Cache[console.StackRunFragment] + stackRunCache *client.Cache[console.StackRunMinimalFragment] } func (sp *socketPublisher) Publish(id string) { diff --git a/pkg/test/mocks/Client_mock.go b/pkg/test/mocks/Client_mock.go index 44d27c70..04564172 100644 --- a/pkg/test/mocks/Client_mock.go +++ b/pkg/test/mocks/Client_mock.go @@ -897,23 +897,23 @@ func (_c *ClientMock_GetServices_Call) RunAndReturn(run func(*string, *int64) (* } // GetStackRun provides a mock function with given fields: id -func (_m *ClientMock) GetStackRun(id string) (*client.StackRunFragment, error) { +func (_m *ClientMock) GetStackRun(id string) (*client.StackRunMinimalFragment, error) { ret := _m.Called(id) if len(ret) == 0 { panic("no return value specified for GetStackRun") } - var r0 *client.StackRunFragment + var r0 *client.StackRunMinimalFragment var r1 error - if rf, ok := ret.Get(0).(func(string) (*client.StackRunFragment, error)); ok { + if rf, ok := ret.Get(0).(func(string) (*client.StackRunMinimalFragment, error)); ok { return rf(id) } - if rf, ok := ret.Get(0).(func(string) *client.StackRunFragment); ok { + if rf, ok := ret.Get(0).(func(string) *client.StackRunMinimalFragment); ok { r0 = rf(id) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*client.StackRunFragment) + r0 = ret.Get(0).(*client.StackRunMinimalFragment) } } @@ -944,12 +944,12 @@ func (_c *ClientMock_GetStackRun_Call) Run(run func(id string)) *ClientMock_GetS return _c } -func (_c *ClientMock_GetStackRun_Call) Return(_a0 *client.StackRunFragment, _a1 error) *ClientMock_GetStackRun_Call { +func (_c *ClientMock_GetStackRun_Call) Return(_a0 *client.StackRunMinimalFragment, _a1 error) *ClientMock_GetStackRun_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *ClientMock_GetStackRun_Call) RunAndReturn(run func(string) (*client.StackRunFragment, error)) *ClientMock_GetStackRun_Call { +func (_c *ClientMock_GetStackRun_Call) RunAndReturn(run func(string) (*client.StackRunMinimalFragment, error)) *ClientMock_GetStackRun_Call { _c.Call.Return(run) return _c } @@ -1127,23 +1127,23 @@ func (_c *ClientMock_IsClusterExists_Call) RunAndReturn(run func(string) (bool, } // ListClusterStackRuns provides a mock function with given fields: after, first -func (_m *ClientMock) ListClusterStackRuns(after *string, first *int64) (*client.ListClusterStacks_ClusterStackRuns, error) { +func (_m *ClientMock) ListClusterStackRuns(after *string, first *int64) (*client.ListClusterStackIds_ClusterStackRuns, error) { ret := _m.Called(after, first) if len(ret) == 0 { panic("no return value specified for ListClusterStackRuns") } - var r0 *client.ListClusterStacks_ClusterStackRuns + var r0 *client.ListClusterStackIds_ClusterStackRuns var r1 error - if rf, ok := ret.Get(0).(func(*string, *int64) (*client.ListClusterStacks_ClusterStackRuns, error)); ok { + if rf, ok := ret.Get(0).(func(*string, *int64) (*client.ListClusterStackIds_ClusterStackRuns, error)); ok { return rf(after, first) } - if rf, ok := ret.Get(0).(func(*string, *int64) *client.ListClusterStacks_ClusterStackRuns); ok { + if rf, ok := ret.Get(0).(func(*string, *int64) *client.ListClusterStackIds_ClusterStackRuns); ok { r0 = rf(after, first) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*client.ListClusterStacks_ClusterStackRuns) + r0 = ret.Get(0).(*client.ListClusterStackIds_ClusterStackRuns) } } @@ -1175,12 +1175,12 @@ func (_c *ClientMock_ListClusterStackRuns_Call) Run(run func(after *string, firs return _c } -func (_c *ClientMock_ListClusterStackRuns_Call) Return(_a0 *client.ListClusterStacks_ClusterStackRuns, _a1 error) *ClientMock_ListClusterStackRuns_Call { +func (_c *ClientMock_ListClusterStackRuns_Call) Return(_a0 *client.ListClusterStackIds_ClusterStackRuns, _a1 error) *ClientMock_ListClusterStackRuns_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *ClientMock_ListClusterStackRuns_Call) RunAndReturn(run func(*string, *int64) (*client.ListClusterStacks_ClusterStackRuns, error)) *ClientMock_ListClusterStackRuns_Call { +func (_c *ClientMock_ListClusterStackRuns_Call) RunAndReturn(run func(*string, *int64) (*client.ListClusterStackIds_ClusterStackRuns, error)) *ClientMock_ListClusterStackRuns_Call { _c.Call.Return(run) return _c }