Skip to content

Commit 6313993

Browse files
chore: remove soak typo reference (#974)
1 parent bf6265f commit 6313993

9 files changed

Lines changed: 136 additions & 84 deletions

File tree

apps/api/openapi/openapi.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,13 +1000,6 @@
10001000
"minimum": 0,
10011001
"type": "integer"
10021002
},
1003-
"minimumSockTimeMinutes": {
1004-
"deprecated": true,
1005-
"description": "Use minimumSoakTimeMinutes instead. Minimum time to wait after the depends on environment is in a success state before the current environment can be deployed",
1006-
"format": "int32",
1007-
"minimum": 0,
1008-
"type": "integer"
1009-
},
10101003
"minimumSuccessPercentage": {
10111004
"default": 100,
10121005
"format": "float",

apps/api/openapi/schemas/policies.jsonnet

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ local openapi = import '../lib/openapi.libsonnet';
168168
minimumSuccessPercentage: { type: 'number', format: 'float', minimum: 0, maximum: 100, default: 100 },
169169
successStatuses: { type: 'array', items: openapi.schemaRef('JobStatus') },
170170

171-
minimumSockTimeMinutes: {
172-
type: 'integer',
173-
format: 'int32',
174-
minimum: 0,
175-
deprecated: true,
176-
description: 'Use minimumSoakTimeMinutes instead. Minimum time to wait after the depends on environment is in a success state before the current environment can be deployed',
177-
},
178-
179171
minimumSoakTimeMinutes: {
180172
type: 'integer',
181173
format: 'int32',

apps/api/src/routes/v1/workspaces/policies.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import type { Tx } from "@ctrlplane/db";
21
import type { AsyncTypedHandler } from "@/types/api.js";
2+
import type { Tx } from "@ctrlplane/db";
33
import { ApiError, asyncHandler } from "@/types/api.js";
44
import { Router } from "express";
55
import { v4 as uuidv4 } from "uuid";
66
import { z } from "zod";
77

88
import { and, count, eq } from "@ctrlplane/db";
99
import { db } from "@ctrlplane/db/client";
10-
import * as schema from "@ctrlplane/db/schema";
1110
import { enqueueAllReleaseTargetsDesiredVersion } from "@ctrlplane/db/reconcilers";
11+
import * as schema from "@ctrlplane/db/schema";
1212

1313
const deleteAllRulesForPolicy = async (tx: Tx, policyId: string) => {
1414
await tx
@@ -43,7 +43,6 @@ const deleteAllRulesForPolicy = async (tx: Tx, policyId: string) => {
4343
.where(eq(schema.policyRuleVersionSelector.policyId, policyId));
4444
};
4545

46-
4746
const insertPolicyRules = async (tx: Tx, policyId: string, rules: any[]) => {
4847
for (const rule of rules) {
4948
const ruleId: string = rule.id ?? uuidv4();
@@ -80,8 +79,7 @@ const insertPolicyRules = async (tx: Tx, policyId: string, rules: any[]) => {
8079
rule.environmentProgression.dependsOnEnvironmentSelector,
8180
maximumAgeHours: rule.environmentProgression.maximumAgeHours,
8281
minimumSoakTimeMinutes:
83-
rule.environmentProgression.minimumSoakTimeMinutes ??
84-
rule.environmentProgression.minimumSockTimeMinutes,
82+
rule.environmentProgression.minimumSoakTimeMinutes,
8583
minimumSuccessPercentage:
8684
rule.environmentProgression.minimumSuccessPercentage,
8785
successStatuses: rule.environmentProgression.successStatuses,
@@ -193,7 +191,6 @@ const formatPolicy = (p: PolicyRow) => {
193191
...(r.maximumAgeHours != null && {
194192
maximumAgeHours: r.maximumAgeHours,
195193
}),
196-
minimumSockTimeMinutes: r.minimumSoakTimeMinutes,
197194
minimumSoakTimeMinutes: r.minimumSoakTimeMinutes,
198195
minimumSuccessPercentage: r.minimumSuccessPercentage,
199196
...(r.successStatuses != null && {

apps/api/src/types/openapi.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,12 +1405,6 @@ export interface components {
14051405
* @description Minimum time to wait after the depends on environment is in a success state before the current environment can be deployed. Defaults to 0 if not provided.
14061406
*/
14071407
minimumSoakTimeMinutes?: number;
1408-
/**
1409-
* Format: int32
1410-
* @deprecated
1411-
* @description Use minimumSoakTimeMinutes instead. Minimum time to wait after the depends on environment is in a success state before the current environment can be deployed
1412-
*/
1413-
minimumSockTimeMinutes?: number;
14141408
/**
14151409
* Format: float
14161410
* @default 100

apps/web/app/api/openapi.ts

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,10 +1063,8 @@ export interface components {
10631063
jobAgentConfig?: {
10641064
[key: string]: unknown;
10651065
};
1066-
jobAgentId?: string;
1067-
/** @description CEL expression to match job agents. Defaults to jobAgent.id == "<jobAgentId>" if not provided. */
1066+
/** @description CEL expression to match job agents */
10681067
jobAgentSelector?: string;
1069-
jobAgents?: components["schemas"]["DeploymentJobAgent"][];
10701068
metadata?: {
10711069
[key: string]: string;
10721070
};
@@ -1223,10 +1221,8 @@ export interface components {
12231221
jobAgentConfig: {
12241222
[key: string]: unknown;
12251223
};
1226-
jobAgentId?: string;
12271224
/** @description CEL expression to match job agents */
12281225
jobAgentSelector: string;
1229-
jobAgents?: components["schemas"]["DeploymentJobAgent"][];
12301226
metadata?: {
12311227
[key: string]: string;
12321228
};
@@ -1240,15 +1236,9 @@ export interface components {
12401236
systems: components["schemas"]["System"][];
12411237
};
12421238
DeploymentDependencyRule: {
1243-
/** @description CEL expression to match upstream deployment(s) that must have a successful release before this deployment can proceed. */
1239+
/** @description CEL expression to match upstream deployment(s) that must have a successful release before this deployment can proceed. The expression can reference both deployment properties (deployment.id, deployment.name, deployment.slug, deployment.metadata) and the currently deployed version properties (version.id, version.tag, version.name, version.status, version.metadata, version.createdAt). For example: deployment.name == 'db-migration' && version.tag.startsWith('v2.'). */
12441240
dependsOn: string;
12451241
};
1246-
DeploymentJobAgent: {
1247-
config: components["schemas"]["JobAgentConfig"];
1248-
ref: string;
1249-
/** @description CEL expression to determine if the job agent should be used */
1250-
selector: string;
1251-
};
12521242
DeploymentPlan: {
12531243
id: string;
12541244
/** @enum {string} */
@@ -1264,17 +1254,25 @@ export interface components {
12641254
unsupported?: number;
12651255
};
12661256
DeploymentPlanTarget: {
1267-
/** @description Hash of the rendered output for change detection */
1268-
contentHash?: string;
1269-
/** @description Full rendered output of the currently deployed state */
1270-
current?: string;
12711257
environmentId: string;
12721258
environmentName: string;
1273-
hasChanges?: boolean | null;
1274-
/** @description Full rendered output of the proposed version */
1275-
proposed?: string;
1259+
/** @description True if any result for this target has changes */
1260+
hasChanges: boolean;
12761261
resourceId: string;
12771262
resourceName: string;
1263+
results: components["schemas"]["DeploymentPlanTargetResult"][];
1264+
};
1265+
DeploymentPlanTargetResult: {
1266+
/** @description Hash of the rendered output for change detection */
1267+
contentHash: string;
1268+
/** @description Full rendered output of the currently deployed state */
1269+
current: string;
1270+
hasChanges: boolean;
1271+
id: string;
1272+
/** @description Agent message (e.g. error explanation or summary) */
1273+
message: string;
1274+
/** @description Full rendered output of the proposed version */
1275+
proposed: string;
12781276
/** @enum {string} */
12791277
status: "computing" | "completed" | "errored" | "unsupported";
12801278
};
@@ -1404,10 +1402,9 @@ export interface components {
14041402
maximumAgeHours?: number;
14051403
/**
14061404
* Format: int32
1407-
* @description Minimum time to wait after the depends on environment is in a success state before the current environment can be deployed
1408-
* @default 0
1405+
* @description Minimum time to wait after the depends on environment is in a success state before the current environment can be deployed. Defaults to 0 if not provided.
14091406
*/
1410-
minimumSockTimeMinutes: number;
1407+
minimumSoakTimeMinutes?: number;
14111408
/**
14121409
* Format: float
14131410
* @default 100
@@ -1961,10 +1958,8 @@ export interface components {
19611958
jobAgentConfig?: {
19621959
[key: string]: unknown;
19631960
};
1964-
jobAgentId?: string;
1965-
/** @description CEL expression to match job agents. Defaults to jobAgent.id == "<jobAgentId>" if not provided. */
1961+
/** @description CEL expression to match job agents */
19661962
jobAgentSelector?: string;
1967-
jobAgents?: components["schemas"]["DeploymentJobAgent"][];
19681963
metadata?: {
19691964
[key: string]: string;
19701965
};

docs/policies/environment-progression.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ resource "ctrlplane_policy" "production_soak_requirement" {
187187
188188
environment_progression {
189189
depends_on_environment_selector = "environment.name == 'staging'"
190-
minimum_sock_time_minutes = 60
190+
minimum_soak_time_minutes = 60
191191
}
192192
}
193193
```
@@ -280,7 +280,7 @@ resource "ctrlplane_policy" "production_full_gate" {
280280
environment_progression {
281281
depends_on_environment_selector = "environment.name == 'staging'"
282282
minimum_success_percentage = 100
283-
minimum_sock_time_minutes = 30
283+
minimum_soak_time_minutes = 30
284284
maximum_age_hours = 48
285285
}
286286

docs/policies/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ resource "ctrlplane_policy" "production_policy" {
332332
333333
environment_progression {
334334
depends_on_environment_selector = "environment.name == 'staging'"
335-
minimum_sock_time_minutes = 30
335+
minimum_soak_time_minutes = 30
336336
}
337337
338338
gradual_rollout {

0 commit comments

Comments
 (0)