Skip to content

Commit 9d1b6a9

Browse files
committed
fix up no lint
Signed-off-by: Jason Parraga <[email protected]>
1 parent 8b215c7 commit 9d1b6a9

File tree

10 files changed

+15
-16
lines changed

10 files changed

+15
-16
lines changed

flyteadmin/pkg/errors/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,5 @@ func NewInactiveProjectError(ctx context.Context, id string) FlyteAdminError {
215215
}
216216

217217
func NewInvalidLiteralTypeError(name string, err error) FlyteAdminError {
218-
return NewFlyteAdminErrorf(codes.InvalidArgument, "Failed to validate literal type for [%s] with err: %s", name, err) //nolint
218+
return NewFlyteAdminErrorf(codes.InvalidArgument, "Failed to validate literal type for [%s] with err: %s", name, err)
219219
}

flytectl/cmd/update/execution.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ func updateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comm
3737
project := config.GetConfig().Project
3838
domain := config.GetConfig().Domain
3939
if len(args) != 1 {
40-
return errors.New(clierrors.ErrExecutionNotPassed) //nolint
40+
return errors.New(clierrors.ErrExecutionNotPassed)
4141
}
4242
executionName := args[0]
4343
activate := execution.UConfig.Activate
4444
archive := execution.UConfig.Archive
4545
if activate && archive {
46-
return errors.New(clierrors.ErrInvalidStateUpdate) //nolint
46+
return errors.New(clierrors.ErrInvalidStateUpdate)
4747
}
4848

4949
var newState admin.ExecutionState

flytectl/cmd/update/launch_plan.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ func updateLPFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandCont
3737
project := config.GetConfig().Project
3838
domain := config.GetConfig().Domain
3939
if len(args) != 1 {
40-
return errors.New(clierrors.ErrLPNotPassed) //nolint
40+
return errors.New(clierrors.ErrLPNotPassed)
4141
}
4242
name := args[0]
4343
version := launchplan.UConfig.Version
4444
if len(version) == 0 {
45-
return errors.New(clierrors.ErrLPVersionNotPassed) //nolint
45+
return errors.New(clierrors.ErrLPVersionNotPassed)
4646
}
4747

4848
activate := launchplan.UConfig.Activate
@@ -56,7 +56,7 @@ func updateLPFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandCont
5656
deactivate = launchplan.UConfig.Deactivate
5757
}
5858
if activate == deactivate && deactivate {
59-
return errors.New(clierrors.ErrInvalidBothStateUpdate) //nolint
59+
return errors.New(clierrors.ErrInvalidBothStateUpdate)
6060
}
6161

6262
var newState admin.LaunchPlanState

flytectl/cmd/update/launch_plan_meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func getUpdateLPMetaFunc(namedEntityConfig *NamedEntityConfig) func(ctx context.
3838
project := config.GetConfig().Project
3939
domain := config.GetConfig().Domain
4040
if len(args) != 1 {
41-
return errors.New(clierrors.ErrLPNotPassed) //nolint
41+
return errors.New(clierrors.ErrLPNotPassed)
4242
}
4343
name := args[0]
4444
err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_LAUNCH_PLAN, cmdCtx)

flytectl/cmd/update/named_entity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type NamedEntityConfig struct {
2929

3030
func (cfg NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error {
3131
if cfg.Activate && cfg.Archive {
32-
return errors.New(clierrors.ErrInvalidStateUpdate) //nolint
32+
return errors.New(clierrors.ErrInvalidStateUpdate)
3333
}
3434

3535
id := &admin.NamedEntityIdentifier{

flytectl/cmd/update/project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma
105105
}
106106

107107
if edits.GetId() == "" {
108-
return errors.New(clierrors.ErrProjectNotPassed) //nolint
108+
return errors.New(clierrors.ErrProjectNotPassed)
109109
}
110110

111111
currentProject, err := cmdCtx.AdminFetcherExt().GetProjectByID(ctx, edits.GetId())

flytectl/cmd/update/workflow_meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func getUpdateWorkflowFunc(namedEntityConfig *NamedEntityConfig) func(ctx contex
3838
project := config.GetConfig().Project
3939
domain := config.GetConfig().Domain
4040
if len(args) != 1 {
41-
return errors.New(clierrors.ErrWorkflowNotPassed) //nolint
41+
return errors.New(clierrors.ErrWorkflowNotPassed)
4242
}
4343
name := args[0]
4444
err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_WORKFLOW, cmdCtx)

flyteidl/clients/go/admin/auth_interceptor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func NewAuthInterceptor(cfg *Config, tokenCache cache.TokenCache, credentialsFut
236236
logger.Debugf(ctx, "Request failed due to [%v]. Attempting to establish an authenticated connection and trying again.", st.Code())
237237
newErr := MaterializeCredentials(tokenSource, cfg, authorizationMetadataKey, credentialsFuture)
238238
if newErr != nil {
239-
return errors.New(fmt.Sprintf("authentication error! Original Error: %v, Auth Error: %v", err, newErr)) //nolint
239+
return errors.New(fmt.Sprintf("authentication error! Original Error: %v, Auth Error: %v", err, newErr))
240240
}
241241

242242
tokenCache.CondBroadcast()

flyteplugins/go/tasks/plugins/array/k8s/management.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ func TerminateSubTasks(ctx context.Context, tCtx core.TaskExecutionContext, kube
390390
}
391391

392392
if messageCollector.Length() > 0 {
393-
return currentState, externalResources, errors.New(messageCollector.Summary(config.MaxErrorStringLength)) //nolint
393+
return currentState, externalResources, errors.New(messageCollector.Summary(config.MaxErrorStringLength))
394394
}
395395

396396
return currentState.SetPhase(arrayCore.PhaseWriteToDiscoveryThenFail, currentState.PhaseVersion+1), externalResources, nil

flytestdlib/storage/copy_impl_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,11 @@ func TestCopyRaw_CachingErrorHandling(t *testing.T) {
9797
store := dummyStore{
9898
ReadRawCb: func(ctx context.Context, reference DataReference) (closer io.ReadCloser, e error) {
9999
readerCalled = true
100-
//nolint:govet,staticcheck
101100
return ioutils.NewBytesReadCloser(bigD), flyteErr.Wrapf(ErrFailedToWriteCache, errors.New(dummyErrorMsg), "Failed to Cache the metadata")
102101
},
103102
WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error {
104103
writerCalled = true
105-
return flyteErr.Wrapf(ErrFailedToWriteCache, errors.New(dummyErrorMsg), "Failed to Cache the metadata") //nolint:govet,staticcheck
104+
return flyteErr.Wrapf(ErrFailedToWriteCache, errors.New(dummyErrorMsg), "Failed to Cache the metadata")
106105
},
107106
}
108107

@@ -124,11 +123,11 @@ func TestCopyRaw_CachingErrorHandling(t *testing.T) {
124123
store := dummyStore{
125124
ReadRawCb: func(ctx context.Context, reference DataReference) (closer io.ReadCloser, e error) {
126125
readerCalled = true
127-
return ioutils.NewBytesReadCloser(bigD), errors.New(dummyErrorMsg) //nolint:govet,staticcheck
126+
return ioutils.NewBytesReadCloser(bigD), errors.New(dummyErrorMsg)
128127
},
129128
WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error {
130129
writerCalled = true
131-
return errors.New(dummyErrorMsg) //nolint:govet,staticcheck
130+
return errors.New(dummyErrorMsg)
132131
},
133132
}
134133

0 commit comments

Comments
 (0)