From f177fb580626ef0300ed8713d623aa37ad4f899d Mon Sep 17 00:00:00 2001 From: Ankit Kumar Singh Date: Thu, 29 Jan 2026 01:26:02 +0530 Subject: [PATCH] refactor: centralize mockery definitions in .mockery.yaml This PR moves all //go:generate mockery comments to a centralized .mockery.yaml configuration file, making it easier to manage mock generation across the codebase. Changes: - Added .mockery.yaml with all mockery definitions organized by package - Removed //go:generate mockery comments from 107 Go files Fixes #6815 Signed-off-by: Ankit Kumar Singh --- .mockery.yaml | 404 ++++++++++++++++++ .../pkg/manager/interfaces/artifact.go | 1 - .../repositories/interfaces/artifact_repo.go | 1 - .../repositories/interfaces/dataset_repo.go | 1 - .../repositories/interfaces/partition_repo.go | 1 - .../interfaces/reservation_repo.go | 1 - .../pkg/repositories/interfaces/tag_repo.go | 1 - flyteadmin/auth/interfaces/context.go | 1 - flyteadmin/auth/interfaces/cookie.go | 1 - .../async/cloudevent/interfaces/publisher.go | 1 - .../pkg/async/cloudevent/interfaces/sender.go | 1 - .../async/events/interfaces/node_execution.go | 1 - .../events/interfaces/workflow_execution.go | 1 - .../implementations/sendgrid_emailer.go | 1 - .../async/notifications/interfaces/emailer.go | 1 - .../notifications/interfaces/processor.go | 1 - .../notifications/interfaces/publisher.go | 1 - .../notifications/interfaces/smtp_client.go | 1 - .../schedule/interfaces/event_scheduler.go | 1 - .../schedule/interfaces/workflow_executor.go | 1 - .../pkg/clusterresource/interfaces/admin.go | 1 - flyteadmin/pkg/data/interfaces/remote.go | 1 - .../interfaces/execution_target_provider.go | 1 - .../pkg/manager/interfaces/execution.go | 1 - .../pkg/manager/interfaces/launch_plan.go | 1 - flyteadmin/pkg/manager/interfaces/metrics.go | 1 - .../pkg/manager/interfaces/named_entity.go | 1 - .../pkg/manager/interfaces/node_execution.go | 1 - flyteadmin/pkg/manager/interfaces/project.go | 1 - flyteadmin/pkg/manager/interfaces/resource.go | 1 - flyteadmin/pkg/manager/interfaces/signal.go | 1 - flyteadmin/pkg/manager/interfaces/task.go | 1 - .../pkg/manager/interfaces/task_execution.go | 1 - flyteadmin/pkg/manager/interfaces/version.go | 1 - flyteadmin/pkg/manager/interfaces/workflow.go | 1 - .../interfaces/description_entity.go | 1 - .../interfaces/execution_event_repo.go | 1 - .../interfaces/named_entity_repo.go | 1 - .../interfaces/node_execution_event_repo.go | 1 - .../repositories/interfaces/signal_repo.go | 1 - .../interfaces/cluster_configuration.go | 1 - .../pkg/runtime/interfaces/cluster_pools.go | 1 - .../interfaces/namespace_configuration.go | 1 - .../quality_of_service_configuration.go | 1 - .../pkg/runtime/interfaces/whitelist.go | 1 - .../pkg/workflowengine/interfaces/builder.go | 1 - .../pkg/workflowengine/interfaces/executor.go | 1 - flyteadmin/scheduler/executor/executor.go | 1 - .../interfaces/schedulable_entity_repo.go | 1 - .../schedule_entities_snapshot_repo.go | 1 - flytectl/cmd/update/interfaces/updater.go | 1 - flytectl/pkg/docker/docker.go | 1 - flytectl/pkg/ext/deleter.go | 1 - flytectl/pkg/ext/fetcher.go | 1 - flytectl/pkg/ext/updater.go | 1 - flytectl/pkg/github/githubutil.go | 1 - flytectl/pkg/k8s/k8s.go | 1 - flytectl/pkg/visualize/graphvizer.go | 1 - .../clients/go/admin/cache/token_cache.go | 1 - flyteidl/clients/go/admin/client.go | 1 - .../clients/go/admin/token_source_provider.go | 1 - .../tasks/pluginmachinery/catalog/client.go | 1 - .../pluginmachinery/core/exec_context.go | 1 - .../pluginmachinery/core/exec_metadata.go | 1 - .../go/tasks/pluginmachinery/core/plugin.go | 1 - .../pluginmachinery/core/secret_manager.go | 1 - .../pluginmachinery/internal/webapi/cache.go | 1 - .../go/tasks/pluginmachinery/io/iface.go | 1 - .../go/tasks/pluginmachinery/k8s/plugin.go | 1 - .../go/tasks/pluginmachinery/webapi/plugin.go | 1 - .../tasks/pluginmachinery/workqueue/queue.go | 1 - .../go/tasks/plugins/array/awsbatch/client.go | 1 - .../go/tasks/plugins/array/core/state.go | 1 - .../plugins/presto/client/presto_client.go | 1 - flytepropeller/events/node_event_recorder.go | 1 - flytepropeller/events/task_event_recorder.go | 1 - .../events/workflow_event_recorder.go | 1 - .../manager/shardstrategy/shard_strategy.go | 1 - .../pkg/apis/flyteworkflow/v1alpha1/iface.go | 1 - flytepropeller/pkg/compiler/common/builder.go | 1 - .../pkg/controller/executors/dag_structure.go | 1 - .../controller/executors/execution_context.go | 1 - .../pkg/controller/executors/kube.go | 1 - .../pkg/controller/executors/node_lookup.go | 1 - .../pkg/controller/executors/workflow.go | 1 - .../pkg/controller/interfaces/rate_limiter.go | 2 - .../controller/nodes/array/event_recorder.go | 1 - .../pkg/controller/nodes/array/handler.go | 1 - .../pkg/controller/nodes/dynamic/handler.go | 1 - .../pkg/controller/nodes/gate/handler.go | 1 - .../controller/nodes/interfaces/handler.go | 1 - .../nodes/interfaces/handler_factory.go | 1 - .../pkg/controller/nodes/interfaces/node.go | 1 - .../nodes/interfaces/node_exec_context.go | 1 - .../pkg/controller/nodes/output_resolver.go | 1 - .../pkg/controller/nodes/recovery/client.go | 1 - .../subworkflow/launchplan/launchplan.go | 1 - .../task/resourcemanager/redis_client.go | 1 - .../pkg/controller/workflowstore/iface.go | 1 - flytepropeller/pkg/webhook/global_secrets.go | 1 - flytestdlib/cache/auto_refresh.go | 1 - flytestdlib/fastcheck/iface.go | 1 - flytestdlib/random/weighted_random_list.go | 1 - flytestdlib/storage/storage.go | 3 - flytestdlib/utils/auto_refresh_cache.go | 1 - 105 files changed, 404 insertions(+), 107 deletions(-) create mode 100644 .mockery.yaml diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 0000000000..f6b9516582 --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,404 @@ +log-level: warn +resolve-type-alias: False +disable-version-string: True +issue-845-fix: True +structname: "" +mockname: "{{.InterfaceName}}" +filename: "{{.InterfaceName | snakecase}}.go" +inpackage: false +outpkg: "mocks" +with-expecter: true +packages: + # ============================================================================ + # datacatalog + # ============================================================================ + github.com/flyteorg/flyte/datacatalog/pkg/repositories/interfaces: + config: + all: false + dir: 'datacatalog/pkg/repositories/mocks' + interfaces: + ArtifactRepo: + TagRepo: + PartitionRepo: + ReservationRepo: + DatasetRepo: + + github.com/flyteorg/flyte/datacatalog/pkg/manager/interfaces: + config: + all: false + dir: 'datacatalog/pkg/manager/mocks' + interfaces: + ArtifactManager: + + # ============================================================================ + # flytectl + # ============================================================================ + github.com/flyteorg/flyte/flytectl/pkg/github: + config: + all: false + dir: 'flytectl/pkg/github/mocks' + interfaces: + GHRepoService: + + github.com/flyteorg/flyte/flytectl/pkg/visualize: + config: + all: true + dir: 'flytectl/pkg/visualize/mocks' + + github.com/flyteorg/flyte/flytectl/pkg/ext: + config: + all: true + dir: 'flytectl/pkg/ext/mocks' + + github.com/flyteorg/flyte/flytectl/pkg/k8s: + config: + all: false + dir: 'flytectl/pkg/k8s/mocks' + interfaces: + ContextOps: + + github.com/flyteorg/flyte/flytectl/pkg/docker: + config: + all: true + dir: 'flytectl/pkg/docker/mocks' + + github.com/flyteorg/flyte/flytectl/cmd/update/interfaces: + config: + all: false + dir: 'flytectl/cmd/update/interfaces/mocks' + interfaces: + Updater: + + # ============================================================================ + # flytepropeller + # ============================================================================ + github.com/flyteorg/flyte/flytepropeller/pkg/compiler/common: + config: + all: true + dir: 'flytepropeller/pkg/compiler/common/mocks' + + github.com/flyteorg/flyte/flytepropeller/events: + config: + all: true + dir: 'flytepropeller/events/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/interfaces: + config: + all: false + dir: 'flytepropeller/pkg/controller/mocks' + filename: "{{.InterfaceName | snakecase}}.go" + interfaces: + Limiter: + Reservation: + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors: + config: + all: true + dir: 'flytepropeller/pkg/controller/executors/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/interfaces: + config: + all: true + dir: 'flytepropeller/pkg/controller/nodes/interfaces/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/dynamic: + config: + all: true + dir: 'flytepropeller/pkg/controller/nodes/dynamic/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/task/resourcemanager: + config: + all: false + dir: 'flytepropeller/pkg/controller/nodes/task/resourcemanager/mocks' + interfaces: + RedisClient: + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/gate: + config: + all: true + dir: 'flytepropeller/pkg/controller/nodes/gate/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/recovery: + config: + all: false + dir: 'flytepropeller/pkg/controller/nodes/recovery/mocks' + interfaces: + Client: + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes: + config: + all: false + dir: 'flytepropeller/pkg/controller/nodes/mocks' + interfaces: + OutputResolver: + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/array: + config: + all: true + dir: 'flytepropeller/pkg/controller/nodes/array/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/subworkflow/launchplan: + config: + all: true + dir: 'flytepropeller/pkg/controller/nodes/subworkflow/launchplan/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/controller/workflowstore: + config: + all: true + dir: 'flytepropeller/pkg/controller/workflowstore/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1: + config: + all: true + dir: 'flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks' + + github.com/flyteorg/flyte/flytepropeller/pkg/webhook: + config: + all: true + dir: 'flytepropeller/pkg/webhook/mocks' + + github.com/flyteorg/flyte/flytepropeller/manager/shardstrategy: + config: + all: false + dir: 'flytepropeller/manager/shardstrategy/mocks' + interfaces: + ShardStrategy: + + # ============================================================================ + # flytestdlib + # ============================================================================ + github.com/flyteorg/flyte/flytestdlib/random: + config: + all: true + dir: 'flytestdlib/random/mocks' + + github.com/flyteorg/flyte/flytestdlib/storage: + config: + all: false + dir: 'flytestdlib/storage/mocks' + interfaces: + RawStore: + ReferenceConstructor: + ComposedProtobufStore: + + github.com/flyteorg/flyte/flytestdlib/fastcheck: + config: + all: false + dir: 'flytestdlib/fastcheck/mocks' + interfaces: + Filter: + + github.com/flyteorg/flyte/flytestdlib/utils: + config: + all: true + dir: 'flytestdlib/utils/mocks' + + github.com/flyteorg/flyte/flytestdlib/cache: + config: + all: true + dir: 'flytestdlib/cache/mocks' + + # ============================================================================ + # flyteplugins + # ============================================================================ + github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi: + config: + all: true + dir: 'flyteplugins/go/tasks/pluginmachinery/webapi/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/plugins/array/awsbatch: + config: + all: true + dir: 'flyteplugins/go/tasks/plugins/array/awsbatch/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/plugins/array/core: + config: + all: true + dir: 'flyteplugins/go/tasks/plugins/array/core/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/plugins/presto/client: + config: + all: true + dir: 'flyteplugins/go/tasks/plugins/presto/client/mocks' + filename: "{{.InterfaceName | snakecase}}.go" + + github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io: + config: + all: true + dir: 'flyteplugins/go/tasks/pluginmachinery/io/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/internal/webapi: + config: + all: true + dir: 'flyteplugins/go/tasks/pluginmachinery/internal/webapi/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/k8s: + config: + all: true + dir: 'flyteplugins/go/tasks/pluginmachinery/k8s/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/catalog: + config: + all: true + dir: 'flyteplugins/go/tasks/pluginmachinery/catalog/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/workqueue: + config: + all: true + dir: 'flyteplugins/go/tasks/pluginmachinery/workqueue/mocks' + + github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core: + config: + all: true + dir: 'flyteplugins/go/tasks/pluginmachinery/core/mocks' + + # ============================================================================ + # flyteadmin + # ============================================================================ + github.com/flyteorg/flyte/flyteadmin/pkg/data/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/data/mocks' + interfaces: + RemoteURLInterface: + + github.com/flyteorg/flyte/flyteadmin/pkg/executioncluster/interfaces: + config: + all: true + dir: 'flyteadmin/pkg/executioncluster/mocks' + + github.com/flyteorg/flyte/flyteadmin/pkg/workflowengine/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/workflowengine/mocks' + interfaces: + WorkflowExecutor: + FlyteWorkflowBuilder: + + github.com/flyteorg/flyte/flyteadmin/pkg/manager/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/manager/mocks' + interfaces: + TaskInterface: + WorkflowInterface: + NamedEntityInterface: + LaunchPlanInterface: + TaskExecutionInterface: + ResourceInterface: + MetricsInterface: + VersionInterface: + ExecutionInterface: + ProjectInterface: + NodeExecutionInterface: + SignalInterface: + + github.com/flyteorg/flyte/flyteadmin/pkg/repositories/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/repositories/mocks' + interfaces: + NamedEntityRepoInterface: + ExecutionEventRepoInterface: + DescriptionEntityRepoInterface: + NodeExecutionEventRepoInterface: + SignalRepoInterface: + + github.com/flyteorg/flyte/flyteadmin/pkg/async/cloudevent/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/async/cloudevent/mocks' + interfaces: + Publisher: + Sender: + + github.com/flyteorg/flyte/flyteadmin/pkg/async/notifications/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/async/notifications/mocks' + interfaces: + Publisher: + SMTPClient: + Emailer: + Processor: + + github.com/flyteorg/flyte/flyteadmin/pkg/async/notifications/implementations: + config: + all: true + dir: 'flyteadmin/pkg/async/notifications/mocks' + + github.com/flyteorg/flyte/flyteadmin/pkg/async/events/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/async/events/mocks' + interfaces: + NodeExecutionEventWriter: + WorkflowExecutionEventWriter: + + github.com/flyteorg/flyte/flyteadmin/pkg/async/schedule/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/async/schedule/mocks' + interfaces: + WorkflowExecutor: + EventScheduler: + + github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/runtime/mocks' + interfaces: + QualityOfServiceConfiguration: + WhitelistConfiguration: + ClusterConfiguration: + NamespaceMappingConfiguration: + ClusterPoolAssignmentConfiguration: + + github.com/flyteorg/flyte/flyteadmin/pkg/clusterresource/interfaces: + config: + all: false + dir: 'flyteadmin/pkg/clusterresource/mocks' + interfaces: + FlyteAdminDataProvider: + + github.com/flyteorg/flyte/flyteadmin/scheduler/executor: + config: + all: false + dir: 'flyteadmin/scheduler/executor/mocks' + interfaces: + Executor: + + github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/interfaces: + config: + all: false + dir: 'flyteadmin/scheduler/repositories/mocks' + interfaces: + ScheduleEntitiesSnapShotRepoInterface: + SchedulableEntityRepoInterface: + + github.com/flyteorg/flyte/flyteadmin/auth/interfaces: + config: + all: true + dir: 'flyteadmin/auth/interfaces/mocks' + + # ============================================================================ + # flyteidl + # ============================================================================ + github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service: + config: + all: false + dir: 'flyteidl/clients/go/admin/mocks' + interfaces: + AdminServiceClient: + + github.com/flyteorg/flyte/flyteidl/clients/go/admin: + config: + all: false + dir: 'flyteidl/clients/go/admin/mocks' + interfaces: + TokenSource: + + github.com/flyteorg/flyte/flyteidl/clients/go/admin/cache: + config: + all: true + dir: 'flyteidl/clients/go/admin/cache/mocks' diff --git a/datacatalog/pkg/manager/interfaces/artifact.go b/datacatalog/pkg/manager/interfaces/artifact.go index 99730b3462..1bb55de084 100644 --- a/datacatalog/pkg/manager/interfaces/artifact.go +++ b/datacatalog/pkg/manager/interfaces/artifact.go @@ -6,7 +6,6 @@ import ( idl_datacatalog "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/datacatalog" ) -//go:generate mockery --name=ArtifactManager --output=../mocks --case=underscore --with-expecter type ArtifactManager interface { CreateArtifact(ctx context.Context, request *idl_datacatalog.CreateArtifactRequest) (*idl_datacatalog.CreateArtifactResponse, error) diff --git a/datacatalog/pkg/repositories/interfaces/artifact_repo.go b/datacatalog/pkg/repositories/interfaces/artifact_repo.go index 4b475a80a1..8d46879b73 100644 --- a/datacatalog/pkg/repositories/interfaces/artifact_repo.go +++ b/datacatalog/pkg/repositories/interfaces/artifact_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery --name=ArtifactRepo --output=../mocks --case=underscore --with-expecter type ArtifactRepo interface { Create(ctx context.Context, in models.Artifact) error diff --git a/datacatalog/pkg/repositories/interfaces/dataset_repo.go b/datacatalog/pkg/repositories/interfaces/dataset_repo.go index d4eac476dc..840b453014 100644 --- a/datacatalog/pkg/repositories/interfaces/dataset_repo.go +++ b/datacatalog/pkg/repositories/interfaces/dataset_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery --name=DatasetRepo --output=../mocks --case=underscore --with-expecter type DatasetRepo interface { Create(ctx context.Context, in models.Dataset) error diff --git a/datacatalog/pkg/repositories/interfaces/partition_repo.go b/datacatalog/pkg/repositories/interfaces/partition_repo.go index 8271417c59..df03a3865b 100644 --- a/datacatalog/pkg/repositories/interfaces/partition_repo.go +++ b/datacatalog/pkg/repositories/interfaces/partition_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery --name=PartitionRepo --output=../mocks --case=underscore --with-expecter type PartitionRepo interface { Create(ctx context.Context, in models.Partition) error diff --git a/datacatalog/pkg/repositories/interfaces/reservation_repo.go b/datacatalog/pkg/repositories/interfaces/reservation_repo.go index 376be32e08..3c9a7ca893 100644 --- a/datacatalog/pkg/repositories/interfaces/reservation_repo.go +++ b/datacatalog/pkg/repositories/interfaces/reservation_repo.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery --name=ReservationRepo --output=../mocks --case=underscore --with-expecter // Interface to interact with Reservation Table type ReservationRepo interface { diff --git a/datacatalog/pkg/repositories/interfaces/tag_repo.go b/datacatalog/pkg/repositories/interfaces/tag_repo.go index bc077b561f..12e9ae4d2c 100644 --- a/datacatalog/pkg/repositories/interfaces/tag_repo.go +++ b/datacatalog/pkg/repositories/interfaces/tag_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery --name=TagRepo --output=../mocks --case=underscore --with-expecter type TagRepo interface { Create(ctx context.Context, in models.Tag) error diff --git a/flyteadmin/auth/interfaces/context.go b/flyteadmin/auth/interfaces/context.go index e6fe9672f5..8a545ee1a4 100644 --- a/flyteadmin/auth/interfaces/context.go +++ b/flyteadmin/auth/interfaces/context.go @@ -17,7 +17,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery --all --case=underscore --with-expecter type HandlerRegisterer interface { HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) diff --git a/flyteadmin/auth/interfaces/cookie.go b/flyteadmin/auth/interfaces/cookie.go index 030815ff49..f13e7f9baa 100644 --- a/flyteadmin/auth/interfaces/cookie.go +++ b/flyteadmin/auth/interfaces/cookie.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery --name=CookieHandler --output=mocks/ --case=underscore --with-expecter type CookieHandler interface { SetTokenCookies(ctx context.Context, writer http.ResponseWriter, token *oauth2.Token) error diff --git a/flyteadmin/pkg/async/cloudevent/interfaces/publisher.go b/flyteadmin/pkg/async/cloudevent/interfaces/publisher.go index 32fea4b1bd..0bc8726c7d 100644 --- a/flyteadmin/pkg/async/cloudevent/interfaces/publisher.go +++ b/flyteadmin/pkg/async/cloudevent/interfaces/publisher.go @@ -6,7 +6,6 @@ import ( "github.com/golang/protobuf/proto" ) -//go:generate mockery --name=Publisher --output=../mocks --case=underscore --with-expecter // Publisher Defines the interface for Publishing execution event to other services (AWS pub/sub, Kafka, Nats). type Publisher interface { diff --git a/flyteadmin/pkg/async/cloudevent/interfaces/sender.go b/flyteadmin/pkg/async/cloudevent/interfaces/sender.go index 013387596c..deacdddefb 100644 --- a/flyteadmin/pkg/async/cloudevent/interfaces/sender.go +++ b/flyteadmin/pkg/async/cloudevent/interfaces/sender.go @@ -6,7 +6,6 @@ import ( cloudevents "github.com/cloudevents/sdk-go/v2" ) -//go:generate mockery --name=Sender --output=../mocks --case=underscore --with-expecter // Sender Defines the interface for sending cloudevents. type Sender interface { diff --git a/flyteadmin/pkg/async/events/interfaces/node_execution.go b/flyteadmin/pkg/async/events/interfaces/node_execution.go index 1db831ee0a..2f956b6f4d 100644 --- a/flyteadmin/pkg/async/events/interfaces/node_execution.go +++ b/flyteadmin/pkg/async/events/interfaces/node_execution.go @@ -4,7 +4,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=NodeExecutionEventWriter --output=../mocks --case=underscore --with-expecter type NodeExecutionEventWriter interface { Run() diff --git a/flyteadmin/pkg/async/events/interfaces/workflow_execution.go b/flyteadmin/pkg/async/events/interfaces/workflow_execution.go index eb9c8851c7..4f3988d9c7 100644 --- a/flyteadmin/pkg/async/events/interfaces/workflow_execution.go +++ b/flyteadmin/pkg/async/events/interfaces/workflow_execution.go @@ -4,7 +4,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=WorkflowExecutionEventWriter --output=../mocks --case=underscore --with-expecter type WorkflowExecutionEventWriter interface { Run() diff --git a/flyteadmin/pkg/async/notifications/implementations/sendgrid_emailer.go b/flyteadmin/pkg/async/notifications/implementations/sendgrid_emailer.go index 4cf83b7099..2b1bebbcad 100644 --- a/flyteadmin/pkg/async/notifications/implementations/sendgrid_emailer.go +++ b/flyteadmin/pkg/async/notifications/implementations/sendgrid_emailer.go @@ -19,7 +19,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery --all --case=underscore --output=../mocks --case=underscore --with-expecter type SendgridClient interface { Send(email *mail.SGMailV3) (*rest.Response, error) diff --git a/flyteadmin/pkg/async/notifications/interfaces/emailer.go b/flyteadmin/pkg/async/notifications/interfaces/emailer.go index 2d67d81a65..3bb668585e 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/emailer.go +++ b/flyteadmin/pkg/async/notifications/interfaces/emailer.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=Emailer --output=../mocks --case=underscore --with-expecter // The implementation of Emailer needs to be passed to the implementation of Processor // in order for emails to be sent. diff --git a/flyteadmin/pkg/async/notifications/interfaces/processor.go b/flyteadmin/pkg/async/notifications/interfaces/processor.go index 771f4c2284..d58373f359 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/processor.go +++ b/flyteadmin/pkg/async/notifications/interfaces/processor.go @@ -1,6 +1,5 @@ package interfaces -//go:generate mockery --name=Processor --output=../mocks --case=underscore --with-expecter // Exposes the common methods required for a subscriber. // There is one ProcessNotification per type. diff --git a/flyteadmin/pkg/async/notifications/interfaces/publisher.go b/flyteadmin/pkg/async/notifications/interfaces/publisher.go index 310416e66a..201bca4141 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/publisher.go +++ b/flyteadmin/pkg/async/notifications/interfaces/publisher.go @@ -6,7 +6,6 @@ import ( "github.com/golang/protobuf/proto" ) -//go:generate mockery --name=Publisher --output=../mocks --case=underscore --with-expecter // Note on Notifications diff --git a/flyteadmin/pkg/async/notifications/interfaces/smtp_client.go b/flyteadmin/pkg/async/notifications/interfaces/smtp_client.go index 9d22cdc345..902e67e719 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/smtp_client.go +++ b/flyteadmin/pkg/async/notifications/interfaces/smtp_client.go @@ -8,7 +8,6 @@ import ( // This interface is introduced to allow for mocking of the smtp.Client object. -//go:generate mockery --name=SMTPClient --output=../mocks --case=underscore --with-expecter type SMTPClient interface { Hello(localName string) error Extension(ext string) (bool, string) diff --git a/flyteadmin/pkg/async/schedule/interfaces/event_scheduler.go b/flyteadmin/pkg/async/schedule/interfaces/event_scheduler.go index c83fe1017e..39b59b1ddf 100644 --- a/flyteadmin/pkg/async/schedule/interfaces/event_scheduler.go +++ b/flyteadmin/pkg/async/schedule/interfaces/event_scheduler.go @@ -27,7 +27,6 @@ type RemoveScheduleInput struct { ScheduleNamePrefix string } -//go:generate mockery --name=EventScheduler --output=../mocks --case=underscore --with-expecter type EventScheduler interface { // Schedules an event. diff --git a/flyteadmin/pkg/async/schedule/interfaces/workflow_executor.go b/flyteadmin/pkg/async/schedule/interfaces/workflow_executor.go index f2e626fb0b..7263a4b50b 100644 --- a/flyteadmin/pkg/async/schedule/interfaces/workflow_executor.go +++ b/flyteadmin/pkg/async/schedule/interfaces/workflow_executor.go @@ -1,6 +1,5 @@ package interfaces -//go:generate mockery --name=WorkflowExecutor --output=../mocks --case=underscore --with-expecter // Handles responding to scheduled workflow execution events and creating executions. type WorkflowExecutor interface { diff --git a/flyteadmin/pkg/clusterresource/interfaces/admin.go b/flyteadmin/pkg/clusterresource/interfaces/admin.go index e3ae26352a..4e86ae0923 100644 --- a/flyteadmin/pkg/clusterresource/interfaces/admin.go +++ b/flyteadmin/pkg/clusterresource/interfaces/admin.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=FlyteAdminDataProvider --output=../mocks --case=underscore --with-expecter type FlyteAdminDataProvider interface { GetClusterResourceAttributes(ctx context.Context, project, domain string) (*admin.ClusterResourceAttributes, error) diff --git a/flyteadmin/pkg/data/interfaces/remote.go b/flyteadmin/pkg/data/interfaces/remote.go index cc4c16b983..7cc9a3884e 100644 --- a/flyteadmin/pkg/data/interfaces/remote.go +++ b/flyteadmin/pkg/data/interfaces/remote.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=RemoteURLInterface --output=../mocks --case=underscore --with-expecter // Defines an interface for fetching pre-signed URLs. type RemoteURLInterface interface { diff --git a/flyteadmin/pkg/executioncluster/interfaces/execution_target_provider.go b/flyteadmin/pkg/executioncluster/interfaces/execution_target_provider.go index 1dea47bec7..3d9c8a389b 100644 --- a/flyteadmin/pkg/executioncluster/interfaces/execution_target_provider.go +++ b/flyteadmin/pkg/executioncluster/interfaces/execution_target_provider.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces" ) -//go:generate mockery --all --case=underscore --output=../mocks --case=underscore --with-expecter type ExecutionTargetProvider interface { GetExecutionTarget(initializationErrorCounter prometheus.Counter, k8sCluster interfaces.ClusterConfig) (*executioncluster.ExecutionTarget, error) diff --git a/flyteadmin/pkg/manager/interfaces/execution.go b/flyteadmin/pkg/manager/interfaces/execution.go index 67315199c8..910516ca95 100644 --- a/flyteadmin/pkg/manager/interfaces/execution.go +++ b/flyteadmin/pkg/manager/interfaces/execution.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=ExecutionInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte Workflow Executions type ExecutionInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/launch_plan.go b/flyteadmin/pkg/manager/interfaces/launch_plan.go index e250e11bf8..f644886571 100644 --- a/flyteadmin/pkg/manager/interfaces/launch_plan.go +++ b/flyteadmin/pkg/manager/interfaces/launch_plan.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=LaunchPlanInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte Launch Plans type LaunchPlanInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/metrics.go b/flyteadmin/pkg/manager/interfaces/metrics.go index 533adf9157..edcc2cfe32 100644 --- a/flyteadmin/pkg/manager/interfaces/metrics.go +++ b/flyteadmin/pkg/manager/interfaces/metrics.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=MetricsInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte execution metrics type MetricsInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/named_entity.go b/flyteadmin/pkg/manager/interfaces/named_entity.go index 3d70c01687..22ef248474 100644 --- a/flyteadmin/pkg/manager/interfaces/named_entity.go +++ b/flyteadmin/pkg/manager/interfaces/named_entity.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=NamedEntityInterface --output=../mocks --case=underscore --with-expecter // Interface for managing metadata associated with NamedEntityIdentifiers type NamedEntityInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/node_execution.go b/flyteadmin/pkg/manager/interfaces/node_execution.go index 8b80a4341b..8a51f464d1 100644 --- a/flyteadmin/pkg/manager/interfaces/node_execution.go +++ b/flyteadmin/pkg/manager/interfaces/node_execution.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=NodeExecutionInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte Workflow NodeExecutions type NodeExecutionInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/project.go b/flyteadmin/pkg/manager/interfaces/project.go index a5f8596b55..d5c7a575fa 100644 --- a/flyteadmin/pkg/manager/interfaces/project.go +++ b/flyteadmin/pkg/manager/interfaces/project.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=ProjectInterface --output=../mocks --case=underscore --with-expecter // Interface for managing projects (and domains). type ProjectInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/resource.go b/flyteadmin/pkg/manager/interfaces/resource.go index ed908e52a6..cad182579a 100644 --- a/flyteadmin/pkg/manager/interfaces/resource.go +++ b/flyteadmin/pkg/manager/interfaces/resource.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=ResourceInterface --output=../mocks --case=underscore --with-expecter // ResourceInterface manages project, domain and workflow -specific attributes. type ResourceInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/signal.go b/flyteadmin/pkg/manager/interfaces/signal.go index d0fb1a0936..24135c5f60 100644 --- a/flyteadmin/pkg/manager/interfaces/signal.go +++ b/flyteadmin/pkg/manager/interfaces/signal.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=SignalInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte Signals type SignalInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/task.go b/flyteadmin/pkg/manager/interfaces/task.go index c26667e550..88c134d704 100644 --- a/flyteadmin/pkg/manager/interfaces/task.go +++ b/flyteadmin/pkg/manager/interfaces/task.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=TaskInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte Tasks type TaskInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/task_execution.go b/flyteadmin/pkg/manager/interfaces/task_execution.go index 4d57d092ee..a09f29cf5a 100644 --- a/flyteadmin/pkg/manager/interfaces/task_execution.go +++ b/flyteadmin/pkg/manager/interfaces/task_execution.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=TaskExecutionInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte Workflow TaskExecutions type TaskExecutionInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/version.go b/flyteadmin/pkg/manager/interfaces/version.go index a4bfb8afec..dd823b8477 100644 --- a/flyteadmin/pkg/manager/interfaces/version.go +++ b/flyteadmin/pkg/manager/interfaces/version.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=VersionInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte admin version type VersionInterface interface { diff --git a/flyteadmin/pkg/manager/interfaces/workflow.go b/flyteadmin/pkg/manager/interfaces/workflow.go index 8203089f12..b8f0c970aa 100644 --- a/flyteadmin/pkg/manager/interfaces/workflow.go +++ b/flyteadmin/pkg/manager/interfaces/workflow.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery --name=WorkflowInterface --output=../mocks --case=underscore --with-expecter // Interface for managing Flyte Workflows type WorkflowInterface interface { diff --git a/flyteadmin/pkg/repositories/interfaces/description_entity.go b/flyteadmin/pkg/repositories/interfaces/description_entity.go index d6a4c676fc..6b2b763c9d 100644 --- a/flyteadmin/pkg/repositories/interfaces/description_entity.go +++ b/flyteadmin/pkg/repositories/interfaces/description_entity.go @@ -19,7 +19,6 @@ type DescriptionEntityCollectionOutput struct { Entities []models.DescriptionEntity } -//go:generate mockery --name=DescriptionEntityRepoInterface --output=../mocks --case=underscore --with-expecter // DescriptionEntityRepoInterface Defines the interface for interacting with Description models. type DescriptionEntityRepoInterface interface { diff --git a/flyteadmin/pkg/repositories/interfaces/execution_event_repo.go b/flyteadmin/pkg/repositories/interfaces/execution_event_repo.go index 78b5a71a53..f47f6d8248 100644 --- a/flyteadmin/pkg/repositories/interfaces/execution_event_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/execution_event_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models" ) -//go:generate mockery --name=ExecutionEventRepoInterface --output=../mocks --case=underscore --with-expecter type ExecutionEventRepoInterface interface { // Inserts a workflow execution event into the database store. diff --git a/flyteadmin/pkg/repositories/interfaces/named_entity_repo.go b/flyteadmin/pkg/repositories/interfaces/named_entity_repo.go index cc0d6c7d48..9c698e702b 100644 --- a/flyteadmin/pkg/repositories/interfaces/named_entity_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/named_entity_repo.go @@ -26,7 +26,6 @@ type NamedEntityCollectionOutput struct { Entities []models.NamedEntity } -//go:generate mockery --name=NamedEntityRepoInterface --output=../mocks --case=underscore --with-expecter // Defines the interface for interacting with NamedEntity models type NamedEntityRepoInterface interface { diff --git a/flyteadmin/pkg/repositories/interfaces/node_execution_event_repo.go b/flyteadmin/pkg/repositories/interfaces/node_execution_event_repo.go index bfbc04106c..f11c672b43 100644 --- a/flyteadmin/pkg/repositories/interfaces/node_execution_event_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/node_execution_event_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models" ) -//go:generate mockery --name=NodeExecutionEventRepoInterface --output=../mocks --case=underscore --with-expecter type NodeExecutionEventRepoInterface interface { // Inserts a node execution event into the database store. diff --git a/flyteadmin/pkg/repositories/interfaces/signal_repo.go b/flyteadmin/pkg/repositories/interfaces/signal_repo.go index d5158a3221..ba9bd35182 100644 --- a/flyteadmin/pkg/repositories/interfaces/signal_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/signal_repo.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) -//go:generate mockery --name=SignalRepoInterface --output=../mocks --case=underscore --with-expecter // Defines the interface for interacting with signal models. type SignalRepoInterface interface { diff --git a/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go b/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go index 89b755a44c..721ce064e6 100644 --- a/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go @@ -51,7 +51,6 @@ type Clusters struct { DefaultExecutionLabel string `json:"defaultExecutionLabel"` } -//go:generate mockery --name ClusterConfiguration --case=underscore --output=../mocks --case=underscore --with-expecter // Provides values set in runtime configuration files. // These files can be changed without requiring a full server restart. diff --git a/flyteadmin/pkg/runtime/interfaces/cluster_pools.go b/flyteadmin/pkg/runtime/interfaces/cluster_pools.go index 3817346adb..7ff971256c 100644 --- a/flyteadmin/pkg/runtime/interfaces/cluster_pools.go +++ b/flyteadmin/pkg/runtime/interfaces/cluster_pools.go @@ -1,6 +1,5 @@ package interfaces -//go:generate mockery --name ClusterPoolAssignmentConfiguration --output=mocks --case=underscore --with-expecter type ClusterPoolAssignment struct { Pool string `json:"pool"` diff --git a/flyteadmin/pkg/runtime/interfaces/namespace_configuration.go b/flyteadmin/pkg/runtime/interfaces/namespace_configuration.go index 656569593d..4b6cdaf14f 100644 --- a/flyteadmin/pkg/runtime/interfaces/namespace_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/namespace_configuration.go @@ -6,7 +6,6 @@ type NamespaceMappingConfig struct { TemplateData TemplateData `json:"templateData"` } -//go:generate mockery --name NamespaceMappingConfiguration --output=../mocks --case=underscore --with-expecter type NamespaceMappingConfiguration interface { GetNamespaceTemplate() string diff --git a/flyteadmin/pkg/runtime/interfaces/quality_of_service_configuration.go b/flyteadmin/pkg/runtime/interfaces/quality_of_service_configuration.go index b9c2940c53..010f5e00d6 100644 --- a/flyteadmin/pkg/runtime/interfaces/quality_of_service_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/quality_of_service_configuration.go @@ -8,7 +8,6 @@ import ( type TierName = string // Just incrementally start using mockery, replace with -all when working on https://github.com/flyteorg/flyte/issues/149 -//go:generate mockery --name QualityOfServiceConfiguration --output=mocks --case=underscore --with-expecter type QualityOfServiceSpec struct { QueueingBudget config.Duration `json:"queueingBudget"` diff --git a/flyteadmin/pkg/runtime/interfaces/whitelist.go b/flyteadmin/pkg/runtime/interfaces/whitelist.go index 72ec84bc6a..a53b421c64 100644 --- a/flyteadmin/pkg/runtime/interfaces/whitelist.go +++ b/flyteadmin/pkg/runtime/interfaces/whitelist.go @@ -8,7 +8,6 @@ type WhitelistScope struct { // Defines specific task types whitelisted for support. type TaskTypeWhitelist = map[string][]WhitelistScope -//go:generate mockery --name WhitelistConfiguration --case=underscore --output=../mocks --case=underscore --with-expecter type WhitelistConfiguration interface { // Returns whitelisted task types defined in runtime configuration files. GetTaskTypeWhitelist() TaskTypeWhitelist diff --git a/flyteadmin/pkg/workflowengine/interfaces/builder.go b/flyteadmin/pkg/workflowengine/interfaces/builder.go index 8a2d212259..d28d894e6b 100644 --- a/flyteadmin/pkg/workflowengine/interfaces/builder.go +++ b/flyteadmin/pkg/workflowengine/interfaces/builder.go @@ -5,7 +5,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --name FlyteWorkflowBuilder --output=../mocks --case=underscore --with-expecter // FlyteWorkflowBuilder produces a v1alpha1.FlyteWorkflow definition from a compiled workflow closure and execution inputs type FlyteWorkflowBuilder interface { diff --git a/flyteadmin/pkg/workflowengine/interfaces/executor.go b/flyteadmin/pkg/workflowengine/interfaces/executor.go index 917a8a2b27..133864463f 100644 --- a/flyteadmin/pkg/workflowengine/interfaces/executor.go +++ b/flyteadmin/pkg/workflowengine/interfaces/executor.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --name=WorkflowExecutor --output=../mocks/ --case=underscore --with-expecter type TaskResources struct { Defaults runtime.TaskResourceSet diff --git a/flyteadmin/scheduler/executor/executor.go b/flyteadmin/scheduler/executor/executor.go index c37934af52..fabffb34cb 100644 --- a/flyteadmin/scheduler/executor/executor.go +++ b/flyteadmin/scheduler/executor/executor.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models" ) -//go:generate mockery --name Executor --output=mocks --case=underscore --with-expecter // Executor allows the ability to create scheduled executions on admin type Executor interface { diff --git a/flyteadmin/scheduler/repositories/interfaces/schedulable_entity_repo.go b/flyteadmin/scheduler/repositories/interfaces/schedulable_entity_repo.go index e3f3bfcf78..aff4f64eff 100644 --- a/flyteadmin/scheduler/repositories/interfaces/schedulable_entity_repo.go +++ b/flyteadmin/scheduler/repositories/interfaces/schedulable_entity_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models" ) -//go:generate mockery --name=SchedulableEntityRepoInterface --output=../mocks --case=underscore --with-expecter // SchedulableEntityRepoInterface : An Interface for interacting with the schedulable entity in the database type SchedulableEntityRepoInterface interface { diff --git a/flyteadmin/scheduler/repositories/interfaces/schedule_entities_snapshot_repo.go b/flyteadmin/scheduler/repositories/interfaces/schedule_entities_snapshot_repo.go index 724ce7bcf2..4c4ea18529 100644 --- a/flyteadmin/scheduler/repositories/interfaces/schedule_entities_snapshot_repo.go +++ b/flyteadmin/scheduler/repositories/interfaces/schedule_entities_snapshot_repo.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models" ) -//go:generate mockery --name=ScheduleEntitiesSnapShotRepoInterface --output=../mocks --case=underscore --with-expecter // ScheduleEntitiesSnapShotRepoInterface : An Interface for interacting with the snapshot of schedulable entities in the database type ScheduleEntitiesSnapShotRepoInterface interface { diff --git a/flytectl/cmd/update/interfaces/updater.go b/flytectl/cmd/update/interfaces/updater.go index 19f1bb818b..fe8359dbf3 100644 --- a/flytectl/cmd/update/interfaces/updater.go +++ b/flytectl/cmd/update/interfaces/updater.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) -//go:generate mockery --name=Updater --case=underscore --with-expecter type Updater interface { UpdateNamedEntity(ctx context.Context, name, project, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error diff --git a/flytectl/pkg/docker/docker.go b/flytectl/pkg/docker/docker.go index 2ceac6fa9d..46cf035d49 100644 --- a/flytectl/pkg/docker/docker.go +++ b/flytectl/pkg/docker/docker.go @@ -13,7 +13,6 @@ import ( ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) -//go:generate mockery --all --case=underscore --with-expecter type Docker interface { ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *ocispec.Platform, containerName string) (container.CreateResponse, error) diff --git a/flytectl/pkg/ext/deleter.go b/flytectl/pkg/ext/deleter.go index f6149d127d..2eb6593d58 100644 --- a/flytectl/pkg/ext/deleter.go +++ b/flytectl/pkg/ext/deleter.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery --all --case=underscore --with-expecter // AdminDeleterExtInterface Interface for exposing the update capabilities from the admin type AdminDeleterExtInterface interface { diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 338fa4f25e..f2a842a82e 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery --all --case=underscore --with-expecter // AdminFetcherExtInterface Interface for exposing the fetch capabilities from the admin and also allow this to be injectable into other // modules. eg : create execution which requires to fetch launchplan details to construct the execution spec. diff --git a/flytectl/pkg/ext/updater.go b/flytectl/pkg/ext/updater.go index 9e829b278e..4539f3f23f 100644 --- a/flytectl/pkg/ext/updater.go +++ b/flytectl/pkg/ext/updater.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery --all --case=underscore --with-expecter // AdminUpdaterExtInterface Interface for exposing the update capabilities from the admin type AdminUpdaterExtInterface interface { diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index 7bf7d8d0f0..b5f65e996a 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -52,7 +52,6 @@ var ( arch = platformutil.Arch(runtime.GOARCH) ) -//go:generate mockery --name=GHRepoService --case=underscore --with-expecter type GHRepoService interface { GetLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error) diff --git a/flytectl/pkg/k8s/k8s.go b/flytectl/pkg/k8s/k8s.go index af013ae959..37e32a67b7 100644 --- a/flytectl/pkg/k8s/k8s.go +++ b/flytectl/pkg/k8s/k8s.go @@ -16,7 +16,6 @@ type K8s interface { CoreV1() corev1.CoreV1Interface } -//go:generate mockery --name=ContextOps --case=underscore --with-expecter type ContextOps interface { CheckConfig() error CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName, targetNamespace string) error diff --git a/flytectl/pkg/visualize/graphvizer.go b/flytectl/pkg/visualize/graphvizer.go index d194b99fd6..5002b4efe1 100644 --- a/flytectl/pkg/visualize/graphvizer.go +++ b/flytectl/pkg/visualize/graphvizer.go @@ -2,7 +2,6 @@ package visualize import graphviz "github.com/awalterschulze/gographviz" -//go:generate mockery --all --case=underscore --with-expecter type Graphvizer interface { AddEdge(src, dst string, directed bool, attrs map[string]string) error diff --git a/flyteidl/clients/go/admin/cache/token_cache.go b/flyteidl/clients/go/admin/cache/token_cache.go index cf901bdf24..2545b7feec 100644 --- a/flyteidl/clients/go/admin/cache/token_cache.go +++ b/flyteidl/clients/go/admin/cache/token_cache.go @@ -6,7 +6,6 @@ import ( "golang.org/x/oauth2" ) -//go:generate mockery --all --case=underscore --with-expecter var ( ErrNotFound = fmt.Errorf("secret not found in keyring") diff --git a/flyteidl/clients/go/admin/client.go b/flyteidl/clients/go/admin/client.go index c2bd88653a..6f60e55935 100644 --- a/flyteidl/clients/go/admin/client.go +++ b/flyteidl/clients/go/admin/client.go @@ -20,7 +20,6 @@ import ( ) // IDE "Go Generate File". This will create a mocks/AdminServiceClient.go file -//go:generate mockery --dir ../../../gen/pb-go/flyteidl/service --name AdminServiceClient --output ../admin/mocks --with-expecter // Clientset contains the clients exposed to communicate with various admin services. type Clientset struct { diff --git a/flyteidl/clients/go/admin/token_source_provider.go b/flyteidl/clients/go/admin/token_source_provider.go index 2b54ca98ed..8ba267d947 100644 --- a/flyteidl/clients/go/admin/token_source_provider.go +++ b/flyteidl/clients/go/admin/token_source_provider.go @@ -25,7 +25,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery --name TokenSource --with-expecter type TokenSource interface { Token() (*oauth2.Token, error) } diff --git a/flyteplugins/go/tasks/pluginmachinery/catalog/client.go b/flyteplugins/go/tasks/pluginmachinery/catalog/client.go index c9ce685cf5..283008cd2e 100644 --- a/flyteplugins/go/tasks/pluginmachinery/catalog/client.go +++ b/flyteplugins/go/tasks/pluginmachinery/catalog/client.go @@ -13,7 +13,6 @@ import ( "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io" ) -//go:generate mockery --all --case=underscore --with-expecter // Metadata to be associated with the catalog object type Metadata struct { diff --git a/flyteplugins/go/tasks/pluginmachinery/core/exec_context.go b/flyteplugins/go/tasks/pluginmachinery/core/exec_context.go index eb60183b04..a54562a594 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/exec_context.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/exec_context.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --case=underscore --with-expecter // An interface to access a remote/sharable location that contains the serialized TaskTemplate type TaskTemplatePath interface { diff --git a/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go b/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go index 83d8c4a1f7..08c7b59eff 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) -//go:generate mockery --all --case=underscore --with-expecter // TaskOverrides interface to expose any overrides that have been set for this task (like resource overrides etc) type TaskOverrides interface { diff --git a/flyteplugins/go/tasks/pluginmachinery/core/plugin.go b/flyteplugins/go/tasks/pluginmachinery/core/plugin.go index 13f1e88fba..5f917563a7 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/plugin.go @@ -5,7 +5,6 @@ import ( "fmt" ) -//go:generate mockery --all --case=underscore --with-expecter // https://github.com/flyteorg/flytepropeller/blob/979fabe1d1b22b01645259a03b8096f227681d08/pkg/utils/encoder.go#L25-L26 const minGeneratedNameLength = 8 diff --git a/flyteplugins/go/tasks/pluginmachinery/core/secret_manager.go b/flyteplugins/go/tasks/pluginmachinery/core/secret_manager.go index 9bc7c5c164..aff5397922 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/secret_manager.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/secret_manager.go @@ -2,7 +2,6 @@ package core import "context" -//go:generate mockery --all --case=underscore --with-expecter type SecretManager interface { Get(ctx context.Context, key string) (string, error) } diff --git a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/cache.go b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/cache.go index 6d673e1f8e..413783ec52 100644 --- a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/cache.go +++ b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/cache.go @@ -16,7 +16,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery --all --case=underscore --with-expecter const ( BadReturnCodeError stdErrors.ErrorCode = "RETURNED_UNKNOWN" diff --git a/flyteplugins/go/tasks/pluginmachinery/io/iface.go b/flyteplugins/go/tasks/pluginmachinery/io/iface.go index 0a8e5231f6..6512382646 100644 --- a/flyteplugins/go/tasks/pluginmachinery/io/iface.go +++ b/flyteplugins/go/tasks/pluginmachinery/io/iface.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --case=underscore --with-expecter // InputFilePaths contains the different ways available for downstream systems to retrieve inputs. // If using Files for IO with tasks, then the input will be written to this path. All the files are always created in a diff --git a/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go b/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go index 847911976b..76a2edd03d 100644 --- a/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --case=underscore --with-expecter // PluginEntry is a structure that is used to indicate to the system a K8s plugin type PluginEntry struct { diff --git a/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go b/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go index 0393d2dd7b..2a7778beb4 100644 --- a/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go @@ -16,7 +16,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --case=underscore --with-expecter // A Lazy loading function, that will load the plugin. Plugins should be initialized in this method. It is guaranteed // that the plugin loader will be called before any Handle/Abort/Finalize functions are invoked diff --git a/flyteplugins/go/tasks/pluginmachinery/workqueue/queue.go b/flyteplugins/go/tasks/pluginmachinery/workqueue/queue.go index b7da8ba0fb..7370813a4d 100644 --- a/flyteplugins/go/tasks/pluginmachinery/workqueue/queue.go +++ b/flyteplugins/go/tasks/pluginmachinery/workqueue/queue.go @@ -15,7 +15,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery --all --case=underscore --with-expecter //go:generate enumer --type=WorkStatus type WorkItemID = string diff --git a/flyteplugins/go/tasks/plugins/array/awsbatch/client.go b/flyteplugins/go/tasks/plugins/array/awsbatch/client.go index d46e5fe9bb..ee9c508ded 100644 --- a/flyteplugins/go/tasks/plugins/array/awsbatch/client.go +++ b/flyteplugins/go/tasks/plugins/array/awsbatch/client.go @@ -19,7 +19,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/utils" ) -//go:generate mockery --all --case=underscore --with-expecter // AWS Batch Client interface. type Client interface { diff --git a/flyteplugins/go/tasks/plugins/array/core/state.go b/flyteplugins/go/tasks/plugins/array/core/state.go index fdb961c0f8..a167cb17a9 100644 --- a/flyteplugins/go/tasks/plugins/array/core/state.go +++ b/flyteplugins/go/tasks/plugins/array/core/state.go @@ -17,7 +17,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery --all --case=underscore --with-expecter //go:generate enumer -type=Phase type Phase uint8 diff --git a/flyteplugins/go/tasks/plugins/presto/client/presto_client.go b/flyteplugins/go/tasks/plugins/presto/client/presto_client.go index a1a6c9dff5..3b59797653 100644 --- a/flyteplugins/go/tasks/plugins/presto/client/presto_client.go +++ b/flyteplugins/go/tasks/plugins/presto/client/presto_client.go @@ -17,7 +17,6 @@ type PrestoExecuteResponse struct { NextURI string `json:"nextUri,omitempty"` } -//go:generate mockery --all --case=snake --with-expecter // Interface to interact with PrestoClient for Presto tasks type PrestoClient interface { diff --git a/flytepropeller/events/node_event_recorder.go b/flytepropeller/events/node_event_recorder.go index 0b5985d2d0..3f6e56a244 100644 --- a/flytepropeller/events/node_event_recorder.go +++ b/flytepropeller/events/node_event_recorder.go @@ -16,7 +16,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --output=mocks --case=underscore --with-expecter // NodeEventRecorder records Node events type NodeEventRecorder interface { diff --git a/flytepropeller/events/task_event_recorder.go b/flytepropeller/events/task_event_recorder.go index 9e1e24894a..dc2ad66762 100644 --- a/flytepropeller/events/task_event_recorder.go +++ b/flytepropeller/events/task_event_recorder.go @@ -16,7 +16,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --output=mocks --case=underscore --with-expecter // Recorder for Task events type TaskEventRecorder interface { diff --git a/flytepropeller/events/workflow_event_recorder.go b/flytepropeller/events/workflow_event_recorder.go index e0cf8450e2..79b8d8271d 100644 --- a/flytepropeller/events/workflow_event_recorder.go +++ b/flytepropeller/events/workflow_event_recorder.go @@ -16,7 +16,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --output=mocks --case=underscore --with-expecter // Recorder for Workflow events type WorkflowEventRecorder interface { diff --git a/flytepropeller/manager/shardstrategy/shard_strategy.go b/flytepropeller/manager/shardstrategy/shard_strategy.go index 97bc533def..a7add31b77 100644 --- a/flytepropeller/manager/shardstrategy/shard_strategy.go +++ b/flytepropeller/manager/shardstrategy/shard_strategy.go @@ -13,7 +13,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --name ShardStrategy --case=underscore --with-expecter // ShardStrategy defines necessary functionality for a sharding strategy. type ShardStrategy interface { diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go index 8bfdbab405..cdabc41ef8 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go @@ -19,7 +19,6 @@ import ( // The intention of these interfaces is to decouple the algorithm and usage from the actual CRD definition. // this would help in ease of changes underneath without affecting the code. -//go:generate mockery --all --with-expecter type WorkflowID = string type TaskID = string diff --git a/flytepropeller/pkg/compiler/common/builder.go b/flytepropeller/pkg/compiler/common/builder.go index 9b1fb1c2ab..84b99b7376 100644 --- a/flytepropeller/pkg/compiler/common/builder.go +++ b/flytepropeller/pkg/compiler/common/builder.go @@ -19,7 +19,6 @@ const ( EdgeDirectionUpstream ) -//go:generate mockery --all --output=mocks --case=underscore --with-expecter // A mutable workflow used during the build of the intermediate layer. type WorkflowBuilder interface { diff --git a/flytepropeller/pkg/controller/executors/dag_structure.go b/flytepropeller/pkg/controller/executors/dag_structure.go index 09b3ed281c..d02fd9e25b 100644 --- a/flytepropeller/pkg/controller/executors/dag_structure.go +++ b/flytepropeller/pkg/controller/executors/dag_structure.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --name DAGStructure --name DAGStructureWithStartNode --case=underscore --with-expecter // An interface that captures the Directed Acyclic Graph structure in which the nodes are connected. // If NodeLookup and DAGStructure are used together a traversal can be implemented. diff --git a/flytepropeller/pkg/controller/executors/execution_context.go b/flytepropeller/pkg/controller/executors/execution_context.go index 4a7cc11b5d..a7a6a9114f 100644 --- a/flytepropeller/pkg/controller/executors/execution_context.go +++ b/flytepropeller/pkg/controller/executors/execution_context.go @@ -4,7 +4,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --all --case=underscore --with-expecter type TaskDetailsGetter interface { GetTask(id v1alpha1.TaskID) (v1alpha1.ExecutableTask, error) diff --git a/flytepropeller/pkg/controller/executors/kube.go b/flytepropeller/pkg/controller/executors/kube.go index b1cb396aba..57221a5f71 100644 --- a/flytepropeller/pkg/controller/executors/kube.go +++ b/flytepropeller/pkg/controller/executors/kube.go @@ -13,7 +13,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery --name Client --case=underscore --with-expecter // Client is a friendlier controller-runtime client that gets passed to executors type Client interface { diff --git a/flytepropeller/pkg/controller/executors/node_lookup.go b/flytepropeller/pkg/controller/executors/node_lookup.go index 4ac5e1ff98..2d19d70171 100644 --- a/flytepropeller/pkg/controller/executors/node_lookup.go +++ b/flytepropeller/pkg/controller/executors/node_lookup.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --name NodeLookup --case=underscore --with-expecter // NodeLookup provides a structure that enables looking up all nodes within the current execution hierarchy/context. // NOTE: execution hierarchy may change the nodes available, this is because when a SubWorkflow is being executed, only diff --git a/flytepropeller/pkg/controller/executors/workflow.go b/flytepropeller/pkg/controller/executors/workflow.go index 98c5c35413..9e7920dac0 100644 --- a/flytepropeller/pkg/controller/executors/workflow.go +++ b/flytepropeller/pkg/controller/executors/workflow.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --name Workflow --case=underscore --with-expecter type Workflow interface { Initialize(ctx context.Context) error diff --git a/flytepropeller/pkg/controller/interfaces/rate_limiter.go b/flytepropeller/pkg/controller/interfaces/rate_limiter.go index eb7120cd6d..9fbbc352dc 100644 --- a/flytepropeller/pkg/controller/interfaces/rate_limiter.go +++ b/flytepropeller/pkg/controller/interfaces/rate_limiter.go @@ -7,8 +7,6 @@ import ( "golang.org/x/time/rate" ) -//go:generate mockery --name Limiter --output ../mocks --case=snake --with-expecter -//go:generate mockery --name Reservation --output ../mocks --case=snake --with-expecter type Limiter interface { Allow() bool diff --git a/flytepropeller/pkg/controller/nodes/array/event_recorder.go b/flytepropeller/pkg/controller/nodes/array/event_recorder.go index 1cfaa8c726..1ba00fbf90 100644 --- a/flytepropeller/pkg/controller/nodes/array/event_recorder.go +++ b/flytepropeller/pkg/controller/nodes/array/event_recorder.go @@ -49,7 +49,6 @@ func (t *taskExecutionID) GetUniqueNodeID() string { return t.nodeID } -//go:generate mockery --all --case=underscore type arrayEventRecorder interface { interfaces.EventRecorder diff --git a/flytepropeller/pkg/controller/nodes/array/handler.go b/flytepropeller/pkg/controller/nodes/array/handler.go index a38bd632f5..8fb0d980c2 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler.go +++ b/flytepropeller/pkg/controller/nodes/array/handler.go @@ -44,7 +44,6 @@ var ( } ) -//go:generate mockery --all --case=underscore --with-expecter // arrayNodeHandler is a handle implementation for processing array nodes type arrayNodeHandler struct { diff --git a/flytepropeller/pkg/controller/nodes/dynamic/handler.go b/flytepropeller/pkg/controller/nodes/dynamic/handler.go index d97b46d98f..9ffe6769b7 100644 --- a/flytepropeller/pkg/controller/nodes/dynamic/handler.go +++ b/flytepropeller/pkg/controller/nodes/dynamic/handler.go @@ -22,7 +22,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" ) -//go:generate mockery --all --case=underscore --with-expecter const dynamicNodeID = "dynamic-node" diff --git a/flytepropeller/pkg/controller/nodes/gate/handler.go b/flytepropeller/pkg/controller/nodes/gate/handler.go index 1e4c5cd105..9f52fc8108 100644 --- a/flytepropeller/pkg/controller/nodes/gate/handler.go +++ b/flytepropeller/pkg/controller/nodes/gate/handler.go @@ -18,7 +18,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --case=underscore --with-expecter // SignalServiceClient is a SignalServiceClient wrapper interface used specifically for generating // mocks for testing diff --git a/flytepropeller/pkg/controller/nodes/interfaces/handler.go b/flytepropeller/pkg/controller/nodes/interfaces/handler.go index d291ca38dc..5a3fd19c68 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/handler.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/handler.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery --all --case=underscore --with-expecter // NodeExecutor defines the interface for handling a single Flyte Node of any Node type. type NodeExecutor interface { diff --git a/flytepropeller/pkg/controller/nodes/interfaces/handler_factory.go b/flytepropeller/pkg/controller/nodes/interfaces/handler_factory.go index ede1e025d9..7bedcdff6b 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/handler_factory.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/handler_factory.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --name HandlerFactory --case=underscore --with-expecter type HandlerFactory interface { GetHandler(kind v1alpha1.NodeKind) (NodeHandler, error) diff --git a/flytepropeller/pkg/controller/nodes/interfaces/node.go b/flytepropeller/pkg/controller/nodes/interfaces/node.go index 5904dd28f8..0276de90bc 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/node.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/node.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors" ) -//go:generate mockery --all --case=underscore --with-expecter // p of the node type NodePhase int diff --git a/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go b/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go index 76ff9cc6bc..b3d4c30d94 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go @@ -15,7 +15,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery --all --case=underscore --with-expecter type TaskReader interface { Read(ctx context.Context) (*core.TaskTemplate, error) diff --git a/flytepropeller/pkg/controller/nodes/output_resolver.go b/flytepropeller/pkg/controller/nodes/output_resolver.go index d88ed7c410..7b596e5e68 100644 --- a/flytepropeller/pkg/controller/nodes/output_resolver.go +++ b/flytepropeller/pkg/controller/nodes/output_resolver.go @@ -14,7 +14,6 @@ import ( type VarName = string -//go:generate mockery --name=OutputResolver --case=underscore --with-expecter type OutputResolver interface { // Extracts a subset of node outputs to literals. diff --git a/flytepropeller/pkg/controller/nodes/recovery/client.go b/flytepropeller/pkg/controller/nodes/recovery/client.go index 129c63122b..12917114a5 100644 --- a/flytepropeller/pkg/controller/nodes/recovery/client.go +++ b/flytepropeller/pkg/controller/nodes/recovery/client.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery --name Client --output=mocks --case=underscore --with-expecter type Client interface { RecoverNodeExecution(ctx context.Context, execID *core.WorkflowExecutionIdentifier, nodeID string) (*admin.NodeExecution, error) diff --git a/flytepropeller/pkg/controller/nodes/subworkflow/launchplan/launchplan.go b/flytepropeller/pkg/controller/nodes/subworkflow/launchplan/launchplan.go index 4709bbdc66..b319404819 100644 --- a/flytepropeller/pkg/controller/nodes/subworkflow/launchplan/launchplan.go +++ b/flytepropeller/pkg/controller/nodes/subworkflow/launchplan/launchplan.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --all --case=underscore --with-expecter // LaunchContext is a simple context that is used to start an execution of a LaunchPlan. It encapsulates enough parent information // to tie the executions diff --git a/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_client.go b/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_client.go index f9fbf0f9d6..3ae251ef86 100644 --- a/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_client.go +++ b/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_client.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery --name RedisClient --case=underscore --with-expecter type RedisClient interface { // A pass-through method. Getting the cardinality of the Redis set diff --git a/flytepropeller/pkg/controller/workflowstore/iface.go b/flytepropeller/pkg/controller/workflowstore/iface.go index c031dbde1e..2c603b97a2 100644 --- a/flytepropeller/pkg/controller/workflowstore/iface.go +++ b/flytepropeller/pkg/controller/workflowstore/iface.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery --all --with-expecter // FlyteWorkflow store interface provides an abstraction of accessing the actual FlyteWorkflow object. type FlyteWorkflow interface { diff --git a/flytepropeller/pkg/webhook/global_secrets.go b/flytepropeller/pkg/webhook/global_secrets.go index 6d5e6ffce3..88c4d2a9cf 100644 --- a/flytepropeller/pkg/webhook/global_secrets.go +++ b/flytepropeller/pkg/webhook/global_secrets.go @@ -12,7 +12,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery --all --case=underscore --with-expecter type GlobalSecretProvider interface { GetForSecret(ctx context.Context, secret *coreIdl.Secret) (string, error) diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go index 91d9e9d259..f322a7a4e1 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -13,7 +13,6 @@ const ( ErrNotFound errors.ErrorCode = "NOT_FOUND" ) -//go:generate mockery --all --with-expecter // AutoRefresh with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides // callbacks for create, refresh and delete item. diff --git a/flytestdlib/fastcheck/iface.go b/flytestdlib/fastcheck/iface.go index 42b0cfdf4e..2256489b15 100644 --- a/flytestdlib/fastcheck/iface.go +++ b/flytestdlib/fastcheck/iface.go @@ -14,7 +14,6 @@ import ( // resolution // The Data-structure is thread-safe and can be accessed by multiple threads concurrently. -//go:generate mockery --name Filter --case=underscore --with-expecter type Filter interface { // Contains returns a True if the id was previously seen or false otherwise diff --git a/flytestdlib/random/weighted_random_list.go b/flytestdlib/random/weighted_random_list.go index 2b0182a31e..02b917f814 100644 --- a/flytestdlib/random/weighted_random_list.go +++ b/flytestdlib/random/weighted_random_list.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery --all --case=underscore --with-expecter // Interface to use the Weighted Random type WeightedRandomList interface { diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index 92066272c5..6f514ab9f0 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -105,7 +105,6 @@ type SignedURLResponse struct { RequiredRequestHeaders map[string]string } -//go:generate mockery --name RawStore --case=underscore --with-expecter // RawStore defines a low level interface for accessing and storing bytes. type RawStore interface { @@ -134,7 +133,6 @@ type RawStore interface { Delete(ctx context.Context, reference DataReference) error } -//go:generate mockery --name ReferenceConstructor --case=underscore --with-expecter // ReferenceConstructor defines an interface for building data reference paths. type ReferenceConstructor interface { @@ -154,7 +152,6 @@ type ProtobufStore interface { WriteProtobuf(ctx context.Context, reference DataReference, opts Options, msg proto.Message) error } -//go:generate mockery --name ComposedProtobufStore --case=underscore --with-expecter // ComposedProtobufStore interface includes all the necessary data to allow a ProtobufStore to interact with storage // through a RawStore. diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index dcda278ccb..fc54ba5998 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -12,7 +12,6 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery --all --case=underscore --with-expecter // AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides // callbacks for create, refresh and delete item.