Skip to content

Conversation

@alexmt
Copy link
Collaborator

@alexmt alexmt commented Sep 17, 2025

Closes #24621

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates? No
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

We've profiled an Argo CD instance affected by #24621 and discovered that memory spike is happening because webhook is trying to list all applications managed by instance. The PR improves memory usage by leveraging existing applications informer.

@alexmt alexmt requested a review from a team as a code owner September 17, 2025 19:54
@bunnyshell
Copy link

bunnyshell bot commented Sep 17, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@alexmt alexmt changed the title refactor: use informer in webhook handler to reduce memory usage fix: use informer in webhook handler to reduce memory usage Sep 17, 2025
Copy link
Member

@blakepettersson blakepettersson left a comment

Choose a reason for hiding this comment

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

LGTM!

@blakepettersson blakepettersson added cherry-pick/3.0 Candidate for cherry picking into the 3.0 release branch cherry-pick/3.1 Candidate for cherry picking into the 3.1 release branch cherry-pick/3.2 Candidate for cherry picking into the 3.2 release branch cherry-pick/2.14 Candidate for cherry picking into the 2.14 release branch labels Sep 17, 2025
@alexmt alexmt force-pushed the refactor/webhook-informer branch from ebfce38 to 35a087b Compare September 17, 2025 20:03
Copy link
Member

@jessesuen jessesuen left a comment

Choose a reason for hiding this comment

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

Nice! Seems safe to backport as well.

@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@6ca71fe). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #24622   +/-   ##
=========================================
  Coverage          ?   60.44%           
=========================================
  Files             ?      350           
  Lines             ?    60174           
  Branches          ?        0           
=========================================
  Hits              ?    36375           
  Misses            ?    20856           
  Partials          ?     2943           

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

@alexmt alexmt merged commit a880fee into argoproj:master Sep 17, 2025
42 of 43 checks passed
argo-cd-cherry-pick-bot bot pushed a commit that referenced this pull request Sep 17, 2025
@argo-cd-cherry-pick-bot
Copy link

❌ Cherry-pick failed for 3.0. Please check the workflow logs for details.

@argo-cd-cherry-pick-bot
Copy link

🍒 Cherry-pick PR created for 3.2: #24623

@argo-cd-cherry-pick-bot
Copy link

❌ Cherry-pick failed for 3.1. Please check the workflow logs for details.

@argo-cd-cherry-pick-bot
Copy link

❌ Cherry-pick failed for 2.14. Please check the workflow logs for details.

alexmt added a commit that referenced this pull request Sep 17, 2025
…ick #24622 for 3.2) (#24623)

Signed-off-by: Alexander Matyushentsev <[email protected]>
Co-authored-by: Alexander Matyushentsev <[email protected]>
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 17, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 17, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 17, 2025
blakepettersson pushed a commit that referenced this pull request Sep 18, 2025
blakepettersson pushed a commit that referenced this pull request Sep 18, 2025
nitishfy pushed a commit that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/2.14 Candidate for cherry picking into the 2.14 release branch cherry-pick/3.0 Candidate for cherry picking into the 3.0 release branch cherry-pick/3.1 Candidate for cherry picking into the 3.1 release branch cherry-pick/3.2 Candidate for cherry picking into the 3.2 release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application webhook uses excessive amount of memory

4 participants