feat(container): add explicit data workflows and snapshot rollback (#193)

* feat(container): add explicit data workflows and snapshot rollback

Make container upgrades and recreation data-safe by adding explicit preserve, export, import, restore, and rollback flows across the backend, SDK, and web UI.

* fix(container): resolve go lint issues

Fix formatting and lint violations introduced by the container data workflow changes so the Go CI lint job passes cleanly.
This commit is contained in:
BBQ
2026-03-06 17:57:48 +08:00
committed by GitHub
parent 47a425baf5
commit 21999b49f4
27 changed files with 2777 additions and 759 deletions
+4 -1
View File
@@ -67,7 +67,8 @@ SELECT
cv.snapshot_id,
cv.version,
cv.created_at,
s.runtime_snapshot_name
s.runtime_snapshot_name,
s.display_name
FROM container_versions cv
JOIN snapshots s ON s.id = cv.snapshot_id
WHERE cv.container_id = $1
@@ -81,6 +82,7 @@ type ListVersionsByContainerIDRow struct {
Version int32 `json:"version"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
RuntimeSnapshotName string `json:"runtime_snapshot_name"`
DisplayName pgtype.Text `json:"display_name"`
}
func (q *Queries) ListVersionsByContainerID(ctx context.Context, containerID string) ([]ListVersionsByContainerIDRow, error) {
@@ -99,6 +101,7 @@ func (q *Queries) ListVersionsByContainerID(ctx context.Context, containerID str
&i.Version,
&i.CreatedAt,
&i.RuntimeSnapshotName,
&i.DisplayName,
); err != nil {
return nil, err
}