You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a scheduler service that can execute promotion groups at their configured ScheduledAt time, orchestrating calls into the promotion execution and conflict-detection components.
The foundation PR introduces promotion groups and related model elements, including a scheduling concept (ScheduledAt). The missing piece is a scheduler service that observes scheduled promotion groups and triggers their execution at the right time.
Goals
Provide a scheduler (or scheduling façade) that:
Monitors promotion groups with a ScheduledAt value in the future.
Triggers execution of these groups at or shortly after their scheduled time.
Avoids duplicate or overlapping runs for the same promotion group.
Integrates cleanly with the rest of the promotion infrastructure.
This issue is only about the scheduling and orchestration layer; conflict detection and ephemeral integration branches are handled in other issues and should be invoked via their public APIs.
Requirements
Scheduling model and states
Define or refine the lifecycle states for a scheduled promotion group, for example:
A promotion group with a ScheduledAt time is discoverable by the scheduler.
Once picked up for execution, its state prevents duplicate concurrent runs.
Scheduler service design
Implement a dedicated scheduler service (e.g., IPromotionScheduler and/or a background worker) responsible for:
Periodically polling for promotion groups whose ScheduledAt is due (within a configurable tolerance window).
Attempting to transition them into a Running state.
Invoking the promotion executor service (from the “ephemeral integration branch” issue) with the correct parameters.
The scheduler must be:
Safe to run in multiple instances (e.g., across multiple nodes) without causing duplicate executions, via optimistic concurrency or equivalent mechanisms available in the current persistence layer.
Configurable in polling frequency and batching behavior (if applicable).
Implement a scheduler service that can execute promotion groups at their configured
ScheduledAttime, orchestrating calls into the promotion execution and conflict-detection components.The foundation PR introduces promotion groups and related model elements, including a scheduling concept (
ScheduledAt). The missing piece is a scheduler service that observes scheduled promotion groups and triggers their execution at the right time.Goals
ScheduledAtvalue in the future.This issue is only about the scheduling and orchestration layer; conflict detection and ephemeral integration branches are handled in other issues and should be invoked via their public APIs.
Requirements
Scheduling model and states
Pending→Scheduled→Running→ (Succeeded|Failed|Conflicted|Cancelled).ScheduledAttime is discoverable by the scheduler.Scheduler service design
IPromotionSchedulerand/or a background worker) responsible for:ScheduledAtis due (within a configurable tolerance window).Runningstate.Integration points
Succeeded,Failed,Conflicted, etc.).Error handling and retries
Observability
Pending→Running, etc.).Configuration
ScheduledAtwithin next N hours/minutes).Testing
Deliverables
ScheduledAt.