Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to go 1.23 #6249

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Upgrade to go 1.23 #6249

wants to merge 2 commits into from

Conversation

Sovietaced
Copy link
Contributor

@Sovietaced Sovietaced commented Feb 15, 2025

Why are the changes needed?

Keeping Go up to date is beneficial since new versions have improvements for common source of bugs/issues as well as performance improvements and new features.

This change will also allow us to move to go 1.24 when that it deemed stable enough.

What changes were proposed in this pull request?

  • Updates mockery to a version that supports go 1.23 and the new alias type. The introduces some diffs in the generated code.
  • Updates pflag generator to handle new alias type (this required upgrading golang.org/x/tools)

How was this patch tested?

Unit tests

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Summary by Bito

This PR upgrades the Go version from 1.22 to 1.23 across all Flyte components and their dependencies. The changes include updating base Docker images, upgrading mockery to v2.52.1 to support Go 1.23's new alias type feature, and updating various core Go dependencies. All mock files have been regenerated with the new mockery version, resulting in updated function signatures and improved compatibility.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 5

@flyte-bot
Copy link
Collaborator

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

Copy link

codecov bot commented Feb 15, 2025

Codecov Report

Attention: Patch coverage is 4.80769% with 198 lines in your changes missing coverage. Please review.

Project coverage is 33.80%. Comparing base (37386ba) to head (3305736).

Files with missing lines Patch % Lines
flytestdlib/cli/pflags/api/generator.go 10.00% 80 Missing and 1 partial ⚠️
...yteworkflow/v1alpha1/mocks/ExecutableNodeStatus.go 0.00% 15 Missing ⚠️
.../flyteworkflow/v1alpha1/mocks/MutableNodeStatus.go 0.00% 14 Missing ⚠️
...eworkflow/v1alpha1/mocks/MutableArrayNodeStatus.go 0.00% 8 Missing ⚠️
...teworkflow/v1alpha1/mocks/MutableTaskNodeStatus.go 0.00% 8 Missing ⚠️
...yteadmin/auth/interfaces/mocks/o_auth2_provider.go 0.00% 7 Missing ⚠️
...orkflow/v1alpha1/mocks/ExecutableWorkflowStatus.go 0.00% 5 Missing ⚠️
...ropeller/pkg/compiler/common/mocks/node_builder.go 0.00% 5 Missing ⚠️
...yteidl/clients/go/admin/cache/mocks/token_cache.go 0.00% 4 Missing ⚠️
...orkflow/v1alpha1/mocks/MutableDynamicNodeStatus.go 0.00% 4 Missing ⚠️
... and 36 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6249      +/-   ##
==========================================
- Coverage   33.82%   33.80%   -0.03%     
==========================================
  Files        1329     1329              
  Lines      147808   147894      +86     
