From 1457c255a4d94e18f04cc29130a3740feb99be09 Mon Sep 17 00:00:00 2001 From: Cody Miller Date: Sun, 2 Oct 2022 22:45:25 -0400 Subject: [PATCH 1/3] devex: add active build and rollout to deployment --- src/rest/types/ignite.ts | 68 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/src/rest/types/ignite.ts b/src/rest/types/ignite.ts index 17fbe116..e633235f 100644 --- a/src/rest/types/ignite.ts +++ b/src/rest/types/ignite.ts @@ -62,6 +62,15 @@ export enum ContainerState { EXITED = 'exited', } +/** + * Rollout state for deployments + */ +export enum RolloutState { + PENDING = 'pending', + FINISHED = 'finished', + FAILED = 'FAILED', +} + /** * Restart policy for deployments */ @@ -160,8 +169,67 @@ export interface Deployment { * The config for this deployment */ config: DeploymentConfig; + + /** + * Current active rollout for deployment + */ + active_rollout: DeploymentRollout | null; + + /** + * Current active build for deployment + */ + active_build: DeploymentBuild | null; } +export type DeploymentBuild = { + /** + * Deployment ID for build + */ + deployment_id: Id<'deployment'>; + + /** + * Digest for image + */ + digest: string | null; + + /** + * Timestamp of when the build has finished + */ + finished_at: Timestamp | null; + + /** + * ID of the build + */ + id: Id<'build'>; +}; + +export type DeploymentRollout = { + /** + * How many containers are being recreated + */ + count: number; + + /** + * When the rollout took place + */ + created_at: Timestamp; + + /** + * The deployment ID for rollout + */ + deployment_id: Id<'deployment'>; + + /** + * The rollout ID for rollout + */ + id: Id<'rollout'>; + + /** + * The state of the rollout + */ + state: RolloutState; +}; + // This is a type not an interface so we can make a union // when future versions of deployment configs come out export type DeploymentConfig = { From 202868eaf6bce0533f2d11a577f751180a09f46d Mon Sep 17 00:00:00 2001 From: Cody Miller Date: Sun, 2 Oct 2022 22:46:36 -0400 Subject: [PATCH 2/3] docs(changeset): Added type `DeploymentRollout` and `DeploymentBuild` to types. Added `active_build` and `active_rollout` to deployment type --- .changeset/wicked-crabs-care.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wicked-crabs-care.md diff --git a/.changeset/wicked-crabs-care.md b/.changeset/wicked-crabs-care.md new file mode 100644 index 00000000..c726a0c6 --- /dev/null +++ b/.changeset/wicked-crabs-care.md @@ -0,0 +1,5 @@ +--- +'@onehop/js': patch +--- + +Added type `DeploymentRollout` and `DeploymentBuild` to types. Added `active_build` and `active_rollout` to deployment type From 894480040c74b6ded783b6d6177e8556f5f587ea Mon Sep 17 00:00:00 2001 From: Cody Miller Date: Sun, 2 Oct 2022 22:51:06 -0400 Subject: [PATCH 3/3] rm old changeset --- .changeset/wet-onions-join.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/wet-onions-join.md diff --git a/.changeset/wet-onions-join.md b/.changeset/wet-onions-join.md deleted file mode 100644 index 365f35bf..00000000 --- a/.changeset/wet-onions-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@onehop/js': minor ---- - -Add rollout ID to ID prefixes