diff --git a/apis/common/types.go b/apis/common/types.go index 90b0e5d4aaa..44542d15895 100644 --- a/apis/common/types.go +++ b/apis/common/types.go @@ -81,5 +81,4 @@ type WithDevFlags interface { type PlatformObject interface { client.Object WithStatus - WithDevFlags } diff --git a/pkg/controller/actions/render/kustomize/action_render_manifests.go b/pkg/controller/actions/render/kustomize/action_render_manifests.go index fd098054b43..b6007aa5325 100644 --- a/pkg/controller/actions/render/kustomize/action_render_manifests.go +++ b/pkg/controller/actions/render/kustomize/action_render_manifests.go @@ -75,11 +75,11 @@ func WithCache() ActionOpts { } } -func (a *Action) run(ctx context.Context, rr *types.ReconciliationRequest) error { +func (a *Action) run(_ context.Context, rr *types.ReconciliationRequest) error { var err error var cachingKey []byte - inst, ok := rr.Instance.(common.PlatformObject) + inst, ok := rr.Instance.(common.WithDevFlags) if ok && inst.GetDevFlags() != nil { // if dev flags are enabled, caching is disabled as dev flags are meant for // development time only where caching is not relevant diff --git a/pkg/controller/actions/render/template/action_render_templates.go b/pkg/controller/actions/render/template/action_render_templates.go index d8900af0551..34939f65aee 100644 --- a/pkg/controller/actions/render/template/action_render_templates.go +++ b/pkg/controller/actions/render/template/action_render_templates.go @@ -51,11 +51,11 @@ func WithData(data map[string]any) ActionOpts { } } -func (a *Action) run(ctx context.Context, rr *types.ReconciliationRequest) error { +func (a *Action) run(_ context.Context, rr *types.ReconciliationRequest) error { var err error var cachingKey []byte - inst, ok := rr.Instance.(common.PlatformObject) + inst, ok := rr.Instance.(common.WithDevFlags) if ok && inst.GetDevFlags() != nil { // if dev flags are enabled, caching is disabled as dev flags are meant for // development time only where caching is not relevant