Skip to content

Commit

Permalink
fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-codefresh committed Aug 16, 2024
1 parent 1e8496c commit 2a62c9b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion controller/appcontroller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ func TestAlreadyAttemptSync(t *testing.T) {
t.Run("different manifest with sync result, with enabled flag", func(t *testing.T) {

_ = os.Setenv("PERSIST_CHANGE_REVISIONS", "1")

attempted, _ := alreadyAttemptedSync(app, "sha", []string{}, false, nil)
assert.False(t, attempted)
})
Expand Down
6 changes: 3 additions & 3 deletions reposerver/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -3031,14 +3031,14 @@ func (s *Service) UpdateRevisionForPaths(_ context.Context, request *apiclient.U
if err != nil {
// Only warn with the error, no need to block anything if there is a caching error.
logCtx.Warnf("error updating cached revision for repo %s with revision %s: %v", repo.Repo, revision, err)
return &apiclient.UpdateRevisionForPathsResponse{Revision: revision,}, nil
return &apiclient.UpdateRevisionForPathsResponse{Revision: revision}, nil
}

return &apiclient.UpdateRevisionForPathsResponse{Revision: revision,}, nil
return &apiclient.UpdateRevisionForPathsResponse{Revision: revision}, nil
}

logCtx.Debugf("changes found for application %s in repo %s from revision %s to revision %s", request.AppName, repo.Repo, syncedRevision, revision)
return &apiclient.UpdateRevisionForPathsResponse{Changes: true, Revision: revision,}, nil
return &apiclient.UpdateRevisionForPathsResponse{Changes: true, Revision: revision}, nil
}

func (s *Service) updateCachedRevision(logCtx *log.Entry, oldRev string, newRev string, request *apiclient.UpdateRevisionForPathsRequest, gitClientOpts git.ClientOpts) error {
Expand Down
3 changes: 0 additions & 3 deletions server/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ const (
var (
watchAPIBufferSize = env.ParseNumFromEnv(argocommon.EnvWatchAPIBufferSize, 1000, 0, math.MaxInt32)
permissionDeniedErr = status.Error(codes.PermissionDenied, "permission denied")

applicationEventCacheExpiration = time.Minute * time.Duration(env.ParseNumFromEnv(argocommon.EnvApplicationEventCacheDuration, 20, 0, math.MaxInt32))
resourceEventCacheExpiration = time.Minute * time.Duration(env.ParseNumFromEnv(argocommon.EnvResourceEventCacheDuration, 20, 0, math.MaxInt32))
)

// Server provides an Application service
Expand Down
2 changes: 0 additions & 2 deletions util/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ const (
settingsWebhookMaxPayloadSizeMB = "webhook.maxPayloadSizeMB"
// settingsApplicationInstanceLabelKey is the key to configure injected app instance label key
settingsApplicationInstanceLabelKey = "application.instanceLabelKey"
// settingsCodefreshReporterVersion is the key to configure injected app instance label key
settingsCodefreshReporterVersion = "codefresh.reporterVersion"
// settingsResourceTrackingMethodKey is the key to configure tracking method for application resources
settingsResourceTrackingMethodKey = "application.resourceTrackingMethod"
// resourcesCustomizationsKey is the key to the map of resource overrides
Expand Down

0 comments on commit 2a62c9b

Please sign in to comment.