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(cli): core redis compression based on argocd-cmd-params-cm #21840

Closed

Conversation

NetanelK
Copy link
Contributor

Fixes #15912
Fixes #15077

This PR adds optional Redis compression from argocd-cmd-params-cm, which defaults to gzip, into headless mode appstatecache.

Fix should be cherry-picked into v2.11, v2.12 and v2.13

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 Toolchain Guide
  • 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?
  • 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).

@NetanelK NetanelK requested a review from a team as a code owner February 10, 2025 21:57
Copy link

bunnyshell bot commented Feb 10, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 37.03704% with 17 lines in your changes missing coverage. Please review.

Project coverage is 55.61%. Comparing base (d183d9c) to head (0a20804).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
cmd/argocd/commands/headless/headless.go 0.00% 10 Missing ⚠️
cmd/argocd/commands/admin/dashboard.go 0.00% 4 Missing ⚠️
common/common.go 76.92% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21840      +/-   ##
==========================================
+ Coverage   55.58%   55.61%   +0.02%     
==========================================
  Files         339      339              
  Lines       56874    56891      +17     
==========================================
+ Hits        31616    31638      +22     
+ Misses      22609    22603       -6     
- Partials     2649     2650       +1     

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

@NetanelK NetanelK force-pushed the fix/core-redis-compression branch from c419354 to 57d8ebb Compare February 10, 2025 23:46
@NetanelK NetanelK force-pushed the fix/core-redis-compression branch from 57d8ebb to 0a20804 Compare February 10, 2025 23:49
@NetanelK NetanelK requested a review from a team as a code owner February 10, 2025 23:49
Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

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

Hi, thanks for raising this PR. We recently introduced the redis-compress flag as a global flag in #21786 which I believe solves the problem for both the issues you specified above. Furthermore, what you're doing in this PR is getting the flag value from the controller flag and setting it in the headless function. Instead of all this, it is better to introduce the redis-compress flag as a global flag (see this comment) than only removing this flag from specific subcommands.

@nitishfy nitishfy closed this Feb 11, 2025
@NetanelK
Copy link
Contributor Author

Hi, thanks for raising this PR. We recently introduced the redis-compress flag as a global flag in #21786 which I believe solves the problem for both the issues you specified above. Furthermore, what you're doing in this PR is getting the flag value from the controller flag and setting it in the headless function. Instead of all this, it is better to introduce the redis-compress flag as a global flag (see this comment) than only removing this flag from specific subcommands.

Thanks for adding that feature, I just want to verify, both redis-compress flag and redis.compression values should always match, am I right?

@nitishfy
Copy link
Member

@NetanelK exactly. The compression on the controller should match with the CLI. If it doesn't, the cache key will be missing.

@NetanelK
Copy link
Contributor Author

@NetanelK exactly. The compression on the controller should match with the CLI. If it doesn't, the cache key will be missing.

Great to know, although IMO it's easier to fetch the redis.compression value as they always should match.

Anyhow, will #21786 be patched into older versions v2.11-13?

@nitishfy
Copy link
Member

nitishfy commented Feb 12, 2025

Great to know, although IMO it's easier to fetch the redis.compression value as they always should match.

The controller is already doing the fetching part. No need to do the same for CLI.

Anyhow, will #21786 be patched into older versions v2.11-13?

Tagging @ishitasequeira / @crenshaw-dev for this answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants