Plan 05 limen side deployment queue and registry polling - #26
Merged
Conversation
Deployment entity + DeploymentStatus enum, EF configuration with partial unique index for dedup, DbSet in IAppDbContext/AppDbContext, and DeploymentQueue migration.
DeployCommand, DeployProgress, DeployResult, StopContainerCommand, RollbackCommand records and the matching AgentMessageTypes constants for the deployment pipeline.
CreateDeployment, CancelDeployment, ReportDeploymentProgress, ReportDeploymentResult commands plus ListDeployments and GetDeploymentLogs queries with DeploymentDto. Includes dedup guard in CreateDeploymentCommandHandler.
DeploymentDispatcher looks up the online agent for the target node via IAgentConnectionRegistry and sends the DeployCommand over its channel. Registered as scoped IDeploymentDispatcher in Infrastructure DI.
RegistryClient fetches manifest digests via the Docker Distribution HTTP API with bearer-token auth for Docker Hub. RegistryPollJob (Quartz, every 5min) checks each AutoDeploy service and queues a new deployment when the digest changes.
Handle agent/deployProgress and agent/deployResult frames in the inbound WS loop by dispatching ReportDeploymentProgressCommand and ReportDeploymentResultCommand.
GET /api/deployments?serviceId=..., GET /api/deployments/{id}/logs,
POST /api/deployments, POST /api/deployments/{id}/cancel all behind RequireAuthorization.
Unit tests for CreateDeploymentCommandHandler (dedup, service-not-found, dispatch failure swallowed) and ReportDeploymentProgressCommandHandler (Queued->InProgress transition, StartedAt preserved, log accumulation).
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
Limentinus-side deploy pipeline and frontend are follow-up PRs.
Closes #25