Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/api/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,6 @@
"type": "integer"
},
"minimumSuccessPercentage": {
"default": 100,
"format": "float",
"maximum": 100,
"minimum": 0,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/openapi/schemas/policies.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ local openapi = import '../lib/openapi.libsonnet';
description: 'CEL expression to match the environment(s) that must have a successful release before this environment can proceed.',
},

minimumSuccessPercentage: { type: 'number', format: 'float', minimum: 0, maximum: 100, default: 100 },
minimumSuccessPercentage: { type: 'number', format: 'float', minimum: 0, maximum: 100 },
successStatuses: { type: 'array', items: openapi.schemaRef('JobStatus') },
Comment on lines 186 to 188

minimumSoakTimeMinutes: {
Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/routes/v1/workspaces/policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ const formatPolicy = (p: PolicyRow) => {
maximumAgeHours: r.maximumAgeHours,
}),
minimumSoakTimeMinutes: r.minimumSoakTimeMinutes,
minimumSuccessPercentage: r.minimumSuccessPercentage,
...(r.minimumSuccessPercentage != null && {
minimumSuccessPercentage: r.minimumSuccessPercentage,
}),
...(r.successStatuses != null && {
successStatuses: r.successStatuses,
}),
Expand Down
7 changes: 2 additions & 5 deletions apps/api/src/types/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1493,11 +1493,8 @@ export interface components {
* @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.
*/
minimumSoakTimeMinutes?: number;
/**
* Format: float
* @default 100
*/
minimumSuccessPercentage: number;
/** Format: float */
minimumSuccessPercentage?: number;
/**
* @description If true, jobs must also have passed verification to count toward the success percentage
* @default false
Expand Down
Loading
Loading