Merge remote-tracking branch 'upstream/main' into feat/base-service-delivery
# Conflicts: # ansible/mysql-deploy.yml # frontend/src/api/delivery.ts # frontend/src/views/service/Catalog.vue # server/.env.example # server/internal/config/config.go # server/internal/handler/task_log.go # server/internal/service/delivery.go
This commit is contained in:
@@ -14,6 +14,11 @@ const (
|
||||
TaskValidationFailed = "validation_failed"
|
||||
TaskCanceling = "canceling"
|
||||
TaskCanceled = "canceled"
|
||||
TaskRollbackPending = "rollback_pending"
|
||||
TaskRollingBack = "rolling_back"
|
||||
TaskRolledBack = "rolled_back"
|
||||
TaskRollbackFailed = "rollback_failed"
|
||||
TaskRollbackAck = "rollback_acknowledged"
|
||||
)
|
||||
|
||||
type ResourceQuota struct {
|
||||
@@ -111,6 +116,20 @@ type ExecutionJob struct {
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// RollbackJob tracks the compensating AWX run independently from the deploy run.
|
||||
// Keeping a separate record preserves both job IDs for audit and retry tooling.
|
||||
type RollbackJob struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
TaskID string `gorm:"size:36;not null;uniqueIndex" json:"task_id"`
|
||||
ExecutorJobID string `gorm:"size:128;not null" json:"executor_job_id"`
|
||||
Status string `gorm:"size:32;not null;index" json:"status"`
|
||||
Reason string `gorm:"type:text" json:"reason"`
|
||||
StartedAt *time.Time `json:"started_at,omitempty"`
|
||||
FinishedAt *time.Time `json:"finished_at,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type TaskEvent struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
TaskID string `gorm:"size:36;not null;index" json:"task_id"`
|
||||
|
||||
Reference in New Issue
Block a user