-
Notifications
You must be signed in to change notification settings - Fork 0
Reference v0.16 state machine refactoring
github-actions[bot] edited this page Jan 20, 2026
·
1 revision
Vereinfachung der Deployment-Zustandsmaschine durch klare Trennung von:
- DeploymentStatus - Lebenszyklus des Deployments
- OperationMode - Laufzeitzustand (nur für Running Deployments)
-
Pending- Deployment initialisiert -
Running- Deployment läuft -
Stopped- Container gestoppt -
Failed- Terminal -
Removed- Terminal
-
Normal- Normalbetrieb -
Migrating- Upgrade läuft -
Maintenance- Geplante Wartung -
Stopped- Gestoppt (redundant mit DeploymentStatus) -
Failed- Fehlgeschlagen (redundant)
- Überlappung zwischen DeploymentStatus und OperationMode (Stopped, Failed)
- Unklar wann welcher Status verwendet wird
- Deployment wird erst am ENDE erstellt (nicht sichtbar während Installation)
- OperationMode.Migrating ist eigentlich ein Deployment-Lifecycle-Status
public enum DeploymentStatus
{
Installing = 0, // Neue Installation läuft
Upgrading = 1, // Upgrade/Rollback läuft
Running = 2, // Betriebsbereit
Failed = 3, // Letzte Operation fehlgeschlagen
Removed = 4 // Gelöscht (terminal)
}// Nur gültig wenn DeploymentStatus == Running
public sealed class OperationMode
{
public static readonly OperationMode Normal = new(0, "Normal");
public static readonly OperationMode Maintenance = new(1, "Maintenance");
}-
Installing vs Upgrading getrennt - Ja, weil:
- UI zeigt unterschiedliche Informationen
- Rollback nur nach fehlgeschlagenem Upgrade sinnvoll
- Unterschiedliche Phasen/Progress-Messages
-
Upgrade ist KEINE Maintenance - Unterschiedlicher Intent:
- Maintenance = "Stack pausiert, wird später fortgesetzt"
- Upgrade = "Stack wird aktiv transformiert zu neuer Version"
-
OperationMode nur bei Running - Klare Trennung:
- DeploymentStatus = Lifecycle (was passiert gerade?)
- OperationMode = Runtime (wie verhält sich der laufende Stack?)
-
Vorbereitung für Bounded Context Trennung:
- Deployment BC (Installation/Upgrade/Rollback/Remove)
- Operations BC (Health Monitoring, Maintenance Mode)
DeploymentStatus:
┌─────────────┐
│ Installing │───success───►┌─────────┐
└─────────────┘ │ Running │◄──────┐
│ └─────────┘ │
│ fail │ ▲ │
▼ upgrade/ │ │ success │
┌─────────────┐ rollback│ │ │
│ Failed │◄─────────────────┘ │ │
└─────────────┘ │ │
│ ┌───────────┐ │
│ retry/rollback │ Upgrading │─────┘
└────────────────────►└───────────┘
│
│ fail
▼
┌─────────┐
│ Failed │
└─────────┘
Weitere Übergänge:
- Running → Removed (Deinstallation)
- Failed → Removed (Cleanup)
OperationMode (nur bei DeploymentStatus.Running):
- Normal ◄──► Maintenance
-
DeploymentStatus.cs aktualisieren
- Entfernen:
Pending,Stopped - Hinzufügen:
Installing,Upgrading
- Entfernen:
-
OperationMode.cs vereinfachen
- Behalten:
Normal,Maintenance - Entfernen:
Migrating,Stopped,Failed - Validierung: OperationMode nur wenn Status == Running
- Behalten:
-
Deployment.cs refactoren
- Factory:
StartInstallation()undStartUpgrade() - Deployment wird am START erstellt (sofort sichtbar in UI)
- Neue Transitionen implementieren
- Factory:
-
DeploymentService.cs
- Deployment am START erstellen
-
Installingbei neuer Installation -
Upgradingbei Upgrade/Rollback - Bei Erfolg:
MarkAsRunning() - Bei Fehler:
MarkAsFailed()
-
ChangeOperationModeHandler.cs
- Nur
Normal↔MaintenanceÜbergänge - Validierung: Status muss Running sein
- Nur
-
Health-Related Code
- HealthSnapshot.cs anpassen
- HealthSnapshotMapper.cs anpassen
- MaintenanceObserverService.cs prüfen
-
API Endpoints & DTOs
- Response-Typen aktualisieren
-
EF Core Migration
- Schema-Änderungen (keine Datenmigration nötig, pre-v1)
-
Unit Tests aktualisieren
- DeploymentTests
- OperationModeTests
- Handler-Tests
-
Integration Tests aktualisieren
- Deployment-Endpoints
- Health-Endpoints
- v0.15 Rollback-Feature muss abgeschlossen sein
Getting Started
Architecture
Configuration
Security
Setup Wizard
Development
Operations
CI/CD
Reference
- Roadmap
- API Reference
- Configuration Reference
- Manifest Schema
- Multi-Environment
- Stack Sources
- Plugin System
- Technical Specification
- Full Specification
Specifications
Release Notes