Skip to content

Conversation

@uptickmetachu
Copy link
Collaborator

@uptickmetachu uptickmetachu commented Jul 23, 2025

Motivation

The current GitOps deployment system processes deployments sequentially, which creates unnecessary bottlenecks when deploying multiple applications. This leads to longer deployment times and reduced efficiency, especially when deploying independent applications that don't interfere with each other.

Changes

  • Implemented concurrent deployment processing while maintaining per-app serialization
  • Added AppSemaphoreManager to manage per-app semaphores ensuring sequential updates per app
  • Refactored DeployQueueWorker to handle multiple deployments simultaneously
  • Updated deployment logic to use both global helm semaphore and per-app semaphores
  • Added comprehensive test coverage for concurrent deployment scenarios
  • Fixed various code formatting issues throughout the codebase

Key architectural changes:

  • Multiple deployments can now run concurrently
  • Each app maintains its own semaphore (limit 1) to prevent concurrent updates to the same app
  • Global helm semaphore still controls overall parallelism to prevent API rate limiting
  • Worker tracks active deployments and provides visibility into locked apps

Test Plan

  • Verify that multiple deployments can run simultaneously when targeting different apps
  • Confirm that deployments targeting the same app are still processed sequentially
  • Test that deployment failures don't block other concurrent deployments
  • Validate that the semaphore manager correctly tracks and releases app locks
  • Run existing deployment tests to ensure backward compatibility
  • Monitor deployment logs for proper concurrency behavior in staging environment

🤖 Generated with Claude Code

- Add AppSemaphoreManager for per-app deployment serialization
- Enable concurrent deployments while preventing conflicts on same apps
- Refactor DeployQueueWorker to support parallel execution
- Add comprehensive test suite for concurrent deployment scenarios
- Fix code formatting and style issues across codebase

This allows multiple deployments to run simultaneously while ensuring
any given app is only updated by one deployment at a time, improving
deployment throughput while maintaining cluster consistency.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@uptickmetachu uptickmetachu merged commit f111e06 into develop Jul 23, 2025
2 checks passed
@uptickmetachu uptickmetachu deleted the plt-1142/gitops-parallel-deployment branch July 23, 2025 04:09
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.

2 participants