Skip to content

Commit

Permalink
fix: remove unnecessary settings instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Romriell committed Nov 21, 2023
1 parent c118ff4 commit 1e6588c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions reposerver/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,6 @@ func (s *Service) runManifestGenAsync(ctx context.Context, repoRoot, commitSHA,
close(ch.responseCh)
}()

settings := operationSettings{sem: s.parallelismLimitSemaphore, noCache: q.NoCache, noRevisionCache: q.NoRevisionCache, allowConcurrent: q.ApplicationSource.AllowsConcurrentProcessing()}

// GenerateManifests mutates the source (applies overrides). Those overrides shouldn't be reflected in the cache
// key. Overrides will break the cache anyway, because changes to overrides will change the revision.
appSourceCopy := q.ApplicationSource.DeepCopy()
Expand Down Expand Up @@ -731,7 +729,7 @@ func (s *Service) runManifestGenAsync(ctx context.Context, repoRoot, commitSHA,
return
}
} else {
gitClient, referencedCommitSHA, err := s.newClientResolveRevision(&refSourceMapping.Repo, refSourceMapping.TargetRevision, git.WithCache(s.cache, !settings.noRevisionCache && !settings.noCache))
gitClient, referencedCommitSHA, err := s.newClientResolveRevision(&refSourceMapping.Repo, refSourceMapping.TargetRevision, git.WithCache(s.cache, !q.noRevisionCache && !q.noCache))

Check failure on line 732 in reposerver/repository/repository.go

View workflow job for this annotation

GitHub Actions / Check changes to generated code

q.noRevisionCache undefined (type *"github.com/argoproj/argo-cd/v2/reposerver/apiclient".ManifestRequest has no field or method noRevisionCache, but does have NoRevisionCache)

Check failure on line 732 in reposerver/repository/repository.go

View workflow job for this annotation

GitHub Actions / Check changes to generated code

q.noCache undefined (type *"github.com/argoproj/argo-cd/v2/reposerver/apiclient".ManifestRequest has no field or method noCache, but does have NoCache)

Check failure on line 732 in reposerver/repository/repository.go

View workflow job for this annotation

GitHub Actions / Build & cache Go code

q.noRevisionCache undefined (type *"github.com/argoproj/argo-cd/v2/reposerver/apiclient".ManifestRequest has no field or method noRevisionCache, but does have NoRevisionCache)

Check failure on line 732 in reposerver/repository/repository.go

View workflow job for this annotation

GitHub Actions / Build & cache Go code

q.noCache undefined (type *"github.com/argoproj/argo-cd/v2/reposerver/apiclient".ManifestRequest has no field or method noCache, but does have NoCache)
if err != nil {
log.Errorf("Failed to get git client for repo %s: %v", refSourceMapping.Repo.Repo, err)
ch.errCh <- fmt.Errorf("failed to get git client for repo %s", refSourceMapping.Repo.Repo)
Expand Down

0 comments on commit 1e6588c

Please sign in to comment.