Skip to content

Conversation

@alexmt
Copy link
Collaborator

@alexmt alexmt commented Sep 22, 2025

Closes #24689

The applicationSet.status.resources is meant for appset visualization in a future UI/CLI. However it limits the number of applications that can be managed by a single appset.

The desire to build UI should not limit core functionality of application set. From experience of building application tree visualization we know that 1000+ resources is already hard to scale. So in this PR I'm proposing to introduce ARGOCD_APPLICATIONSET_CONTROLLER_MAX_RESOURCES_STATUS_COUNT that limits number of resources stored in status (5k by default). So this way appset can generate any number of apps and in a future UI we can add a warning that only first 5k is shown.

@alexmt alexmt requested a review from a team as a code owner September 22, 2025 16:05
@bunnyshell
Copy link

bunnyshell bot commented Sep 22, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

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.

Thank you! The changes looks good to me. Few points:

  1. Can you please add unit test here?
  2. The lint check is failing that needs to be fixed.

@alexmt alexmt force-pushed the fix/limit-resources-status-count branch from e242d02 to 5ac46ea Compare September 22, 2025 16:15
@alexmt
Copy link
Collaborator Author

alexmt commented Sep 22, 2025

Thanks for looking at PR @nitishfy !

@alexmt alexmt force-pushed the fix/limit-resources-status-count branch from 5ac46ea to 99fed87 Compare September 22, 2025 16:24
@crenshaw-dev
Copy link
Member

Should we have a condition to indicate the truncation to the user/UI?

@alexmt
Copy link
Collaborator Author

alexmt commented Sep 22, 2025

Thanks for review @crenshaw-dev !

Should we have a condition to indicate the truncation to the user/UI?

I was thinking about too while writing PR description. Added status.resourcesCount with the number of resources before truncation. This way UI warning can have e.g. `Warning: 100 more applications are hidden" .

@alexmt alexmt force-pushed the fix/limit-resources-status-count branch 3 times, most recently from e7e4f16 to e45fcc4 Compare September 22, 2025 17:39
// Resources is a list of Applications resources managed by this application set.
Resources []ResourceStatus `json:"resources,omitempty" protobuf:"bytes,3,opt,name=resources"`
Resources []ResourceStatus `json:"resources,omitempty" protobuf:"bytes,3,opt,name=resources"`
ResourcesCount int64 `json:"resourcesCount,omitempty" protobuf:"varint,4,opt,name=resourcesCount"`
Copy link
Member

Choose a reason for hiding this comment

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

Probably wants a doc string so the future UI dev knows how to use this.

Are you hoping to cherry-pick the change back? I think for 3.2 it would be fine, but adding a CRD field further back feels maybe not great.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, you are right. What do you think about adding resourcesCount in a separate PR? The UI functionality is not ready yet, so we are not loosing anything without resourcesCount. We can cherry-pick first PR into previous release and resourcesCount can go only to master branch.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've moved change to a separate commit: d5e690f . If you are fine with it, I will create new PR as soon as this one merged.

@alexmt alexmt force-pushed the fix/limit-resources-status-count branch from e45fcc4 to 74b3182 Compare September 22, 2025 18:05
@alexmt alexmt force-pushed the fix/limit-resources-status-count branch from 74b3182 to 98dcce3 Compare September 22, 2025 18:15
Signed-off-by: Alexander Matyushentsev <[email protected]>
@codecov
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.52%. Comparing base (f960274) to head (315d022).
⚠️ Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #24690      +/-   ##
==========================================
+ Coverage   60.46%   60.52%   +0.06%     
==========================================
  Files         350      350              
  Lines       60187    60196       +9     
==========================================
+ Hits        36390    36434      +44     
+ Misses      20859    20827      -32     
+ Partials     2938     2935       -3     

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

@alexmt alexmt merged commit 452f6c6 into argoproj:master Sep 22, 2025
28 checks passed
@alexmt alexmt 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 22, 2025
@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 3.0. Please check the workflow logs for details.

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

❌ Cherry-pick failed for 3.2. 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 to alexmt/argo-cd that referenced this pull request Sep 22, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 22, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 22, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 22, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 22, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 22, 2025
alexmt added a commit to alexmt/argo-cd that referenced this pull request Sep 22, 2025
alexmt added a commit that referenced this pull request Sep 22, 2025
alexmt added a commit that referenced this pull request Sep 22, 2025
alexmt added a commit that referenced this pull request Sep 22, 2025
alexmt added a commit that referenced this pull request Sep 22, 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.

Appset fails to update status with " Request entity too large" error

3 participants