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

feat: webhook should use 'rename' to copy app manifests of previous commit #16754

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Jan 4, 2024

Related to #14269

The manifests path annotation feature implementation causes Redis high memory usage. After the Git repository receives a new commit, the webhook handler copies the manifest of multiple applications using the get & set Redis commands. As a result, it transfers a lot of data from and into Redis while leaving unnecessary copies of old manifests.

The PR changes implementation to use rename command. It significantly reduces Redis traffic, improves webhook performance, and eliminates memory spikes.

…ommit

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@alexmt alexmt requested review from a team as code owners January 4, 2024 23:29
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 40 lines in your changes are missing coverage. Please review.

Comparison is base (1975074) 49.48% compared to head (1c5077c) 49.50%.
Report is 1 commits behind head on master.

Files Patch % Lines
util/cache/cache.go 73.52% 13 Missing and 5 partials ⚠️
util/cache/inmemory.go 0.00% 8 Missing ⚠️
util/cache/twolevelclient.go 0.00% 6 Missing ⚠️
reposerver/cache/cache.go 20.00% 4 Missing ⚠️
util/cache/redis.go 0.00% 2 Missing ⚠️
util/webhook/webhook.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16754      +/-   ##
==========================================
+ Coverage   49.48%   49.50%   +0.01%     
==========================================
  Files         271      271              
  Lines       47728    47793      +65     
==========================================
+ Hits        23620    23658      +38     
- Misses      21773    21796      +23     
- Partials     2335     2339       +4     

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

Copy link
Member

@gdsoumya gdsoumya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexmt alexmt merged commit 4afddf7 into argoproj:master Jan 5, 2024
25 checks passed
@alexmt alexmt deleted the repo-cache-settings branch January 5, 2024 16:53
ebuildy pushed a commit to ebuildy/argo-cd that referenced this pull request Jan 7, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: ebuildy <ebuildy@gmail.com>
alexmt added a commit to alexmt/argo-cd that referenced this pull request Jan 19, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
JulienFuix pushed a commit to JulienFuix/argo-cd that referenced this pull request Feb 6, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
clement-heetch pushed a commit to clement-heetch/argo-cd that referenced this pull request Feb 12, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
penglongli pushed a commit to penglongli/argo-cd that referenced this pull request Mar 6, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: penglongli <pelenli@tencent.com>
lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
aborilov pushed a commit to aborilov/argo-cd that referenced this pull request Apr 29, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
…ommit (argoproj#16754)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants