Repository navigation
feat(argocd): make pending-resource list limit configurable for app wait/sync/rollback commands - #29611
Closed
KR-Ravindra wants to merge 1 commit into
Closed
feat(argocd): make pending-resource list limit configurable for app wait/sync/rollback commands#29611KR-Ravindra wants to merge 1 commit into
KR-Ravindra wants to merge 1 commit into
Conversation
…ait/sync/rollback commands Add --max-pending-resources flag to argocd app wait, sync, and rollback commands. The flag controls how many pending resources are displayed in timeout error messages, replacing the hard-coded limit of 10. Use 0 to show all pending resources. Fixes argoproj#29031 Signed-off-by: KR Ravindra <42912207+KR-Ravindra@users.noreply.github.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Bundle ReportBundle size has no change ✅ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #29611 +/- ##
=========================================
Coverage ? 71.51%
=========================================
Files ? 431
Lines ? 55166
Branches ? 0
=========================================
Hits ? 39450
Misses ? 15716
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Member
|
Duplicate of #29601 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When
argocd app wait,argocd app sync, orargocd app rollbackcommands timeout due to pending resources, the error message displays at most 10 pending resources regardless of how many are actually pending. This limited visibility makes it difficult to diagnose sync issues.Root Cause
The timeout error handling in
waitOnApplicationStatushard-codes a limit of 10 resources when formatting the error message:Fix
Add a new
--max-pending-resourcesflag toargocd app wait,sync, androllbackcommands with a default value of 10. The flag accepts 0 (show all pending resources) or any positive integer.Changes:
formatPendingResources(resources []*resourceState, maxPending int) errorfunctionmaxPendingResourcesparameter towaitOnApplicationStatussignature--max-pending-resourcesflag toNewApplicationWaitCommand,NewApplicationSyncCommand, andNewApplicationRollbackCommandwaitOnApplicationStatuscall sites to pass the new parameterHow Tested
cmd/argocd/commands/app_pending_test.gocovering:go test ./cmd/argocd/commands)--max-pending-resources 0displays all resourcesLinks
argocd app waittimeout errors configurable #29031This change was prepared with an AI agent operated by KR-Ravindra.