diff --git a/flyteadmin/auth/authzserver/initialize.go b/flyteadmin/auth/authzserver/initialize.go index 8380b9f436..ef5a0d2ad4 100644 --- a/flyteadmin/auth/authzserver/initialize.go +++ b/flyteadmin/auth/authzserver/initialize.go @@ -15,7 +15,7 @@ import ( func RegisterHandlers(handler interfaces.HandlerRegisterer, authCtx interfaces.AuthenticationContext) { // If using flyte self auth server, OAuth2Provider != nil if authCtx.OAuth2Provider() != nil { - // SetSupportedTaskType up oauthserver endpoints. You could also use gorilla/mux or any other router. + // Set up oauthserver endpoints. You could also use gorilla/mux or any other router. handler.HandleFunc(authorizeRelativeURL.String(), getAuthEndpoint(authCtx)) handler.HandleFunc(authorizeCallbackRelativeURL.String(), getAuthCallbackEndpoint(authCtx)) handler.HandleFunc(tokenRelativeURL.String(), getTokenEndpointHandler(authCtx)) diff --git a/flyteadmin/auth/identity_context.go b/flyteadmin/auth/identity_context.go index f7be038bdf..05889f7537 100644 --- a/flyteadmin/auth/identity_context.go +++ b/flyteadmin/auth/identity_context.go @@ -27,9 +27,9 @@ type IdentityContext struct { appID string authenticatedAt time.Time userInfo *service.UserInfoResponse - // SetSupportedTaskType to pointer just to keep this struct go-simple to support equal operator + // Set to pointer just to keep this struct go-simple to support equal operator scopes *sets.String - // Raw JWT token from the IDP. SetSupportedTaskType to a pointer to support the equal operator for this struct. + // Raw JWT token from the IDP. Set to a pointer to support the equal operator for this struct. claims *claimsType // executionIdentity stores a unique string that can be used to identify the user associated with a given task. // This identifier is passed down to the ExecutionSpec and can be used for various purposes, such as setting the user identifier on a pod label. diff --git a/flyteadmin/pkg/common/filters.go b/flyteadmin/pkg/common/filters.go index 44a438cd32..cf7987bdf5 100644 --- a/flyteadmin/pkg/common/filters.go +++ b/flyteadmin/pkg/common/filters.go @@ -47,7 +47,7 @@ const ( valueNotInQuery = "%s not in (?)" ) -// SetSupportedTaskType of available filters which exclusively accept a single argument value. +// Set of available filters which exclusively accept a single argument value. var singleValueFilters = map[FilterExpression]bool{ Contains: true, GreaterThan: true, @@ -58,7 +58,7 @@ var singleValueFilters = map[FilterExpression]bool{ NotEqual: true, } -// SetSupportedTaskType of available filters which exclusively accept repeated argument values. +// Set of available filters which exclusively accept repeated argument values. var repeatedValueFilters = map[FilterExpression]bool{ ValueIn: true, ValueNotIn: true, diff --git a/flyteadmin/pkg/manager/impl/execution_manager.go b/flyteadmin/pkg/manager/impl/execution_manager.go index 486cd957e6..977e1f8179 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager.go +++ b/flyteadmin/pkg/manager/impl/execution_manager.go @@ -647,7 +647,7 @@ func resolveAuthRole(request *admin.ExecutionCreateRequest, launchPlan *admin.La return &admin.AuthRole{} } - // SetSupportedTaskType role permissions based on launch plan Auth values. + // Set role permissions based on launch plan Auth values. // The branched-ness of this check is due to the presence numerous deprecated fields if launchPlan.Spec.GetAuthRole() != nil { return launchPlan.Spec.GetAuthRole() diff --git a/flyteadmin/pkg/manager/impl/execution_manager_test.go b/flyteadmin/pkg/manager/impl/execution_manager_test.go index 22340b0000..52ff607725 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager_test.go +++ b/flyteadmin/pkg/manager/impl/execution_manager_test.go @@ -1425,7 +1425,7 @@ func makeExecutionWithEnvs( } func TestRelaunchExecution(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -1487,7 +1487,7 @@ func TestRelaunchExecution(t *testing.T) { } func TestRelaunchExecution_GetExistingFailure(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) @@ -1524,7 +1524,7 @@ func TestRelaunchExecution_GetExistingFailure(t *testing.T) { } func TestRelaunchExecution_CreateFailure(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -1564,7 +1564,7 @@ func TestRelaunchExecution_CreateFailure(t *testing.T) { } func TestRelaunchExecutionInterruptibleOverride(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -1615,7 +1615,7 @@ func TestRelaunchExecutionInterruptibleOverride(t *testing.T) { } func TestRelaunchExecutionOverwriteCacheOverride(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -1738,7 +1738,7 @@ func TestRelaunchExecutionOverwriteCacheOverride(t *testing.T) { } func TestRelaunchExecutionEnvsOverride(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -1790,7 +1790,7 @@ func TestRelaunchExecutionEnvsOverride(t *testing.T) { } func TestRecoverExecution(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -1953,7 +1953,7 @@ func TestRecoverExecution_RecoveredChildNode(t *testing.T) { } func TestRecoverExecution_GetExistingFailure(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) r := plugins.NewRegistry() @@ -1989,7 +1989,7 @@ func TestRecoverExecution_GetExistingFailure(t *testing.T) { } func TestRecoverExecution_GetExistingInputsFailure(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) @@ -2027,7 +2027,7 @@ func TestRecoverExecution_GetExistingInputsFailure(t *testing.T) { } func TestRecoverExecutionInterruptibleOverride(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -2090,7 +2090,7 @@ func TestRecoverExecutionInterruptibleOverride(t *testing.T) { } func TestRecoverExecutionOverwriteCacheOverride(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -2151,7 +2151,7 @@ func TestRecoverExecutionOverwriteCacheOverride(t *testing.T) { } func TestRecoverExecutionEnvsOverride(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) mockExecutor := workflowengineMocks.WorkflowExecutor{} @@ -3896,7 +3896,7 @@ func TestCreateExecution_LegacyClient(t *testing.T) { } func TestRelaunchExecution_LegacyModel(t *testing.T) { - // SetSupportedTaskType up mocks. + // Set up mocks. repository := getMockRepositoryForExecTest() setDefaultLpCallbackForExecTest(repository) storageClient := getMockStorageForExecTest(context.Background()) diff --git a/flyteadmin/pkg/manager/impl/launch_plan_manager.go b/flyteadmin/pkg/manager/impl/launch_plan_manager.go index 4d6f047b58..57936313e5 100644 --- a/flyteadmin/pkg/manager/impl/launch_plan_manager.go +++ b/flyteadmin/pkg/manager/impl/launch_plan_manager.go @@ -278,7 +278,7 @@ func (m *LaunchPlanManager) enableLaunchPlan(ctx context.Context, request admin. logger.Debugf(ctx, "Failed to find launch plan to enable with id [%+v] and err %v", request.Id, err) return nil, err } - // SetSupportedTaskType desired launch plan version to active: + // Set desired launch plan version to active: err = m.updateLaunchPlanModelState(&newlyActiveLaunchPlanModel, admin.LaunchPlanState_ACTIVE) if err != nil { return nil, err diff --git a/flyteadmin/pkg/repositories/config/migrations.go b/flyteadmin/pkg/repositories/config/migrations.go index d7723ac48c..a2b39000d2 100644 --- a/flyteadmin/pkg/repositories/config/migrations.go +++ b/flyteadmin/pkg/repositories/config/migrations.go @@ -196,7 +196,7 @@ var LegacyMigrations = []*gormigrate.Migration{ return tx.Table("named_entity_metadata").Migrator().DropColumn(&models.NamedEntityMetadata{}, "state") }, }, - // SetSupportedTaskType default state value for workflow model + // Set default state value for workflow model { ID: "2020-04-03-named-entity-state-default", Migrate: func(tx *gorm.DB) error { diff --git a/flyteadmin/pkg/repositories/database.go b/flyteadmin/pkg/repositories/database.go index 4575df98ed..23b5aadef8 100644 --- a/flyteadmin/pkg/repositories/database.go +++ b/flyteadmin/pkg/repositories/database.go @@ -159,6 +159,6 @@ func setupDbConnectionPool(ctx context.Context, gormDb *gorm.DB, dbConfig *datab genericDb.SetConnMaxLifetime(dbConfig.ConnMaxLifeTime.Duration) genericDb.SetMaxIdleConns(dbConfig.MaxIdleConnections) genericDb.SetMaxOpenConns(dbConfig.MaxOpenConnections) - logger.Infof(ctx, "SetSupportedTaskType connection pool values to [%+v]", genericDb.Stats()) + logger.Infof(ctx, "Set connection pool values to [%+v]", genericDb.Stats()) return nil } diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 3e8a408e94..4296d28b3b 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -22,7 +22,7 @@ type Config struct { Project string `json:"project" pflag:",Specifies the project to work on."` Domain string `json:"domain" pflag:",Specifies the domain to work on."` Output string `json:"output" pflag:",Specifies the output type."` - Interactive bool `json:"interactive" pflag:",SetSupportedTaskType this to trigger bubbletea interface."` + Interactive bool `json:"interactive" pflag:",Set this to trigger bubbletea interface."` } // OutputFormat will return output format diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 67113488ed..060d22dddf 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -37,7 +37,7 @@ func createExecutionRequestForWorkflow(ctx context.Context, workflowName, projec envs := makeEnvs(executionConfig) - // SetSupportedTaskType both deprecated field and new field for security identity passing + // Set both deprecated field and new field for security identity passing var securityContext *core.SecurityContext var authRole *admin.AuthRole @@ -77,7 +77,7 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project envs := makeEnvs(executionConfig) - // SetSupportedTaskType both deprecated field and new field for security identity passing + // Set both deprecated field and new field for security identity passing var securityContext *core.SecurityContext var authRole *admin.AuthRole diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 6f47744a5d..112fa4074c 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -56,7 +56,7 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s. NOTE: dot, doturl are only supported for Workflow", printer.OutputFormats())) - rootCmd.PersistentFlags().BoolVarP(&(config.GetConfig().Interactive), "interactive", "i", false, "SetSupportedTaskType this flag to use an interactive CLI") + rootCmd.PersistentFlags().BoolVarP(&(config.GetConfig().Interactive), "interactive", "i", false, "Set this flag to use an interactive CLI") rootCmd.AddCommand(get.CreateGetCommand()) compileCmd := compile.CreateCompileCommand() diff --git a/flyteidl/clients/go/admin/auth_interceptor.go b/flyteidl/clients/go/admin/auth_interceptor.go index 871e90c3af..4cebf6440f 100644 --- a/flyteidl/clients/go/admin/auth_interceptor.go +++ b/flyteidl/clients/go/admin/auth_interceptor.go @@ -105,7 +105,7 @@ func (c *proxyAuthTransport) RoundTrip(req *http.Request) (*http.Response, error return c.transport.RoundTrip(req) } -// SetSupportedTaskType up http client used in oauth2 +// Set up http client used in oauth2 func setHTTPClientContext(ctx context.Context, cfg *Config, proxyCredentialsFuture *PerRPCCredentialsFuture) context.Context { httpClient := &http.Client{} transport := &http.Transport{} diff --git a/flyteidl/clients/go/admin/auth_interceptor_test.go b/flyteidl/clients/go/admin/auth_interceptor_test.go index aac4fbb5e0..29db878fd2 100644 --- a/flyteidl/clients/go/admin/auth_interceptor_test.go +++ b/flyteidl/clients/go/admin/auth_interceptor_test.go @@ -83,7 +83,7 @@ func (s *authMetadataServer) Start(_ context.Context) error { s.lck.Lock() defer s.lck.Unlock() - /***** SetSupportedTaskType up the server serving channelz service. *****/ + /***** Set up the server serving channelz service. *****/ lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", s.grpcPort)) if err != nil { @@ -404,7 +404,7 @@ func TestSetHTTPClientContext(t *testing.T) { t.Run("proxy url", func(t *testing.T) { cfg := &Config{ HTTPProxyURL: config. - URL{URL: url.URL{ + URL{URL: url.URL{ Scheme: "http", Host: "localhost:8080", }}, diff --git a/flyteidl/clients/go/coreutils/literals_test.go b/flyteidl/clients/go/coreutils/literals_test.go index 22ad170414..24a0af4865 100644 --- a/flyteidl/clients/go/coreutils/literals_test.go +++ b/flyteidl/clients/go/coreutils/literals_test.go @@ -692,7 +692,7 @@ func TestMakeLiteralForType(t *testing.T) { assert.Equal(t, "", l.GetScalar().GetPrimitive().GetStringValue()) }) - t.Run("Structured Data SetSupportedTaskType", func(t *testing.T) { + t.Run("Structured Data Set", func(t *testing.T) { var dataSetColumns []*core.StructuredDatasetType_DatasetColumn dataSetColumns = append(dataSetColumns, &core.StructuredDatasetType_DatasetColumn{ Name: "Price", diff --git a/flyteidl/gen/pb-go/flyteidl/service/auth.pb.go b/flyteidl/gen/pb-go/flyteidl/service/auth.pb.go index 687882a279..2f5e5fc500 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/auth.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/auth.pb.go @@ -81,7 +81,7 @@ type OAuth2MetadataResponse struct { ScopesSupported []string `protobuf:"bytes,5,rep,name=scopes_supported,json=scopesSupported,proto3" json:"scopes_supported,omitempty"` // JSON array containing a list of client authentication methods supported by this token endpoint. TokenEndpointAuthMethodsSupported []string `protobuf:"bytes,6,rep,name=token_endpoint_auth_methods_supported,json=tokenEndpointAuthMethodsSupported,proto3" json:"token_endpoint_auth_methods_supported,omitempty"` - // URL of the authorization server's JWK SetSupportedTaskType [JWK] document. The referenced document contains the signing key(s) the + // URL of the authorization server's JWK Set [JWK] document. The referenced document contains the signing key(s) the // client uses to validate signatures from the authorization server. JwksUri string `protobuf:"bytes,7,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` // JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by diff --git a/flyteplugins/go/tasks/plugins/array/catalog.go b/flyteplugins/go/tasks/plugins/array/catalog.go index 2f0d8e1fa4..d6bf5e8820 100644 --- a/flyteplugins/go/tasks/plugins/array/catalog.go +++ b/flyteplugins/go/tasks/plugins/array/catalog.go @@ -119,7 +119,7 @@ func DetermineDiscoverability(ctx context.Context, tCtx core.TaskExecutionContex // If the task is not discoverable, then skip data catalog work and move directly to launch if taskTemplate.Metadata == nil || !taskTemplate.Metadata.Discoverable { logger.Infof(ctx, "Task is not discoverable, moving to launch phase...") - // SetSupportedTaskType an all set indexes to cache. This task won't try to write to catalog anyway. + // Set an all set indexes to cache. This task won't try to write to catalog anyway. state = state.SetIndexesToCache(arrayCore.InvertBitSet(bitarray.NewBitSet(uint(arrayJobSize)), uint(arrayJobSize))) state = state.SetPhase(arrayCore.PhasePreLaunch, core.DefaultPhaseVersion).SetReason("Task is not discoverable.") diff --git a/flyteplugins/go/tasks/plugins/array/outputs.go b/flyteplugins/go/tasks/plugins/array/outputs.go index d0311bd965..cb07fb0de1 100644 --- a/flyteplugins/go/tasks/plugins/array/outputs.go +++ b/flyteplugins/go/tasks/plugins/array/outputs.go @@ -152,7 +152,7 @@ func buildFinalPhases(executedTasks bitarray.CompactArray, indexes *bitarray.Bit res.SetItem(arrayCore.CalculateOriginalIndex(i, indexes), phaseIdx) } - // SetSupportedTaskType phases os already discovered tasks to success + // Set phases os already discovered tasks to success for i := uint(0); i < totalSize; i++ { if !indexes.IsSet(i) { res.SetItem(int(i), bitarray.Item(pluginCore.PhaseSuccess)) diff --git a/flyteplugins/go/tasks/plugins/k8s/dask/dask.go b/flyteplugins/go/tasks/plugins/k8s/dask/dask.go index 6a3ea96a27..8257f00341 100644 --- a/flyteplugins/go/tasks/plugins/k8s/dask/dask.go +++ b/flyteplugins/go/tasks/plugins/k8s/dask/dask.go @@ -120,12 +120,12 @@ func createWorkerSpec(cluster plugins.DaskWorkerGroup, podSpec *v1.PodSpec, prim } primaryContainer.Name = "dask-worker" - // SetSupportedTaskType custom image if present + // Set custom image if present if cluster.GetImage() != "" { primaryContainer.Image = cluster.GetImage() } - // SetSupportedTaskType custom resources + // Set custom resources resources := &primaryContainer.Resources clusterResources := cluster.GetResources() if len(clusterResources.Requests) >= 1 || len(clusterResources.Limits) >= 1 { @@ -139,7 +139,7 @@ func createWorkerSpec(cluster plugins.DaskWorkerGroup, podSpec *v1.PodSpec, prim } primaryContainer.Resources = *resources - // SetSupportedTaskType custom args + // Set custom args workerArgs := []string{ "dask-worker", "--name", @@ -217,7 +217,7 @@ func createSchedulerSpec(scheduler plugins.DaskScheduler, clusterName string, po schedulerPodSpec.RestartPolicy = v1.RestartPolicyAlways - // SetSupportedTaskType primary container + // Set primary container err = replacePrimaryContainer(schedulerPodSpec, primaryContainerName, *primaryContainer) if err != nil { return nil, err diff --git a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go index 4fa4d632ff..6d0bad4ecd 100644 --- a/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go +++ b/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go @@ -76,7 +76,7 @@ func (pytorchOperatorResourceHandler) BuildResource(ctx context.Context, taskCtx workerReplicas := pytorchTaskExtraArgs.GetWorkers() workerReplicaSpec.Replicas = &workerReplicas - // SetSupportedTaskType elastic config + // Set elastic config elasticConfig := pytorchTaskExtraArgs.GetElasticConfig() if elasticConfig != nil { elasticPolicy = ParseElasticConfig(elasticConfig) @@ -102,7 +102,7 @@ func (pytorchOperatorResourceHandler) BuildResource(ctx context.Context, taskCtx if kfPytorchTaskExtraArgs.GetRunPolicy() != nil { runPolicy = common.ParseRunPolicy(*kfPytorchTaskExtraArgs.GetRunPolicy()) } - // SetSupportedTaskType elastic config + // Set elastic config elasticConfig := kfPytorchTaskExtraArgs.GetElasticConfig() if elasticConfig != nil { elasticPolicy = ParseElasticConfig(elasticConfig) diff --git a/flyteplugins/go/tasks/plugins/k8s/spark/spark.go b/flyteplugins/go/tasks/plugins/k8s/spark/spark.go index 5c3504c43c..22240e9e45 100644 --- a/flyteplugins/go/tasks/plugins/k8s/spark/spark.go +++ b/flyteplugins/go/tasks/plugins/k8s/spark/spark.go @@ -108,7 +108,7 @@ func getSparkConfig(taskCtx pluginsCore.TaskExecutionContext, sparkJob *plugins. } } - // SetSupportedTaskType pod limits. + // Set pod limits. if len(sparkConfig[sparkOpConfig.SparkDriverCoreLimitKey]) == 0 { // spark.kubernetes.driver.request.cores takes precedence over spark.driver.cores if len(sparkConfig[sparkOpConfig.SparkDriverCoreRequestKey]) != 0 { diff --git a/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go b/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go index 18d7633389..561901226a 100644 --- a/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go +++ b/flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go @@ -410,13 +410,13 @@ func dummySparkTaskContext(taskTemplate *core.TaskTemplate, interruptible bool) } func defaultPluginConfig() *config.K8sPluginConfig { - // SetSupportedTaskType Interruptible Config + // Set Interruptible Config runAsUser := int64(1000) dnsOptVal1 := "1" dnsOptVal2 := "1" dnsOptVal3 := "3" - // SetSupportedTaskType scheduler + // Set scheduler schedulerName := "custom-scheduler" // Node selectors @@ -541,7 +541,7 @@ func TestBuildResourceContainer(t *testing.T) { // Case1: Valid Spark Task-Template taskTemplate := dummySparkTaskTemplateContainer("blah-1", dummySparkConf) - // SetSupportedTaskType spark custom feature config. + // Set spark custom feature config. assert.NoError(t, setSparkConfig(&Config{ Features: []Feature{ { diff --git a/flytepropeller/pkg/controller/controller.go b/flytepropeller/pkg/controller/controller.go index 15477621b1..afa0c6e9ef 100644 --- a/flytepropeller/pkg/controller/controller.go +++ b/flytepropeller/pkg/controller/controller.go @@ -396,7 +396,7 @@ func New(ctx context.Context, cfg *config.Config, kubeClientset kubernetes.Inter // WE are disabling this as the metrics have high cardinality. Metrics seem to be emitted per pod and this has problems // when we create new pods - // SetSupportedTaskType Client Metrics Provider + // Set Client Metrics Provider // setClientMetricsProvider(scope.NewSubScope("k8s_client")) // obtain references to shared index informers for FlyteWorkflow. @@ -465,7 +465,7 @@ func New(ctx context.Context, cfg *config.Config, kubeClientset kubernetes.Inter } logger.Info(ctx, "Setting up event handlers") - // SetSupportedTaskType up an event handler for when FlyteWorkflow resources change + // Set up an event handler for when FlyteWorkflow resources change _, err = flyteworkflowInformer.Informer().AddEventHandler(controller.getWorkflowUpdatesHandler()) if err != nil { return nil, fmt.Errorf("failed to register event handler for FlyteWorkflow resource changes: %w", err) diff --git a/flytepropeller/pkg/controller/nodes/branch/evaluator.go b/flytepropeller/pkg/controller/nodes/branch/evaluator.go index d1bb59ce22..4bc1676745 100644 --- a/flytepropeller/pkg/controller/nodes/branch/evaluator.go +++ b/flytepropeller/pkg/controller/nodes/branch/evaluator.go @@ -84,7 +84,7 @@ func EvaluateIfBlock(block v1alpha1.ExecutableIfBlock, nodeInputs *core.LiteralM if ok, err := EvaluateBooleanExpression(block.GetCondition(), nodeInputs); err != nil { return nil, skippedNodeIds, err } else if ok { - // SetSupportedTaskType status to running + // Set status to running return block.GetThenNode(), skippedNodeIds, err } // This branch is not taken diff --git a/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_resourcemanager.go b/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_resourcemanager.go index 9ae531a559..be1373e8a4 100644 --- a/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_resourcemanager.go +++ b/flytepropeller/pkg/controller/nodes/task/resourcemanager/redis_resourcemanager.go @@ -16,7 +16,7 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) -// This is the key that will point to the Redis SetSupportedTaskType. +// This is the key that will point to the Redis Set. // https://redis.io/commands#set const RedisSetKeyPrefix = "redisresourcemanager" @@ -162,7 +162,7 @@ func NewRedisResourceManagerMetrics(scope promutils.Scope) *RedisResourceManager return &RedisResourceManagerMetrics{ Scope: scope, RedisSizeCheckTime: scope.MustNewStopWatch("size_check_time", - "The time it takes to measure the size of the Redis SetSupportedTaskType where all utilized resource are stored", time.Millisecond), + "The time it takes to measure the size of the Redis Set where all utilized resource are stored", time.Millisecond), AllocatedTokensGauge: scope.MustNewGauge("size", "The number of allocation resourceRegistryTokens currently in the Redis set"), diff --git a/flytepropeller/pkg/webhook/aws_secret_manager.go b/flytepropeller/pkg/webhook/aws_secret_manager.go index 89b307dc30..d1595ffc1e 100644 --- a/flytepropeller/pkg/webhook/aws_secret_manager.go +++ b/flytepropeller/pkg/webhook/aws_secret_manager.go @@ -93,7 +93,7 @@ func (i AWSSecretManagerInjector) Inject(ctx context.Context, secret *core.Secre // Inject AWS secret-inject webhook annotations to mount the secret in a predictable location. envVars := []corev1.EnvVar{ - // SetSupportedTaskType environment variable to let the container know where to find the mounted files. + // Set environment variable to let the container know where to find the mounted files. { Name: SecretPathDefaultDirEnvVar, Value: filepath.Join(AWSSecretMountPathPrefix...), diff --git a/flytepropeller/pkg/webhook/gcp_secret_manager.go b/flytepropeller/pkg/webhook/gcp_secret_manager.go index c35cc24717..c69705594e 100644 --- a/flytepropeller/pkg/webhook/gcp_secret_manager.go +++ b/flytepropeller/pkg/webhook/gcp_secret_manager.go @@ -96,7 +96,7 @@ func (i GCPSecretManagerInjector) Inject(ctx context.Context, secret *core.Secre // Inject GCP secret-inject webhook annotations to mount the secret in a predictable location. envVars := []corev1.EnvVar{ - // SetSupportedTaskType environment variable to let the container know where to find the mounted files. + // Set environment variable to let the container know where to find the mounted files. { Name: SecretPathDefaultDirEnvVar, Value: GCPSecretMountPath, diff --git a/flytepropeller/pkg/webhook/k8s_secrets.go b/flytepropeller/pkg/webhook/k8s_secrets.go index afa5d42d60..102d1ae6c1 100644 --- a/flytepropeller/pkg/webhook/k8s_secrets.go +++ b/flytepropeller/pkg/webhook/k8s_secrets.go @@ -58,7 +58,7 @@ func (i K8sSecretInjector) Inject(ctx context.Context, secret *core.Secret, p *c p.Spec.InitContainers = AppendVolumeMounts(p.Spec.InitContainers, mount) p.Spec.Containers = AppendVolumeMounts(p.Spec.Containers, mount) - // SetSupportedTaskType environment variable to let the container know where to find the mounted files. + // Set environment variable to let the container know where to find the mounted files. defaultDirEnvVar := corev1.EnvVar{ Name: SecretPathDefaultDirEnvVar, Value: filepath.Join(K8sSecretPathPrefix...), diff --git a/flytepropeller/pkg/webhook/vault_secret_manager.go b/flytepropeller/pkg/webhook/vault_secret_manager.go index 1192ac4d9d..658e3970d1 100644 --- a/flytepropeller/pkg/webhook/vault_secret_manager.go +++ b/flytepropeller/pkg/webhook/vault_secret_manager.go @@ -44,7 +44,7 @@ func (i VaultSecretManagerInjector) Inject(ctx context.Context, secret *coreIdl. case coreIdl.Secret_ANY: fallthrough case coreIdl.Secret_FILE: - // SetSupportedTaskType environment variable to let the container know where to find the mounted files. + // Set environment variable to let the container know where to find the mounted files. defaultDirEnvVar := corev1.EnvVar{ Name: SecretPathDefaultDirEnvVar, Value: filepath.Join(VaultSecretPathPrefix...), diff --git a/flytestdlib/bitarray/bitset_test.go b/flytestdlib/bitarray/bitset_test.go index 540c05af0e..72e91f70d0 100644 --- a/flytestdlib/bitarray/bitset_test.go +++ b/flytestdlib/bitarray/bitset_test.go @@ -18,7 +18,7 @@ func ExampleBitSet() { } func TestBitSet_Set(t *testing.T) { - t.Run("Empty SetSupportedTaskType", func(t *testing.T) { + t.Run("Empty Set", func(t *testing.T) { b := new(BitSet) b.Set(5) assert.True(t, b.IsSet(5)) diff --git a/flytestdlib/cache/sync_set.go b/flytestdlib/cache/sync_set.go index e42b636fc2..211b4f10ef 100644 --- a/flytestdlib/cache/sync_set.go +++ b/flytestdlib/cache/sync_set.go @@ -4,7 +4,7 @@ import "sync" var emptyVal = struct{}{} -// syncSet is a thread-safe SetSupportedTaskType. +// syncSet is a thread-safe Set. type syncSet struct { underlying sync.Map } diff --git a/flytestdlib/cli/pflags/api/templates.go b/flytestdlib/cli/pflags/api/templates.go index 9142c75af2..f486ee4541 100644 --- a/flytestdlib/cli/pflags/api/templates.go +++ b/flytestdlib/cli/pflags/api/templates.go @@ -209,7 +209,7 @@ func Test{{ .Name }}_SetFlags(t *testing.T) { {{ else if eq .TestStrategy "Raw" }}testValue := {{ .TestValue }} {{ else }}testValue := join_{{ $ParentName }}({{ .TestValue }}, ",") {{ end }} - cmdFlags.SetSupportedTaskType("{{ .Name }}", testValue) + cmdFlags.Set("{{ .Name }}", testValue) {{- if eq .FlagMethodName "" }} if {{ $varName }} := cmdFlags.Lookup("{{ .Name }}"); {{ $varName }} != nil { {{ if eq .TestStrategy "Json" }}testDecodeJson_{{ $ParentName }}(t, fmt.Sprintf("%v", v.Value.String()), &actual.{{ .GoName }}) diff --git a/flytestdlib/cli/pflags/api/utils.go b/flytestdlib/cli/pflags/api/utils.go index 1bd8e53677..47e3df9b1d 100644 --- a/flytestdlib/cli/pflags/api/utils.go +++ b/flytestdlib/cli/pflags/api/utils.go @@ -35,7 +35,7 @@ func isStringer(t types.Type) bool { } func isPFlagValue(t types.Type) bool { - return implementsAllOfMethods(t, "String", "SetSupportedTaskType", "Type") + return implementsAllOfMethods(t, "String", "Set", "Type") } func hasStringConstructor(t *types.Named) bool { diff --git a/flytestdlib/cli/pflags/cmd/root.go b/flytestdlib/cli/pflags/cmd/root.go index c33bbca29b..5c21f50f4c 100644 --- a/flytestdlib/cli/pflags/cmd/root.go +++ b/flytestdlib/cli/pflags/cmd/root.go @@ -35,7 +35,7 @@ type MyStruct struct { func init() { root.Flags().StringVarP(&pkg, "package", "p", ".", "Determines the source/destination package.") root.Flags().StringVar(&defaultValuesVariable, "default-var", "defaultConfig", "Points to a variable to use to load default configs. If specified & found, it'll be used instead of the values specified in the tag.") - root.Flags().BoolVar(&shouldBindDefaultVariable, "bind-default-var", false, "The generated PFlags SetSupportedTaskType will bind fields to the default variable.") + root.Flags().BoolVar(&shouldBindDefaultVariable, "bind-default-var", false, "The generated PFlags Set will bind fields to the default variable.") } func Execute() error { diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 3aac8c7fa9..6210adea36 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -230,7 +230,7 @@ func TestStrictAccessor(t *testing.T) { assert.NoError(t, v.UpdateConfig(context.TODO())) }) - t.Run(fmt.Sprintf("[%v] SetSupportedTaskType through env", provider(config.Options{}).ID()), func(t *testing.T) { + t.Run(fmt.Sprintf("[%v] Set through env", provider(config.Options{}).ID()), func(t *testing.T) { reg := config.NewRootSection() _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) assert.NoError(t, err) @@ -415,11 +415,11 @@ func TestAccessor_UpdateConfig(t *testing.T) { RootSection: reg, }) key := strings.ToUpper("my-component.str") - assert.NoError(t, os.Setenv(key, "SetSupportedTaskType From Env")) + assert.NoError(t, os.Setenv(key, "Set From Env")) defer func() { assert.NoError(t, os.Unsetenv(key)) }() assert.NoError(t, v.UpdateConfig(context.TODO())) r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) - assert.Equal(t, "SetSupportedTaskType From Env", r.StringValue) + assert.Equal(t, "Set From Env", r.StringValue) }) t.Run(fmt.Sprintf("[%v] Override in Env Var no config file", provider(config.Options{}).ID()), func(t *testing.T) { @@ -429,11 +429,11 @@ func TestAccessor_UpdateConfig(t *testing.T) { v := provider(config.Options{RootSection: reg}) key := strings.ToUpper("my-component.str3") - assert.NoError(t, os.Setenv(key, "SetSupportedTaskType From Env")) + assert.NoError(t, os.Setenv(key, "Set From Env")) defer func() { assert.NoError(t, os.Unsetenv(key)) }() assert.NoError(t, v.UpdateConfig(context.TODO())) r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) - assert.Equal(t, "SetSupportedTaskType From Env", r.StringValue3) + assert.Equal(t, "Set From Env", r.StringValue3) }) t.Run(fmt.Sprintf("[%v] Change handler", provider(config.Options{}).ID()), func(t *testing.T) { @@ -522,11 +522,11 @@ func TestAccessor_UpdateConfig(t *testing.T) { RootSection: reg, }) key := strings.ToUpper("my-component.str") - assert.NoError(t, os.Setenv(key, "SetSupportedTaskType From Env")) + assert.NoError(t, os.Setenv(key, "Set From Env")) defer func() { assert.NoError(t, os.Unsetenv(key)) }() assert.NoError(t, v.UpdateConfig(context.TODO())) r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) - assert.Equal(t, "SetSupportedTaskType From Env", r.StringValue) + assert.Equal(t, "Set From Env", r.StringValue) assert.Equal(t, "default value 2", r.StringValue2) }) } diff --git a/flytestdlib/database/db.go b/flytestdlib/database/db.go index 719ed6e424..8046c7ead4 100644 --- a/flytestdlib/database/db.go +++ b/flytestdlib/database/db.go @@ -73,7 +73,7 @@ func setupDbConnectionPool(ctx context.Context, gormDb *gorm.DB, dbConfig *DbCon genericDb.SetConnMaxLifetime(dbConfig.ConnMaxLifeTime.Duration) genericDb.SetMaxIdleConns(dbConfig.MaxIdleConnections) genericDb.SetMaxOpenConns(dbConfig.MaxOpenConnections) - logger.Infof(ctx, "SetSupportedTaskType connection pool values to [%+v]", genericDb.Stats()) + logger.Infof(ctx, "Set connection pool values to [%+v]", genericDb.Stats()) return nil } diff --git a/flytestdlib/storage/rawstores_test.go b/flytestdlib/storage/rawstores_test.go index a71e46bcf9..d67f1e2ff8 100644 --- a/flytestdlib/storage/rawstores_test.go +++ b/flytestdlib/storage/rawstores_test.go @@ -31,7 +31,7 @@ func Test_createHTTPClient(t *testing.T) { assert.Equal(t, m, proxyTransport.defaultHeaders) }) - t.Run("SetSupportedTaskType empty timeout", func(t *testing.T) { + t.Run("Set empty timeout", func(t *testing.T) { client := createHTTPClient(HTTPClientConfig{ Timeout: config.Duration{}, }) @@ -39,7 +39,7 @@ func Test_createHTTPClient(t *testing.T) { assert.Zero(t, client.Timeout) }) - t.Run("SetSupportedTaskType timeout", func(t *testing.T) { + t.Run("Set timeout", func(t *testing.T) { client := createHTTPClient(HTTPClientConfig{ Timeout: config.Duration{Duration: 2 * time.Second}, })