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): pass redis compression to cluster stats and shards commands (#16060) #16421

Merged

Conversation

phanama
Copy link
Contributor

@phanama phanama commented Nov 22, 2023

Both admin cluster stats and admin cluster shards command still use hardcoded RedisCompressionNone. In case users are using Redis gzip compression, these commands return incorrect output. We should pass down the configuration from the --redis-compress flag (default gzip) to these subcommands.

Example bad output:

SERVER                                                                         SHARD  CONNECTION  NAMESPACES COUNT  APPS COUNT  RESOURCES COUNT
https://example-1-k8s.example.com                                              0                  10                 0           0
https://example-2-k8s.example.com                                              0                  10                 0           0
https://example-3-k8s.example.com                                              0                  10                 0           0
https://kubernetes.default.svc                                                 0                  5                  0           0

After the fix:

SERVER                                                                         SHARD  CONNECTION  NAMESPACES COUNT  APPS COUNT  RESOURCES COUNT
https://example-1-k8s.example.com                                              0      Successful  10                 201         4207
https://example-2-k8s.example.com                                              0      Successful  10                 172         2101
https://example-3-k8s.example.com                                              0      Successful  10                 108         889
https://kubernetes.default.svc                                                 0      Successful  5                  29          9877

The shard # number is still incorrect though, showing only 0 as the shard number. Most likely it's a regression introduced in #13018
I will raise another PR later to address this.

Partially fixes: #16060 (everything except the shard # number issue)

cc @clavinjune

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? N/A
  • I've updated documentation as required by this PR. N/A
  • Optional. My organization is added to USERS.md.
  • 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.

Co-authored-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
Signed-off-by: phanama <yudiandreanp@gmail.com>
@phanama phanama requested a review from a team as a code owner November 22, 2023 03:58
Co-authored-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
Signed-off-by: phanama <yudiandreanp@gmail.com>
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

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

Comparison is base (ccdc453) 49.55% compared to head (1bc26ce) 49.52%.
Report is 2 commits behind head on master.

Files Patch % Lines
cmd/argocd/commands/admin/cluster.go 0.00% 32 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16421      +/-   ##
==========================================
- Coverage   49.55%   49.52%   -0.03%     
==========================================
  Files         269      269              
  Lines       47046    47240     +194     
==========================================
+ Hits        23313    23395      +82     
- Misses      21445    21546     +101     
- Partials     2288     2299      +11     

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

@phanama phanama marked this pull request as draft November 22, 2023 04:41
Co-authored-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
Signed-off-by: phanama <yudiandreanp@gmail.com>
@phanama phanama marked this pull request as ready for review November 22, 2023 08:04
Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

Thanks @phanama , LGTM!!

@ishitasequeira ishitasequeira merged commit 23f2767 into argoproj:master Nov 29, 2023
26 checks passed
lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
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.

ArgoCD CLI "admin cluster stats" can't show correct information
2 participants