mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
chore: add TODO for ReplaceContainerOperation
This commit is contained in:
@@ -116,7 +116,7 @@ func (o *ReplaceContainerOperation) Execute(ctx context.Context, cli Client) err
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Rollback support - if new container fails to start, restart old container (#24)
|
||||
// TODO: Rollback support - if new container fails to start, stop new, collect logs, and restart old container (#24)
|
||||
// TODO: When parallelism is added, rollback becomes more complex - need to track which containers
|
||||
// were stopped and restore them all on failure
|
||||
resp, err := cli.CreateContainer(ctx, o.ServiceID, o.Spec, o.MachineID)
|
||||
@@ -127,6 +127,8 @@ func (o *ReplaceContainerOperation) Execute(ctx context.Context, cli Client) err
|
||||
return fmt.Errorf("start container: %w", err)
|
||||
}
|
||||
|
||||
// TODO: wait for the container to become healthy. If unhealthy, stop new container, collect logs, and start old.
|
||||
|
||||
// For start-first, we need to stop before removing.
|
||||
// For stop-first, the container is already stopped.
|
||||
if !stopFirst {
|
||||
|
||||
Reference in New Issue
Block a user