Repository navigation
perf(argocd-wait-sync-multi): refresh and poll apps in parallel - #400
Merged
Merged
Conversation
The initial refresh and every poll ran `argocd app get` once per app, sequentially (~2.6s each). For monorepo-typescript's 18-app deploys the refresh took ~47s before the first poll and each poll sweep 15-25s, so the recorded per-app `end` was late by up to a sweep. Both now background each app's call and `wait`; the state machine reads the fetched status from a temp dir and is otherwise unchanged. With a 1s fake argocd and 10 healthy apps the script runs in 3s instead of 23s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
JesperTerkelsen
marked this pull request as ready for review
November 11, 2026 23:53
JesperTerkelsen
requested review from
prasad-manu
and removed request for
a team
November 11, 2026 23:53
joscdk
approved these changes
Nov 12, 2026
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.
Summary
argocd-wait-sync-multirunsargocd app getonce per app, one after another (~2.6s per call). That happens both for the up-front refresh and on every poll. On monorepo-typescript's production deploys (up to 18 apps):endtimestamp (wall clock when it is first seen healthy) is late by up to one sweep. That timing goes straight into the #info-releases changelog.Changes
argocd app get --refreshin the background and thenwaits.EXIT), then runs the existing per-app state machine on those results. The state machine is unchanged.CLAUDE.mdchange log updated.The rarely hit in-loop calls (the ComparisonError hard refresh, error-message fetches and the supersede
gh api compare) stay sequential.Test plan
test/run-tests.sh: 5/5 pass (the fixture path goes through the new parallel fetch)argocdthat sleeps 1s per call, 10 healthy apps: 23s → 3sshellcheck: no new findings (the remaining SC2004 style notes are on existing lines)Callers use this action
@main; only monorepo-typescript uses it today, and the change is behaviour-preserving apart from timing.🤖 Generated with Claude Code