==========================================
- Hits        49999    49997       -2     
- Misses      92967    93054      +87     
- Partials     4842     4843       +1     
Flag Coverage Δ
unittests-datacatalog 48.01% <ø> (ø)
unittests-flyteadmin 50.09% <0.00%> (-0.03%) ⬇️
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 58.09% <ø> (ø)
unittests-flyteidl 6.78% <0.00%> (ø)
unittests-flyteplugins 49.01% <0.00%> (ø)
unittests-flytepropeller 36.52% <0.00%> (ø)
unittests-flytestdlib 49.79% <10.75%> (-0.59%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sovietaced Sovietaced force-pushed the go-1.23 branch 2 times, most recently from 429e8a1 to 72b75ca Compare February 15, 2025 07:53
@flyte-bot
Copy link
Collaborator

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

@eapolinario
Copy link
Contributor

A little gift to help with this: our fork of mockery has just been removed.

@Sovietaced
Copy link
Contributor Author

A little gift to help with this: our fork of mockery has just been removed.

Much appreciated thank you

@flyte-bot
Copy link
Collaborator

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

@flyte-bot
Copy link
Collaborator

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

Signed-off-by: Jason Parraga <[email protected]>
@Sovietaced Sovietaced added the changed For changes in existing functionality label Feb 28, 2025
@Sovietaced Sovietaced marked this pull request as ready for review February 28, 2025 06:06
Signed-off-by: Jason Parraga <[email protected]>
@flyte-bot
Copy link
Collaborator

flyte-bot commented Feb 28, 2025

Code Review Agent Run #6f4da4

Actionable Suggestions - 9
  • flyteadmin/auth/interfaces/mocks/handler_registerer.go - 1
    • Consider mock testing pattern consistency · Line 54-54
  • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/future.go - 1
    • Consider using Call.Return for mock expectations · Line 142-142
  • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableNodeStatus.go - 2
  • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNodeStatus.go - 1
  • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableWorkflowNodeStatus.go - 1
    • Mock expectation pattern could be improved · Line 224-224
  • boilerplate/flyte/golang_support_tools/go.mod - 1
    • Consider using specific Go version · Line 3-3
  • flyteidl/clients/go/admin/mocks/UnsafeAsyncAgentServiceServer.go - 1
    • Consider using Call.Return for mock setup · Line 48-48
  • docker/sandbox-bundled/bootstrap/go.mod - 1
    • Consider using officially released Go version · Line 3-3
Additional Suggestions - 10
  • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableNodeStatus.go - 1
    • Consider using Call.Return for mock setup · Line 89-89
  • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableTaskNodeStatus.go - 2
  • flyteadmin/pkg/async/schedule/mocks/workflow_executor.go - 1
    • Consider using Call.Return for mock expectations · Line 48-48
  • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableArrayNodeStatus.go - 1
    • Consider using Call.Return for mock expectations · Line 628-628
  • flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncServer.go - 1
    • Consider using Call.Return for mock testing · Line 391-391
  • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/ready_handler.go - 1
    • Consider using Call.Return for mock setup · Line 56-56
  • flyteadmin/auth/interfaces/mocks/o_auth2_provider.go - 1
    • Consider using Call.Return for mock testing · Line 654-654
  • flytestdlib/cli/pflags/api/generator.go - 2
    • Consider standardizing JSON method naming convention · Line 280-286
    • Consider standardizing JSON method naming · Line 285-286
Review Details
  • Files reviewed - 294 · Commit Range: 2291526..3305736
    • Dockerfile
    • Dockerfile.datacatalog
    • Dockerfile.flyteadmin
    • Dockerfile.flytecopilot
    • Dockerfile.flytepropeller
    • Dockerfile.flytescheduler
    • boilerplate/flyte/golang_support_tools/go.mod
    • boilerplate/flyte/golang_support_tools/go.sum
    • boilerplate/flyte/golang_test_targets/download_tooling.sh
    • datacatalog/go.mod
    • datacatalog/go.sum
    • datacatalog/pkg/manager/mocks/artifact_manager.go
    • datacatalog/pkg/repositories/mocks/artifact_repo.go
    • datacatalog/pkg/repositories/mocks/dataset_repo.go
    • datacatalog/pkg/repositories/mocks/partition_repo.go
    • datacatalog/pkg/repositories/mocks/reservation_repo.go
    • datacatalog/pkg/repositories/mocks/tag_repo.go
    • docker/sandbox-bundled/Dockerfile
    • docker/sandbox-bundled/bootstrap/go.mod
    • flyteadmin/auth/interfaces/mocks/authentication_context.go
    • flyteadmin/auth/interfaces/mocks/cookie_handler.go
    • flyteadmin/auth/interfaces/mocks/handler_registerer.go
    • flyteadmin/auth/interfaces/mocks/identity_context.go
    • flyteadmin/auth/interfaces/mocks/o_auth2_provider.go
    • flyteadmin/auth/interfaces/mocks/o_auth2_resource_server.go
    • flyteadmin/go.mod
    • flyteadmin/go.sum
    • flyteadmin/pkg/async/cloudevent/mocks/publisher.go
    • flyteadmin/pkg/async/cloudevent/mocks/sender.go
    • flyteadmin/pkg/async/events/mocks/node_execution_event_writer.go
    • flyteadmin/pkg/async/events/mocks/workflow_execution_event_writer.go
    • flyteadmin/pkg/async/notifications/mocks/emailer.go
    • flyteadmin/pkg/async/notifications/mocks/processor.go
    • flyteadmin/pkg/async/notifications/mocks/publisher.go
    • flyteadmin/pkg/async/notifications/mocks/sendgrid_client.go
    • flyteadmin/pkg/async/notifications/mocks/smtp_client.go
    • flyteadmin/pkg/async/schedule/mocks/event_scheduler.go
    • flyteadmin/pkg/async/schedule/mocks/workflow_executor.go
    • flyteadmin/pkg/clusterresource/mocks/flyte_admin_data_provider.go
    • flyteadmin/pkg/data/mocks/remote_url_interface.go
    • flyteadmin/pkg/executioncluster/mocks/cluster_interface.go
    • flyteadmin/pkg/executioncluster/mocks/execution_target_provider.go
    • flyteadmin/pkg/executioncluster/mocks/get_target_interface.go
    • flyteadmin/pkg/executioncluster/mocks/list_targets_interface.go
    • flyteadmin/pkg/manager/mocks/execution_interface.go
    • flyteadmin/pkg/manager/mocks/launch_plan_interface.go
    • flyteadmin/pkg/manager/mocks/metrics_interface.go
    • flyteadmin/pkg/manager/mocks/named_entity_interface.go
    • flyteadmin/pkg/manager/mocks/node_execution_interface.go
    • flyteadmin/pkg/manager/mocks/project_interface.go
    • flyteadmin/pkg/manager/mocks/resource_interface.go
    • flyteadmin/pkg/manager/mocks/signal_interface.go
    • flyteadmin/pkg/manager/mocks/task_execution_interface.go
    • flyteadmin/pkg/manager/mocks/task_interface.go
    • flyteadmin/pkg/manager/mocks/version_interface.go
    • flyteadmin/pkg/manager/mocks/workflow_interface.go
    • flyteadmin/pkg/repositories/mocks/execution_event_repo_interface.go
    • flyteadmin/pkg/repositories/mocks/node_execution_event_repo_interface.go
    • flyteadmin/pkg/repositories/mocks/signal_repo_interface.go
    • flyteadmin/pkg/runtime/interfaces/mocks/cluster_pool_assignment_configuration.go
    • flyteadmin/pkg/runtime/interfaces/mocks/quality_of_service_configuration.go
    • flyteadmin/pkg/runtime/mocks/cluster_configuration.go
    • flyteadmin/pkg/runtime/mocks/namespace_mapping_configuration.go
    • flyteadmin/pkg/workflowengine/mocks/flyte_workflow_builder.go
    • flyteadmin/pkg/workflowengine/mocks/workflow_executor.go
    • flyteadmin/scheduler/executor/mocks/executor.go
    • flyteadmin/scheduler/repositories/mocks/schedulable_entity_repo_interface.go
    • flyteadmin/scheduler/repositories/mocks/schedule_entities_snap_shot_repo_interface.go
    • flytecopilot/go.mod
    • flytecopilot/go.sum
    • flytectl/cmd/update/interfaces/mocks/updater.go
    • flytectl/go.mod
    • flytectl/go.sum
    • flytectl/pkg/docker/mocks/docker.go
    • flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go
    • flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go
    • flytectl/pkg/ext/mocks/admin_updater_ext_interface.go
    • flytectl/pkg/github/mocks/gh_repo_service.go
    • flytectl/pkg/k8s/mocks/context_ops.go
    • flytectl/pkg/visualize/mocks/graphvizer.go
    • flyteidl/clients/go/admin/cache/mocks/token_cache.go
    • flyteidl/clients/go/admin/mocks/AdminServiceClient.go
    • flyteidl/clients/go/admin/mocks/AdminServiceServer.go
    • flyteidl/clients/go/admin/mocks/AgentMetadataServiceClient.go
    • flyteidl/clients/go/admin/mocks/AgentMetadataServiceServer.go
    • flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go
    • flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go
    • flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsClient.go
    • flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsServer.go
    • flyteidl/clients/go/admin/mocks/AuthMetadataServiceClient.go
    • flyteidl/clients/go/admin/mocks/AuthMetadataServiceServer.go
    • flyteidl/clients/go/admin/mocks/DataProxyServiceClient.go
    • flyteidl/clients/go/admin/mocks/DataProxyServiceServer.go
    • flyteidl/clients/go/admin/mocks/ExternalPluginServiceClient.go
    • flyteidl/clients/go/admin/mocks/ExternalPluginServiceServer.go
    • flyteidl/clients/go/admin/mocks/IdentityServiceClient.go
    • flyteidl/clients/go/admin/mocks/IdentityServiceServer.go
    • flyteidl/clients/go/admin/mocks/SignalServiceClient.go
    • flyteidl/clients/go/admin/mocks/SignalServiceServer.go
    • flyteidl/clients/go/admin/mocks/SyncAgentServiceClient.go
    • flyteidl/clients/go/admin/mocks/SyncAgentServiceServer.go
    • flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncClient.go
    • flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncServer.go
    • flyteidl/clients/go/admin/mocks/TokenSource.go
    • flyteidl/clients/go/admin/mocks/UnsafeAdminServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeAgentMetadataServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeAsyncAgentServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeAuthMetadataServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeDataProxyServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeExternalPluginServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeIdentityServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeSignalServiceServer.go
    • flyteidl/clients/go/admin/mocks/UnsafeSyncAgentServiceServer.go
    • flyteidl/clients/go/admin/mocks/isCreateDownloadLinkRequest_Source.go
    • flyteidl/clients/go/admin/mocks/isGetDataResponse_Data.go
    • flyteidl/clients/go/cacheservice/mocks/CacheServiceClient.go
    • flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go
    • flyteidl/go.mod
    • flyteidl/go.sum
    • flyteplugins/go.mod
    • flyteplugins/go.sum
    • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/async_client.go
    • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/client.go
    • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/download_future.go
    • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/download_response.go
    • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/future.go
    • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/ready_handler.go
    • flyteplugins/go/tasks/pluginmachinery/catalog/mocks/upload_future.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/enqueue_owner.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/events_recorder.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/kube_client.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/plugin.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/plugin_loader.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/plugin_state_reader.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/plugin_state_writer.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/resource_manager.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/resource_registrar.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/secret_manager.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/setup_context.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/signal_async.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/task_execution_context.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/task_execution_id.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/task_execution_metadata.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/task_overrides.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/task_reader.go
    • flyteplugins/go/tasks/pluginmachinery/core/mocks/task_template_path.go
    • flyteplugins/go/tasks/pluginmachinery/internal/webapi/mocks/client.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/checkpoint_paths.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/error_reader.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/input_file_paths.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/input_reader.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/output_file_paths.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/output_reader.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/output_writer.go
    • flyteplugins/go/tasks/pluginmachinery/io/mocks/raw_output_paths.go
    • flyteplugins/go/tasks/pluginmachinery/k8s/mocks/plugin.go
    • flyteplugins/go/tasks/pluginmachinery/k8s/mocks/plugin_abort_override.go
    • flyteplugins/go/tasks/pluginmachinery/k8s/mocks/plugin_context.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/async_plugin.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/delete_context.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/get_context.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/plugin_loader.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/plugin_setup_context.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/status_context.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/sync_plugin.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/task_execution_context.go
    • flyteplugins/go/tasks/pluginmachinery/webapi/mocks/task_execution_context_reader.go
    • flyteplugins/go/tasks/pluginmachinery/workqueue/mocks/indexed_work_queue.go
    • flyteplugins/go/tasks/pluginmachinery/workqueue/mocks/processor.go
    • flyteplugins/go/tasks/pluginmachinery/workqueue/mocks/work_item.go
    • flyteplugins/go/tasks/pluginmachinery/workqueue/mocks/work_item_info.go
    • flyteplugins/go/tasks/plugins/array/awsbatch/mocks/batch_service_client.go
    • flyteplugins/go/tasks/plugins/array/awsbatch/mocks/cache.go
    • flyteplugins/go/tasks/plugins/array/awsbatch/mocks/cache_key.go
    • flyteplugins/go/tasks/plugins/array/awsbatch/mocks/client.go
    • flyteplugins/go/tasks/plugins/hive/client/mocks/qubole_client.go
    • flyteplugins/go/tasks/plugins/presto/client/mocks/presto_client.go
    • flytepropeller/events/mocks/event_recorder.go
    • flytepropeller/events/mocks/event_sink.go
    • flytepropeller/events/mocks/node_event_recorder.go
    • flytepropeller/events/mocks/task_event_recorder.go
    • flytepropeller/events/mocks/workflow_event_recorder.go
    • flytepropeller/events/mocks/writer.go
    • flytepropeller/go.mod
    • flytepropeller/go.sum
    • flytepropeller/manager/shardstrategy/mocks/shard_strategy.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/BaseNode.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/BaseWorkflow.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/BaseWorkflowWithStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/EnqueueWorkflow.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableArrayNode.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableArrayNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableBranchNode.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableBranchNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableDynamicNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableGateNode.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableGateNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableIfBlock.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNode.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableSubWorkflow.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableSubWorkflowNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableTask.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableTaskNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflowNode.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflowNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflowStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutionTimeInfo.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/Meta.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/Mutable.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableArrayNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableBranchNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableDynamicNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableGateNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableSubWorkflowNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableTaskNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MutableWorkflowNodeStatus.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/NodeGetter.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/NodeStatusGetter.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/NodeStatusVisitor.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/SubWorkflowGetter.go
    • flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/TaskDetailsGetter.go
    • flytepropeller/pkg/compiler/common/mocks/interface_provider.go
    • flytepropeller/pkg/compiler/common/mocks/node.go
    • flytepropeller/pkg/compiler/common/mocks/node_builder.go
    • flytepropeller/pkg/compiler/common/mocks/task.go
    • flytepropeller/pkg/compiler/common/mocks/workflow.go
    • flytepropeller/pkg/compiler/common/mocks/workflow_builder.go
    • flytepropeller/pkg/controller/executors/mocks/client.go
    • flytepropeller/pkg/controller/executors/mocks/control_flow.go
    • flytepropeller/pkg/controller/executors/mocks/dag_structure.go
    • flytepropeller/pkg/controller/executors/mocks/dag_structure_with_start_node.go
    • flytepropeller/pkg/controller/executors/mocks/execution_context.go
    • flytepropeller/pkg/controller/executors/mocks/immutable_execution_context.go
    • flytepropeller/pkg/controller/executors/mocks/immutable_parent_info.go
    • flytepropeller/pkg/controller/executors/mocks/node_lookup.go
    • flytepropeller/pkg/controller/executors/mocks/parent_info_getter.go
    • flytepropeller/pkg/controller/executors/mocks/sub_workflow_getter.go
    • flytepropeller/pkg/controller/executors/mocks/task_details_getter.go
    • flytepropeller/pkg/controller/executors/mocks/workflow.go
    • flytepropeller/pkg/controller/mocks/limiter.go
    • flytepropeller/pkg/controller/mocks/reservation.go
    • flytepropeller/pkg/controller/nodes/array/mocks/array_event_recorder.go
    • flytepropeller/pkg/controller/nodes/dynamic/mocks/task_node_handler.go
    • flytepropeller/pkg/controller/nodes/gate/mocks/signal_service_client.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/cacheable_node_handler.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/event_recorder.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/handler_factory.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node_execution_context.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node_execution_context_builder.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node_execution_metadata.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node_executor.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node_handler.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node_state_reader.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/node_state_writer.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/setup_context.go
    • flytepropeller/pkg/controller/nodes/interfaces/mocks/task_reader.go
    • flytepropeller/pkg/controller/nodes/mocks/output_resolver.go
    • flytepropeller/pkg/controller/nodes/recovery/mocks/client.go
    • flytepropeller/pkg/controller/nodes/subworkflow/launchplan/mocks/executor.go
    • flytepropeller/pkg/controller/nodes/subworkflow/launchplan/mocks/flyte_admin.go
    • flytepropeller/pkg/controller/nodes/subworkflow/launchplan/mocks/reader.go
    • flytepropeller/pkg/controller/nodes/task/resourcemanager/mocks/redis_client.go
    • flytepropeller/pkg/controller/workflowstore/mocks/FlyteWorkflow.go
    • flytepropeller/pkg/webhook/mocks/global_secret_provider.go
    • flytepropeller/pkg/webhook/mocks/mutator.go
    • flytepropeller/pkg/webhook/mocks/secrets_injector.go
    • flytestdlib/cache/mocks/AutoRefresh.go
    • flytestdlib/cache/mocks/CreateBatchesFunc.go
    • flytestdlib/cache/mocks/Item.go
    • flytestdlib/cache/mocks/ItemWrapper.go
    • flytestdlib/cache/mocks/Option.go
    • flytestdlib/cache/mocks/SyncFunc.go
    • flytestdlib/cli/pflags/api/generator.go
    • flytestdlib/cli/pflags/api/utils.go
    • flytestdlib/fastcheck/mocks/filter.go
    • flytestdlib/go.mod
    • flytestdlib/go.sum
    • flytestdlib/random/mocks/comparable.go
    • flytestdlib/random/mocks/weighted_random_list.go
    • flytestdlib/storage/mocks/composed_protobuf_store.go
    • flytestdlib/storage/mocks/raw_store.go
    • flytestdlib/storage/mocks/reference_constructor.go
    • flytestdlib/utils/mocks/auto_refresh_cache.go
    • flytestdlib/utils/mocks/cache_item.go
    • flytestdlib/utils/mocks/cache_sync_item.go
    • flytestdlib/utils/mocks/rate_limiter.go
    • flytestdlib/utils/mocks/sequencer.go
    • go.mod
    • go.sum
  • Files skipped - 0
  • Tools
    • Golangci-lint (Linter) - ✖︎ Failed
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Collaborator

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Feature Improvement - Go Version and Dependencies Upgrade

go.mod - Updated Go version to 1.23, removed unused dependencies, and upgraded core packages

go.sum - Updated core Go packages including x/mod, x/net, x/sync, x/sys, x/term, x/text, and x/tools to latest versions

go.mod - Updated Go version to 1.23 and upgraded core dependencies

go.sum - Updated checksums for upgraded Go dependencies

generator.go - Updated code to handle new Go 1.23 alias type support

utils.go - Modified type handling for Go 1.23 compatibility

Other Improvements - Generated Code Updates

auto_refresh_cache.go - Updated mock files with mockery v2.52.1 and simplified function calls

cache_item.go - Updated mock files with mockery v2.52.1 and simplified function signatures

cache_sync_item.go - Updated mock files with mockery v2.52.1

rate_limiter.go - Updated mock files with mockery v2.52.1

sequencer.go - Updated mock files with mockery v2.52.1 and simplified function signatures

@eapolinario
Copy link
Contributor

Can we separate the move to go 1.23 from the bump in mockery version? Since moving to this new version is non-controversial, how about we do it separately (either make the go1.23 changes happen in a stacked PR or, my preference, move to that mockery version in a separate PR and merge that sooner).

@Sovietaced
Copy link
Contributor Author

Can we separate the move to go 1.23 from the bump in mockery version? Since moving to this new version is non-controversial, how about we do it separately (either make the go1.23 changes happen in a stacked PR or, my preference, move to that mockery version in a separate PR and merge that sooner).

Sure

@Sovietaced
Copy link
Contributor Author

Sovietaced commented Mar 4, 2025

Can we separate the move to go 1.23 from the bump in mockery version? Since moving to this new version is non-controversial, how about we do it separately (either make the go1.23 changes happen in a stacked PR or, my preference, move to that mockery version in a separate PR and merge that sooner).

So I'm having trouble because it seems that the mockery libraries are tightly coupled with a very specific version of go. When I use the version of mockery that supports go 1.23 I'm running into this error like `2025/03/03 20:30:44 internal error: package "context" without types was imported from "github.com/flyteorg/flyte/flytestdlib/utils".

I even tried the earliest version that supports the go 1.23 type aliasing, v2.46.1.

ie: https://vektra.github.io/mockery/latest/notes/#internal-error-package-without-types-was-imported

@Sovietaced
Copy link
Contributor Author

So I'm having trouble because it seems that the mockery libraries are tightly coupled with a very specific version of go. When I use the version of mockery that supports go 1.23 I'm running into this error like `2025/03/03 20:30:44 internal error: package "context" without types was imported from "github.com/flyteorg/flyte/flytestdlib/utils".

I even tried the earliest version that supports the go 1.23 type aliasing, v2.46.1.

ie: https://vektra.github.io/mockery/latest/notes/#internal-error-package-without-types-was-imported

Hmm. I can't even run make generate on main so it might be a local issue :)

@Sovietaced
Copy link
Contributor Author

Sovietaced commented Mar 4, 2025

Can we separate the move to go 1.23 from the bump in mockery version? Since moving to this new version is non-controversial, how about we do it separately (either make the go1.23 changes happen in a stacked PR or, my preference, move to that mockery version in a separate PR and merge that sooner).

Alright I can't really land the mockery changes in a separate PR since newer versions of mockery require new versions of go.

~/code/flyte/flytestdlib git:[update-mockery] make generate
Makefile:19: warning: overriding commands for target `generate'
../boilerplate/flyte/golang_test_targets/Makefile:14: warning: ignoring old commands for target `generate'
Makefile:31: warning: overriding commands for target `test_unit_codecov'
../boilerplate/flyte/golang_test_targets/Makefile:55: warning: ignoring old commands for target `test_unit_codecov'
Makefile:19: warning: overriding commands for target `generate'
../boilerplate/flyte/golang_test_targets/Makefile:14: warning: ignoring old commands for target `generate'
Makefile:31: warning: overriding commands for target `test_unit_codecov'
../boilerplate/flyte/golang_test_targets/Makefile:55: warning: ignoring old commands for target `test_unit_codecov'
mkdir -p ./bin
go build -o pflags ./cli/pflags/main.go && mv ./pflags ./bin
Using temp directory /var/folders/h0/cm6xy2g1463675c79_kb76l40000gn/T/gotooling-XXX.HmChxV6PGp
/var/folders/h0/cm6xy2g1463675c79_kb76l40000gn/T/gotooling-XXX.HmChxV6PGp ~/code/flyte/flytestdlib
Installing github.com/vektra/mockery/[email protected]
go: github.com/vektra/mockery/[email protected] requires go >= 1.24; switching to go1.24.0
Installing github.com/golangci/golangci-lint/cmd/golangci-lint
/Users/jasonparraga/go/pkg/mod/github.com/fatih/[email protected]/color.go:11:2: missing go.sum entry for module providing package github.com/mattn/go-colorable (imported by github.com/fatih/color); to add:
        go get github.com/fatih/[email protected]
......

I messed around with it for a few hours and different versions of mockery all have different issues but it seems like all the issues are rooted in the fact that you use a different version of go to generate the mocks then you do to use them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changed For changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants