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

"Refresh apps" option only works in increments of 20 even when more workers are available #18165

Open
3 tasks done
RobinsonZ opened this issue May 10, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@RobinsonZ
Copy link
Contributor

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

The web UI only submits requests in blocks of 20, and waits for all requests in that block to finish before launching another block of 20. This causes a mass refresh of applications to get stuck if any of the individual applications get stuck, and significantly slows the process down because if status-processors is set higher than the default then the UI won't use the maximum number of possible workers.

The relevant block of code seems to be here:

if (refreshActions.length >= 20) {
await Promise.all(refreshActions);
refreshActions.length = 0;
}

To Reproduce

  1. Bring up an ArgoCD instance where argocd-application-controller has --status-processors set to a number higher than 20
  2. Create more than 20 apps
  3. From the web UI, click "refresh apps" and select all apps
  4. Click "refresh"

Expected behavior

One or both of the following:

  1. The applications are refreshed as fast as possible by submitting >20 requests at a time if the server can handle it.
  2. The UI doesn't wait for all requests in a block to finish before launching additional refresh requests.

Screenshots

Here's a screenshot of the network page during the refresh operation showing that the refresh requests are being fired in blocks of 20:
image
(URLs omitted from the screenshot since they contain company info, but these are all requests to refresh an app)

Version

argocd: v2.10.5+335875d
  BuildDate: 2024-03-28T16:12:55Z
  GitCommit: 335875d13e018bed6e03873f4742582582964745
  GitTreeState: clean
  GoVersion: go1.21.8
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.11.0+d3f33c0
  BuildDate: 2024-05-07T16:01:41Z
  GitCommit: d3f33c00197e7f1d16f2a73ce1aeced464b07175
  GitTreeState: clean
  GoVersion: go1.21.9
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.2.1 2023-10-19T20:13:51Z
  Helm Version: v3.14.3+gf03cc04
  Kubectl Version: v0.26.11
  Jsonnet Version: v0.20.0

(The shell is slightly out of date on the machine I'm submitting this from, but I didn't use the shell at all.)

Logs

N/A

@RobinsonZ RobinsonZ added the bug Something isn't working label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant