Skip to content

Feat | Add --concurrency flag to control parallel application processing#347

Merged
dag-andersen merged 1 commit intomainfrom
feat/concurrency-flag
Feb 9, 2026
Merged

Feat | Add --concurrency flag to control parallel application processing#347
dag-andersen merged 1 commit intomainfrom
feat/concurrency-flag

Conversation

@dag-andersen
Copy link
Owner

Summary

  • Adds a new --concurrency flag to control the maximum number of applications processed concurrently
  • Default is 40 (same as previous hardcoded value)
  • Setting to 0 allows unlimited concurrency (not recommended)

Changes

  • cmd/options.go: Add --concurrency flag with default value of 40, environment variable CONCURRENCY
  • pkg/extract/extract.go: Replace hardcoded const maxWorkers = 40 with configurable parameter
  • cmd/main.go: Pass concurrency config to RenderApplicationsFromBothBranches()
  • docs/options.md: Document the new option

Usage

# Use default (40 concurrent)
argocd-diff-preview --repo owner/repo --target-branch feature

# Limit to 10 concurrent applications
argocd-diff-preview --repo owner/repo --target-branch feature --concurrency 10

# Unlimited (not recommended)
argocd-diff-preview --repo owner/repo --target-branch feature --concurrency 0

# Or via environment variable:
CONCURRENCY=10 argocd-diff-preview --repo owner/repo --target-branch feature

@dag-andersen dag-andersen merged commit 7d61ee9 into main Feb 9, 2026
3 checks passed
@dag-andersen dag-andersen deleted the feat/concurrency-flag branch February 9, 2026 19:57
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.

1 participant