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

fix(dashboard): Cleanup viewcontroller after each request. Fixes #2095 #3966

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

unrolled
Copy link
Contributor

Fixes: #2095

Every time GetRolloutInfo route is called it creates a new RolloutViewController, but the context passed into the view controller was never cancelled. This resulted in the informers never being cleaned up which manifested as a memory leak. Cancelling the view controllers context after the request has processed eliminates the "memory leak".

The graph below shows our production instance (pod named argo-rollouts-dashboard-8dfdc4bd6-vkhkp) vs the test instance with the fix applied (pod named argo-rollouts-dashtest). Both instances were receiving API requests every 15seconds.

Screenshot 2024-11-29 at 3 09 20 PM

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 82.71%. Comparing base (5f59344) to head (6ff6e56).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
server/server.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3966      +/-   ##
==========================================
+ Coverage   82.69%   82.71%   +0.01%     
==========================================
  Files         163      163              
  Lines       22895    22898       +3     
==========================================
+ Hits        18934    18940       +6     
+ Misses       3087     3086       -1     
+ Partials      874      872       -2     

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

Copy link
Contributor

Published E2E Test Results

  4 files    4 suites   3h 14m 39s ⏱️
113 tests 106 ✅  7 💤 0 ❌
452 runs  424 ✅ 28 💤 0 ❌

Results for commit 6ff6e56.

Copy link
Contributor

Published Unit Test Results

2 280 tests   2 280 ✅  2m 59s ⏱️
  128 suites      0 💤
    1 files        0 ❌

Results for commit 6ff6e56.

@zachaller zachaller merged commit 642d031 into argoproj:master Dec 4, 2024
24 of 25 checks passed
@unrolled unrolled deleted the fix-dashboard-memory-leak branch December 5, 2024 15:11
Rizwana777 pushed a commit to Rizwana777/argo-rollouts that referenced this pull request Dec 12, 2024
…proj#2095 (argoproj#3966)

fix(dashboard): cleanup viewcontroller after each request. Fixes argoproj#2095

Signed-off-by: Cory Jacobsen <cory@7shifts.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.

kubectl argo rollouts dashboard OOM kill
2 participants