Skip to content

Commit cf89c8a

Browse files
committed
feat: instance record management improvements
Previously, the instance resource was responsible for creating, updating and deleting the instance record in Etcd. This led to a corner case in our disaster recovery process when we need to remove an instance resource without executing its lifecyce methods. This commit shifts the responsibility for creating and deleting the instance records to the workflows. Now, we will create or update the instance record to indicate the operation we're about to perform. We only completely delete the instance records if the database operation was successful. The instance resource still updates the instance record to indicate an available or failed status with an error. PLAT-398
1 parent 06352a5 commit cf89c8a

17 files changed

Lines changed: 345 additions & 240 deletions

api/apiv1/design/instance.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ var Instance = g.Type("Instance", func() {
162162
g.Enum(
163163
"creating",
164164
"modifying",
165+
"deleting",
165166
"backing_up",
166167
"available",
167168
"degraded",

api/apiv1/gen/http/openapi.json

Lines changed: 16 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/apiv1/gen/http/openapi.yaml

Lines changed: 16 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)