From 22726177474b217dfe539fb448cdd66acb6698d8 Mon Sep 17 00:00:00 2001 From: Jason Parraga Date: Thu, 27 Feb 2025 22:18:51 -0800 Subject: [PATCH] Remove mockery fork logic Signed-off-by: Jason Parraga --- .../golang_test_targets/download_tooling.sh | 16 ---------------- datacatalog/pkg/manager/interfaces/artifact.go | 2 +- .../pkg/repositories/interfaces/artifact_repo.go | 2 +- .../pkg/repositories/interfaces/dataset_repo.go | 2 +- .../repositories/interfaces/partition_repo.go | 2 +- .../repositories/interfaces/reservation_repo.go | 2 +- .../pkg/repositories/interfaces/tag_repo.go | 2 +- flyteadmin/auth/interfaces/context.go | 2 +- flyteadmin/auth/interfaces/cookie.go | 2 +- .../pkg/async/cloudevent/interfaces/publisher.go | 2 +- .../pkg/async/cloudevent/interfaces/sender.go | 2 +- .../async/events/interfaces/node_execution.go | 2 +- .../events/interfaces/workflow_execution.go | 2 +- .../implementations/sendgrid_emailer.go | 2 +- .../async/notifications/interfaces/emailer.go | 2 +- .../async/notifications/interfaces/processor.go | 2 +- .../async/notifications/interfaces/publisher.go | 2 +- .../notifications/interfaces/smtp_client.go | 2 +- .../async/schedule/interfaces/event_scheduler.go | 2 +- .../schedule/interfaces/workflow_executor.go | 2 +- .../pkg/clusterresource/interfaces/admin.go | 2 +- flyteadmin/pkg/data/interfaces/remote.go | 2 +- .../interfaces/execution_target_provider.go | 2 +- flyteadmin/pkg/manager/interfaces/execution.go | 2 +- flyteadmin/pkg/manager/interfaces/launch_plan.go | 2 +- flyteadmin/pkg/manager/interfaces/metrics.go | 2 +- .../pkg/manager/interfaces/named_entity.go | 2 +- .../pkg/manager/interfaces/node_execution.go | 2 +- flyteadmin/pkg/manager/interfaces/project.go | 2 +- flyteadmin/pkg/manager/interfaces/resource.go | 2 +- flyteadmin/pkg/manager/interfaces/signal.go | 2 +- flyteadmin/pkg/manager/interfaces/task.go | 2 +- .../pkg/manager/interfaces/task_execution.go | 2 +- flyteadmin/pkg/manager/interfaces/version.go | 2 +- flyteadmin/pkg/manager/interfaces/workflow.go | 2 +- .../interfaces/execution_event_repo.go | 2 +- .../interfaces/node_execution_event_repo.go | 2 +- .../pkg/repositories/interfaces/signal_repo.go | 2 +- .../runtime/interfaces/cluster_configuration.go | 2 +- .../pkg/runtime/interfaces/cluster_pools.go | 2 +- .../interfaces/namespace_configuration.go | 2 +- .../quality_of_service_configuration.go | 2 +- .../pkg/workflowengine/interfaces/builder.go | 2 +- .../pkg/workflowengine/interfaces/executor.go | 2 +- flyteadmin/scheduler/executor/executor.go | 2 +- .../interfaces/schedulable_entity_repo.go | 2 +- .../schedule_entities_snapshot_repo.go | 2 +- flytectl/cmd/update/interfaces/updater.go | 2 +- flytectl/pkg/docker/docker.go | 2 +- flytectl/pkg/ext/deleter.go | 2 +- flytectl/pkg/ext/fetcher.go | 2 +- flytectl/pkg/ext/updater.go | 2 +- flytectl/pkg/github/githubutil.go | 2 +- flytectl/pkg/k8s/k8s.go | 2 +- flytectl/pkg/visualize/graphvizer.go | 2 +- flyteidl/clients/go/admin/cache/token_cache.go | 2 +- flyteidl/clients/go/admin/client.go | 2 +- .../clients/go/admin/token_source_provider.go | 2 +- .../go/tasks/pluginmachinery/catalog/client.go | 2 +- .../tasks/pluginmachinery/core/exec_context.go | 2 +- .../tasks/pluginmachinery/core/exec_metadata.go | 2 +- .../go/tasks/pluginmachinery/core/plugin.go | 2 +- .../tasks/pluginmachinery/core/secret_manager.go | 2 +- .../pluginmachinery/internal/webapi/cache.go | 2 +- .../go/tasks/pluginmachinery/io/iface.go | 2 +- .../go/tasks/pluginmachinery/k8s/plugin.go | 2 +- .../go/tasks/pluginmachinery/webapi/plugin.go | 2 +- .../go/tasks/pluginmachinery/workqueue/queue.go | 2 +- .../go/tasks/plugins/array/awsbatch/client.go | 2 +- .../go/tasks/plugins/array/core/state.go | 2 +- .../tasks/plugins/hive/client/qubole_client.go | 2 +- .../tasks/plugins/presto/client/presto_client.go | 2 +- flytepropeller/events/node_event_recorder.go | 2 +- flytepropeller/events/task_event_recorder.go | 2 +- flytepropeller/events/workflow_event_recorder.go | 2 +- .../manager/shardstrategy/shard_strategy.go | 2 +- .../pkg/apis/flyteworkflow/v1alpha1/iface.go | 2 +- flytepropeller/pkg/compiler/common/builder.go | 2 +- .../pkg/controller/executors/dag_structure.go | 2 +- .../controller/executors/execution_context.go | 2 +- flytepropeller/pkg/controller/executors/kube.go | 2 +- .../pkg/controller/executors/node_lookup.go | 2 +- .../pkg/controller/executors/workflow.go | 2 +- .../pkg/controller/interfaces/rate_limiter.go | 4 ++-- .../pkg/controller/nodes/array/handler.go | 2 +- .../pkg/controller/nodes/dynamic/handler.go | 2 +- .../pkg/controller/nodes/gate/handler.go | 2 +- .../pkg/controller/nodes/interfaces/handler.go | 2 +- .../nodes/interfaces/handler_factory.go | 2 +- .../pkg/controller/nodes/interfaces/node.go | 2 +- .../nodes/interfaces/node_exec_context.go | 2 +- .../pkg/controller/nodes/output_resolver.go | 2 +- .../pkg/controller/nodes/recovery/client.go | 2 +- .../nodes/subworkflow/launchplan/launchplan.go | 2 +- .../nodes/task/resourcemanager/redis_client.go | 2 +- .../pkg/controller/workflowstore/iface.go | 2 +- flytepropeller/pkg/webhook/global_secrets.go | 2 +- flytestdlib/cache/auto_refresh.go | 2 +- flytestdlib/fastcheck/iface.go | 2 +- flytestdlib/random/weighted_random_list.go | 2 +- flytestdlib/storage/storage.go | 6 +++--- flytestdlib/utils/auto_refresh_cache.go | 2 +- 102 files changed, 104 insertions(+), 120 deletions(-) diff --git a/boilerplate/flyte/golang_test_targets/download_tooling.sh b/boilerplate/flyte/golang_test_targets/download_tooling.sh index 5413cdf27f..ff7084846d 100755 --- a/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -35,22 +35,6 @@ pushd "$tmp_dir" for tool in "${tools[@]}"; do echo "Installing ${tool}" GO111MODULE=on go install $tool - # If tool is our mockery fork, we need to rename the binary to mockery-fork - if [[ $tool == "github.com/EngHabu/mockery/cmd/mockery" ]]; then - echo "Renaming mockery to mockery-fork" - mv $(go env GOPATH)/bin/mockery $(go env GOPATH)/bin/mockery-fork - fi - # If tool is named vektra/mockery/v2, we need to rename the binary to mockery-v2 - if [[ $tool == "github.com/vektra/mockery/v2@v2.40.3" ]]; then - echo "Renaming mockery to mockery-v2" - mv $(go env GOPATH)/bin/mockery $(go env GOPATH)/bin/mockery-v2 - fi done -# Rename the mockery-fork binary to mockery to maintain compatibility with the existing uses -if [ -f $(go env GOPATH)/bin/mockery-fork ]; then - echo "Renaming mockery-fork to mockery" - mv $(go env GOPATH)/bin/mockery-fork $(go env GOPATH)/bin/mockery -fi - popd diff --git a/datacatalog/pkg/manager/interfaces/artifact.go b/datacatalog/pkg/manager/interfaces/artifact.go index e5684a510a..99730b3462 100644 --- a/datacatalog/pkg/manager/interfaces/artifact.go +++ b/datacatalog/pkg/manager/interfaces/artifact.go @@ -6,7 +6,7 @@ import ( idl_datacatalog "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/datacatalog" ) -//go:generate mockery-v2 --name=ArtifactManager --output=../mocks --case=underscore --with-expecter +//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 76cea149ea..4b475a80a1 100644 --- a/datacatalog/pkg/repositories/interfaces/artifact_repo.go +++ b/datacatalog/pkg/repositories/interfaces/artifact_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery-v2 --name=ArtifactRepo --output=../mocks --case=underscore --with-expecter +//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 b26f33de60..d4eac476dc 100644 --- a/datacatalog/pkg/repositories/interfaces/dataset_repo.go +++ b/datacatalog/pkg/repositories/interfaces/dataset_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery-v2 --name=DatasetRepo --output=../mocks --case=underscore --with-expecter +//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 d06506ab6f..8271417c59 100644 --- a/datacatalog/pkg/repositories/interfaces/partition_repo.go +++ b/datacatalog/pkg/repositories/interfaces/partition_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery-v2 --name=PartitionRepo --output=../mocks --case=underscore --with-expecter +//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 e5bb5e2f3c..376be32e08 100644 --- a/datacatalog/pkg/repositories/interfaces/reservation_repo.go +++ b/datacatalog/pkg/repositories/interfaces/reservation_repo.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery-v2 --name=ReservationRepo --output=../mocks --case=underscore --with-expecter +//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 78b5f619ad..bc077b561f 100644 --- a/datacatalog/pkg/repositories/interfaces/tag_repo.go +++ b/datacatalog/pkg/repositories/interfaces/tag_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/datacatalog/pkg/repositories/models" ) -//go:generate mockery-v2 --name=TagRepo --output=../mocks --case=underscore --with-expecter +//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 c1c8cffc17..e6fe9672f5 100644 --- a/flyteadmin/auth/interfaces/context.go +++ b/flyteadmin/auth/interfaces/context.go @@ -17,7 +17,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 1563d06985..030815ff49 100644 --- a/flyteadmin/auth/interfaces/cookie.go +++ b/flyteadmin/auth/interfaces/cookie.go @@ -9,7 +9,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery-v2 --name=CookieHandler --output=mocks/ --case=underscore --with-expecter +//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 ecb238e599..7e6653d623 100644 --- a/flyteadmin/pkg/async/cloudevent/interfaces/publisher.go +++ b/flyteadmin/pkg/async/cloudevent/interfaces/publisher.go @@ -6,7 +6,7 @@ import ( "github.com/golang/protobuf/proto" ) -//go:generate mockery-v2 --name=Publisher --output=../mocks --case=underscore --with-expecter +//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). type Publisher interface { diff --git a/flyteadmin/pkg/async/cloudevent/interfaces/sender.go b/flyteadmin/pkg/async/cloudevent/interfaces/sender.go index 14b430c76e..b65fac4827 100644 --- a/flyteadmin/pkg/async/cloudevent/interfaces/sender.go +++ b/flyteadmin/pkg/async/cloudevent/interfaces/sender.go @@ -6,7 +6,7 @@ import ( cloudevents "github.com/cloudevents/sdk-go/v2" ) -//go:generate mockery-v2 --name=Sender --output=../mocks --case=underscore --with-expecter +//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 ae1e8b4a16..1db831ee0a 100644 --- a/flyteadmin/pkg/async/events/interfaces/node_execution.go +++ b/flyteadmin/pkg/async/events/interfaces/node_execution.go @@ -4,7 +4,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=NodeExecutionEventWriter --output=../mocks --case=underscore --with-expecter +//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 fa353f09d6..eb9c8851c7 100644 --- a/flyteadmin/pkg/async/events/interfaces/workflow_execution.go +++ b/flyteadmin/pkg/async/events/interfaces/workflow_execution.go @@ -4,7 +4,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=WorkflowExecutionEventWriter --output=../mocks --case=underscore --with-expecter +//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 8259c9ae39..4cf83b7099 100644 --- a/flyteadmin/pkg/async/notifications/implementations/sendgrid_emailer.go +++ b/flyteadmin/pkg/async/notifications/implementations/sendgrid_emailer.go @@ -19,7 +19,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery-v2 --all --case=underscore --output=../mocks --case=underscore --with-expecter +//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 ad283391eb..2d67d81a65 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/emailer.go +++ b/flyteadmin/pkg/async/notifications/interfaces/emailer.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=Emailer --output=../mocks --case=underscore --with-expecter +//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 83b99f2a8c..771f4c2284 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/processor.go +++ b/flyteadmin/pkg/async/notifications/interfaces/processor.go @@ -1,6 +1,6 @@ package interfaces -//go:generate mockery-v2 --name=Processor --output=../mocks --case=underscore --with-expecter +//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 3e9b905655..310416e66a 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/publisher.go +++ b/flyteadmin/pkg/async/notifications/interfaces/publisher.go @@ -6,7 +6,7 @@ import ( "github.com/golang/protobuf/proto" ) -//go:generate mockery-v2 --name=Publisher --output=../mocks --case=underscore --with-expecter +//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 480da86143..9d22cdc345 100644 --- a/flyteadmin/pkg/async/notifications/interfaces/smtp_client.go +++ b/flyteadmin/pkg/async/notifications/interfaces/smtp_client.go @@ -8,7 +8,7 @@ import ( // This interface is introduced to allow for mocking of the smtp.Client object. -//go:generate mockery-v2 --name=SMTPClient --output=../mocks --case=underscore --with-expecter +//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 ff4cd418e6..c83fe1017e 100644 --- a/flyteadmin/pkg/async/schedule/interfaces/event_scheduler.go +++ b/flyteadmin/pkg/async/schedule/interfaces/event_scheduler.go @@ -27,7 +27,7 @@ type RemoveScheduleInput struct { ScheduleNamePrefix string } -//go:generate mockery-v2 --name=EventScheduler --output=../mocks --case=underscore --with-expecter +//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 af1524767a..f2e626fb0b 100644 --- a/flyteadmin/pkg/async/schedule/interfaces/workflow_executor.go +++ b/flyteadmin/pkg/async/schedule/interfaces/workflow_executor.go @@ -1,6 +1,6 @@ package interfaces -//go:generate mockery-v2 --name=WorkflowExecutor --output=../mocks --case=underscore --with-expecter +//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 df2f4e8750..e3ae26352a 100644 --- a/flyteadmin/pkg/clusterresource/interfaces/admin.go +++ b/flyteadmin/pkg/clusterresource/interfaces/admin.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=FlyteAdminDataProvider --output=../mocks --case=underscore --with-expecter +//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 632f0f9d6f..cc4c16b983 100644 --- a/flyteadmin/pkg/data/interfaces/remote.go +++ b/flyteadmin/pkg/data/interfaces/remote.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=RemoteURLInterface --output=../mocks --case=underscore --with-expecter +//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 2da77b71c0..1dea47bec7 100644 --- a/flyteadmin/pkg/executioncluster/interfaces/execution_target_provider.go +++ b/flyteadmin/pkg/executioncluster/interfaces/execution_target_provider.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces" ) -//go:generate mockery-v2 --all --case=underscore --output=../mocks --case=underscore --with-expecter +//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 ad7329dff8..67315199c8 100644 --- a/flyteadmin/pkg/manager/interfaces/execution.go +++ b/flyteadmin/pkg/manager/interfaces/execution.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=ExecutionInterface --output=../mocks --case=underscore --with-expecter +//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 2ad2eb4ae3..e250e11bf8 100644 --- a/flyteadmin/pkg/manager/interfaces/launch_plan.go +++ b/flyteadmin/pkg/manager/interfaces/launch_plan.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=LaunchPlanInterface --output=../mocks --case=underscore --with-expecter +//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 d1691f9192..533adf9157 100644 --- a/flyteadmin/pkg/manager/interfaces/metrics.go +++ b/flyteadmin/pkg/manager/interfaces/metrics.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=MetricsInterface --output=../mocks --case=underscore --with-expecter +//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 1cd8085484..3d70c01687 100644 --- a/flyteadmin/pkg/manager/interfaces/named_entity.go +++ b/flyteadmin/pkg/manager/interfaces/named_entity.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=NamedEntityInterface --output=../mocks --case=underscore --with-expecter +//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 1c6582633f..8b80a4341b 100644 --- a/flyteadmin/pkg/manager/interfaces/node_execution.go +++ b/flyteadmin/pkg/manager/interfaces/node_execution.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=NodeExecutionInterface --output=../mocks --case=underscore --with-expecter +//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 6a1ac4650e..a5f8596b55 100644 --- a/flyteadmin/pkg/manager/interfaces/project.go +++ b/flyteadmin/pkg/manager/interfaces/project.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=ProjectInterface --output=../mocks --case=underscore --with-expecter +//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 a8d3598f05..ed908e52a6 100644 --- a/flyteadmin/pkg/manager/interfaces/resource.go +++ b/flyteadmin/pkg/manager/interfaces/resource.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=ResourceInterface --output=../mocks --case=underscore --with-expecter +//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 df4beb5ee0..d0fb1a0936 100644 --- a/flyteadmin/pkg/manager/interfaces/signal.go +++ b/flyteadmin/pkg/manager/interfaces/signal.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=SignalInterface --output=../mocks --case=underscore --with-expecter +//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 4a975faf6a..c26667e550 100644 --- a/flyteadmin/pkg/manager/interfaces/task.go +++ b/flyteadmin/pkg/manager/interfaces/task.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=TaskInterface --output=../mocks --case=underscore --with-expecter +//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 a6145d2156..4d57d092ee 100644 --- a/flyteadmin/pkg/manager/interfaces/task_execution.go +++ b/flyteadmin/pkg/manager/interfaces/task_execution.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=TaskExecutionInterface --output=../mocks --case=underscore --with-expecter +//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 5c3955a763..a4bfb8afec 100644 --- a/flyteadmin/pkg/manager/interfaces/version.go +++ b/flyteadmin/pkg/manager/interfaces/version.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=VersionInterface --output=../mocks --case=underscore --with-expecter +//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 0a97aed820..8203089f12 100644 --- a/flyteadmin/pkg/manager/interfaces/workflow.go +++ b/flyteadmin/pkg/manager/interfaces/workflow.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate mockery-v2 --name=WorkflowInterface --output=../mocks --case=underscore --with-expecter +//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/execution_event_repo.go b/flyteadmin/pkg/repositories/interfaces/execution_event_repo.go index 73aefcf7ad..78b5a71a53 100644 --- a/flyteadmin/pkg/repositories/interfaces/execution_event_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/execution_event_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models" ) -//go:generate mockery-v2 --name=ExecutionEventRepoInterface --output=../mocks --case=underscore --with-expecter +//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/node_execution_event_repo.go b/flyteadmin/pkg/repositories/interfaces/node_execution_event_repo.go index 5e88312a58..bfbc04106c 100644 --- a/flyteadmin/pkg/repositories/interfaces/node_execution_event_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/node_execution_event_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models" ) -//go:generate mockery-v2 --name=NodeExecutionEventRepoInterface --output=../mocks --case=underscore --with-expecter +//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 b9631c4a17..d5158a3221 100644 --- a/flyteadmin/pkg/repositories/interfaces/signal_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/signal_repo.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) -//go:generate mockery-v2 --name=SignalRepoInterface --output=../mocks --case=underscore --with-expecter +//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 2df619a53a..89b755a44c 100644 --- a/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/cluster_configuration.go @@ -51,7 +51,7 @@ type Clusters struct { DefaultExecutionLabel string `json:"defaultExecutionLabel"` } -//go:generate mockery-v2 --name ClusterConfiguration --case=underscore --output=../mocks --case=underscore --with-expecter +//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 e9d778815e..3817346adb 100644 --- a/flyteadmin/pkg/runtime/interfaces/cluster_pools.go +++ b/flyteadmin/pkg/runtime/interfaces/cluster_pools.go @@ -1,6 +1,6 @@ package interfaces -//go:generate mockery-v2 --name ClusterPoolAssignmentConfiguration --output=mocks --case=underscore --with-expecter +//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 6860ccc0d0..656569593d 100644 --- a/flyteadmin/pkg/runtime/interfaces/namespace_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/namespace_configuration.go @@ -6,7 +6,7 @@ type NamespaceMappingConfig struct { TemplateData TemplateData `json:"templateData"` } -//go:generate mockery-v2 --name NamespaceMappingConfiguration --output=../mocks --case=underscore --with-expecter +//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 a5fe2631b7..b9c2940c53 100644 --- a/flyteadmin/pkg/runtime/interfaces/quality_of_service_configuration.go +++ b/flyteadmin/pkg/runtime/interfaces/quality_of_service_configuration.go @@ -8,7 +8,7 @@ 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-v2 --name QualityOfServiceConfiguration --output=mocks --case=underscore --with-expecter +//go:generate mockery --name QualityOfServiceConfiguration --output=mocks --case=underscore --with-expecter type QualityOfServiceSpec struct { QueueingBudget config.Duration `json:"queueingBudget"` diff --git a/flyteadmin/pkg/workflowengine/interfaces/builder.go b/flyteadmin/pkg/workflowengine/interfaces/builder.go index a288b20fd4..8a2d212259 100644 --- a/flyteadmin/pkg/workflowengine/interfaces/builder.go +++ b/flyteadmin/pkg/workflowengine/interfaces/builder.go @@ -5,7 +5,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --name FlyteWorkflowBuilder --output=../mocks --case=underscore --with-expecter +//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 51026af23a..917a8a2b27 100644 --- a/flyteadmin/pkg/workflowengine/interfaces/executor.go +++ b/flyteadmin/pkg/workflowengine/interfaces/executor.go @@ -10,7 +10,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --name=WorkflowExecutor --output=../mocks/ --case=underscore --with-expecter +//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 e22b140d7e..c37934af52 100644 --- a/flyteadmin/scheduler/executor/executor.go +++ b/flyteadmin/scheduler/executor/executor.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models" ) -//go:generate mockery-v2 --name Executor --output=mocks --case=underscore --with-expecter +//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 ccf23b70ce..e3f3bfcf78 100644 --- a/flyteadmin/scheduler/repositories/interfaces/schedulable_entity_repo.go +++ b/flyteadmin/scheduler/repositories/interfaces/schedulable_entity_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models" ) -//go:generate mockery-v2 --name=SchedulableEntityRepoInterface --output=../mocks --case=underscore --with-expecter +//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 99a345a913..724ce7bcf2 100644 --- a/flyteadmin/scheduler/repositories/interfaces/schedule_entities_snapshot_repo.go +++ b/flyteadmin/scheduler/repositories/interfaces/schedule_entities_snapshot_repo.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models" ) -//go:generate mockery-v2 --name=ScheduleEntitiesSnapShotRepoInterface --output=../mocks --case=underscore --with-expecter +//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 2d31d601d3..19f1bb818b 100644 --- a/flytectl/cmd/update/interfaces/updater.go +++ b/flytectl/cmd/update/interfaces/updater.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) -//go:generate mockery-v2 --name=Updater --case=underscore --with-expecter +//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 5923864430..e4bc2c503a 100644 --- a/flytectl/pkg/docker/docker.go +++ b/flytectl/pkg/docker/docker.go @@ -13,7 +13,7 @@ import ( ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 2c59468390..f6149d127d 100644 --- a/flytectl/pkg/ext/deleter.go +++ b/flytectl/pkg/ext/deleter.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 344aef96b1..338fa4f25e 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -8,7 +8,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 6cf99ddad6..9e829b278e 100644 --- a/flytectl/pkg/ext/updater.go +++ b/flytectl/pkg/ext/updater.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 74005ac55f..165de1f4f4 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -51,7 +51,7 @@ var ( arch = platformutil.Arch(runtime.GOARCH) ) -//go:generate mockery-v2 --name=GHRepoService --case=underscore --with-expecter +//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 ddf6f80873..a8eff20951 100644 --- a/flytectl/pkg/k8s/k8s.go +++ b/flytectl/pkg/k8s/k8s.go @@ -16,7 +16,7 @@ type K8s interface { CoreV1() corev1.CoreV1Interface } -//go:generate mockery-v2 --name=ContextOps --case=underscore --with-expecter +//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 70bfb7ce1d..d194b99fd6 100644 --- a/flytectl/pkg/visualize/graphvizer.go +++ b/flytectl/pkg/visualize/graphvizer.go @@ -2,7 +2,7 @@ package visualize import graphviz "github.com/awalterschulze/gographviz" -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 62164ad736..cf901bdf24 100644 --- a/flyteidl/clients/go/admin/cache/token_cache.go +++ b/flyteidl/clients/go/admin/cache/token_cache.go @@ -6,7 +6,7 @@ import ( "golang.org/x/oauth2" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 3d15025c56..c2bd88653a 100644 --- a/flyteidl/clients/go/admin/client.go +++ b/flyteidl/clients/go/admin/client.go @@ -20,7 +20,7 @@ import ( ) // IDE "Go Generate File". This will create a mocks/AdminServiceClient.go file -//go:generate mockery-v2 --dir ../../../gen/pb-go/flyteidl/service --name AdminServiceClient --output ../admin/mocks --with-expecter +//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 91f27c511f..2b54ca98ed 100644 --- a/flyteidl/clients/go/admin/token_source_provider.go +++ b/flyteidl/clients/go/admin/token_source_provider.go @@ -25,7 +25,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery-v2 --name TokenSource --with-expecter +//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 1ff630c356..c9ce685cf5 100644 --- a/flyteplugins/go/tasks/pluginmachinery/catalog/client.go +++ b/flyteplugins/go/tasks/pluginmachinery/catalog/client.go @@ -13,7 +13,7 @@ import ( "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 cfa05df447..eb60183b04 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/exec_context.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/exec_context.go @@ -9,7 +9,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 f50753c91b..83d8c4a1f7 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/exec_metadata.go @@ -8,7 +8,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 b51ee5766b..02823c8b09 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/plugin.go @@ -8,7 +8,7 @@ import ( "k8s.io/utils/strings/slices" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 9db65e7a93..9bc7c5c164 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/secret_manager.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/secret_manager.go @@ -2,7 +2,7 @@ package core import "context" -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 8664b32c01..956848ed7a 100644 --- a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/cache.go +++ b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/cache.go @@ -16,7 +16,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 545dfbb43a..0a8e5231f6 100644 --- a/flyteplugins/go/tasks/pluginmachinery/io/iface.go +++ b/flyteplugins/go/tasks/pluginmachinery/io/iface.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 d5cfdcdf6a..847911976b 100644 --- a/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go @@ -10,7 +10,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 a1dc4deae9..0393d2dd7b 100644 --- a/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/webapi/plugin.go @@ -16,7 +16,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 f769fb31ce..b7da8ba0fb 100644 --- a/flyteplugins/go/tasks/pluginmachinery/workqueue/queue.go +++ b/flyteplugins/go/tasks/pluginmachinery/workqueue/queue.go @@ -15,7 +15,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 1e9e97db8e..d46e5fe9bb 100644 --- a/flyteplugins/go/tasks/plugins/array/awsbatch/client.go +++ b/flyteplugins/go/tasks/plugins/array/awsbatch/client.go @@ -19,7 +19,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/utils" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 bd445b1de2..ca31e471e9 100644 --- a/flyteplugins/go/tasks/plugins/array/core/state.go +++ b/flyteplugins/go/tasks/plugins/array/core/state.go @@ -17,7 +17,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//go:generate mockery --all --case=underscore --with-expecter //go:generate enumer -type=Phase type Phase uint8 diff --git a/flyteplugins/go/tasks/plugins/hive/client/qubole_client.go b/flyteplugins/go/tasks/plugins/hive/client/qubole_client.go index ff1fcaeb8a..6e96258131 100644 --- a/flyteplugins/go/tasks/plugins/hive/client/qubole_client.go +++ b/flyteplugins/go/tasks/plugins/hive/client/qubole_client.go @@ -66,7 +66,7 @@ type RequestBody struct { Files string `json:"files,omitempty"` } -//go:generate mockery-v2 --all --case=snake --with-expecter +//go:generate mockery --all --case=snake --with-expecter // Interface to interact with QuboleClient for hive tasks type QuboleClient interface { diff --git a/flyteplugins/go/tasks/plugins/presto/client/presto_client.go b/flyteplugins/go/tasks/plugins/presto/client/presto_client.go index b1158fdacc..a1a6c9dff5 100644 --- a/flyteplugins/go/tasks/plugins/presto/client/presto_client.go +++ b/flyteplugins/go/tasks/plugins/presto/client/presto_client.go @@ -17,7 +17,7 @@ type PrestoExecuteResponse struct { NextURI string `json:"nextUri,omitempty"` } -//go:generate mockery-v2 --all --case=snake --with-expecter +//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 4a90673856..0b5985d2d0 100644 --- a/flytepropeller/events/node_event_recorder.go +++ b/flytepropeller/events/node_event_recorder.go @@ -16,7 +16,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --output=mocks --case=underscore --with-expecter +//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 4dcbf5ad91..9e1e24894a 100644 --- a/flytepropeller/events/task_event_recorder.go +++ b/flytepropeller/events/task_event_recorder.go @@ -16,7 +16,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --output=mocks --case=underscore --with-expecter +//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 3349b36647..e0cf8450e2 100644 --- a/flytepropeller/events/workflow_event_recorder.go +++ b/flytepropeller/events/workflow_event_recorder.go @@ -16,7 +16,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --output=mocks --case=underscore --with-expecter +//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 57fcc05e01..97bc533def 100644 --- a/flytepropeller/manager/shardstrategy/shard_strategy.go +++ b/flytepropeller/manager/shardstrategy/shard_strategy.go @@ -13,7 +13,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --name ShardStrategy --case=underscore --with-expecter +//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 1d4dd8c746..1f3c2fb0c8 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go @@ -19,7 +19,7 @@ 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-v2 --all --with-expecter +//go:generate mockery --all --with-expecter type CustomState map[string]interface{} type WorkflowID = string diff --git a/flytepropeller/pkg/compiler/common/builder.go b/flytepropeller/pkg/compiler/common/builder.go index 6029a8a91a..9b1fb1c2ab 100644 --- a/flytepropeller/pkg/compiler/common/builder.go +++ b/flytepropeller/pkg/compiler/common/builder.go @@ -19,7 +19,7 @@ const ( EdgeDirectionUpstream ) -//go:generate mockery-v2 --all --output=mocks --case=underscore --with-expecter +//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 5d9784f755..09b3ed281c 100644 --- a/flytepropeller/pkg/controller/executors/dag_structure.go +++ b/flytepropeller/pkg/controller/executors/dag_structure.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --name DAGStructure --name DAGStructureWithStartNode --case=underscore --with-expecter +//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 904f304ea7..4a7cc11b5d 100644 --- a/flytepropeller/pkg/controller/executors/execution_context.go +++ b/flytepropeller/pkg/controller/executors/execution_context.go @@ -4,7 +4,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 01483c65e7..b1cb396aba 100644 --- a/flytepropeller/pkg/controller/executors/kube.go +++ b/flytepropeller/pkg/controller/executors/kube.go @@ -13,7 +13,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery-v2 --name Client --case=underscore --with-expecter +//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 11e0d26f6d..4ac5e1ff98 100644 --- a/flytepropeller/pkg/controller/executors/node_lookup.go +++ b/flytepropeller/pkg/controller/executors/node_lookup.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --name NodeLookup --case=underscore --with-expecter +//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 d5afb1fc7b..98c5c35413 100644 --- a/flytepropeller/pkg/controller/executors/workflow.go +++ b/flytepropeller/pkg/controller/executors/workflow.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --name Workflow --case=underscore --with-expecter +//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 576d9736c4..eb7120cd6d 100644 --- a/flytepropeller/pkg/controller/interfaces/rate_limiter.go +++ b/flytepropeller/pkg/controller/interfaces/rate_limiter.go @@ -7,8 +7,8 @@ import ( "golang.org/x/time/rate" ) -//go:generate mockery-v2 --name Limiter --output ../mocks --case=snake --with-expecter -//go:generate mockery-v2 --name Reservation --output ../mocks --case=snake --with-expecter +//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/handler.go b/flytepropeller/pkg/controller/nodes/array/handler.go index 496efd280a..830a30cc57 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler.go +++ b/flytepropeller/pkg/controller/nodes/array/handler.go @@ -48,7 +48,7 @@ var ( } ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 8e4f1d4b8f..20e74b1231 100644 --- a/flytepropeller/pkg/controller/nodes/dynamic/handler.go +++ b/flytepropeller/pkg/controller/nodes/dynamic/handler.go @@ -22,7 +22,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 bced9cf47a..1e4c5cd105 100644 --- a/flytepropeller/pkg/controller/nodes/gate/handler.go +++ b/flytepropeller/pkg/controller/nodes/gate/handler.go @@ -18,7 +18,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 ea42a95791..d291ca38dc 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/handler.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/handler.go @@ -9,7 +9,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 70659d0a5f..ede1e025d9 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/handler_factory.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/handler_factory.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --name HandlerFactory --case=underscore --with-expecter +//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 50ca59714e..5904dd28f8 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/node.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/node.go @@ -9,7 +9,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 c549e1608d..76ff9cc6bc 100644 --- a/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go +++ b/flytepropeller/pkg/controller/nodes/interfaces/node_exec_context.go @@ -15,7 +15,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/storage" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 1416be4b82..d88ed7c410 100644 --- a/flytepropeller/pkg/controller/nodes/output_resolver.go +++ b/flytepropeller/pkg/controller/nodes/output_resolver.go @@ -14,7 +14,7 @@ import ( type VarName = string -//go:generate mockery-v2 --name=OutputResolver --case=underscore --with-expecter +//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 8125ab1421..129c63122b 100644 --- a/flytepropeller/pkg/controller/nodes/recovery/client.go +++ b/flytepropeller/pkg/controller/nodes/recovery/client.go @@ -8,7 +8,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) -//go:generate mockery-v2 --name Client --output=mocks --case=underscore --with-expecter +//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 70d4022d44..4709bbdc66 100644 --- a/flytepropeller/pkg/controller/nodes/subworkflow/launchplan/launchplan.go +++ b/flytepropeller/pkg/controller/nodes/subworkflow/launchplan/launchplan.go @@ -8,7 +8,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 443c387e93..f9fbf0f9d6 100644 --- a/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_client.go +++ b/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_client.go @@ -9,7 +9,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery-v2 --name RedisClient --case=underscore --with-expecter +//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 29e894bbf9..6ea5a1deb7 100644 --- a/flytepropeller/pkg/controller/workflowstore/iface.go +++ b/flytepropeller/pkg/controller/workflowstore/iface.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) -//go:generate mockery-v2 --all --with-expecter +//go:generate mockery --all --with-expecter type PriorityClass int diff --git a/flytepropeller/pkg/webhook/global_secrets.go b/flytepropeller/pkg/webhook/global_secrets.go index 7598f95b88..6d5e6ffce3 100644 --- a/flytepropeller/pkg/webhook/global_secrets.go +++ b/flytepropeller/pkg/webhook/global_secrets.go @@ -12,7 +12,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 df1e337d74..91d9e9d259 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -13,7 +13,7 @@ const ( ErrNotFound errors.ErrorCode = "NOT_FOUND" ) -//go:generate mockery-v2 --all --with-expecter +//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 8c36538242..42b0cfdf4e 100644 --- a/flytestdlib/fastcheck/iface.go +++ b/flytestdlib/fastcheck/iface.go @@ -14,7 +14,7 @@ import ( // resolution // The Data-structure is thread-safe and can be accessed by multiple threads concurrently. -//go:generate mockery-v2 --name Filter --case=underscore --with-expecter +//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 ea18780782..2b0182a31e 100644 --- a/flytestdlib/random/weighted_random_list.go +++ b/flytestdlib/random/weighted_random_list.go @@ -10,7 +10,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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 3f2b29aceb..92066272c5 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -105,7 +105,7 @@ type SignedURLResponse struct { RequiredRequestHeaders map[string]string } -//go:generate mockery-v2 --name RawStore --case=underscore --with-expecter +//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 +134,7 @@ type RawStore interface { Delete(ctx context.Context, reference DataReference) error } -//go:generate mockery-v2 --name ReferenceConstructor --case=underscore --with-expecter +//go:generate mockery --name ReferenceConstructor --case=underscore --with-expecter // ReferenceConstructor defines an interface for building data reference paths. type ReferenceConstructor interface { @@ -154,7 +154,7 @@ type ProtobufStore interface { WriteProtobuf(ctx context.Context, reference DataReference, opts Options, msg proto.Message) error } -//go:generate mockery-v2 --name ComposedProtobufStore --case=underscore --with-expecter +//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 ebe82c568e..dcda278ccb 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -12,7 +12,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -//go:generate mockery-v2 --all --case=underscore --with-expecter +//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.