You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds Canary steps
* Storing json in the DB as the overhead of a new canary_steps table seemed to have little benefit. We can always migrate in the future if required.
Resolves#4172
---------
Co-authored-by: Seth Boyles <[email protected]>
errors.add(:'options.canary.steps.instance_weight','must be an Integer between 1-100 (inclusive)')
115
+
return
116
+
end
117
+
118
+
errors.add(:'options.canary.steps.instance_weight','must be an Integer between 1-100 (inclusive)')ifsteps.any?{ |step| (1..100).exclude?(step[:instance_weight])}
119
+
120
+
weights=steps.pluck(:instance_weight)
121
+
returnunlessweights.sort != weights
122
+
123
+
errors.add(:'options.canary.steps.instance_weight','must be sorted in ascending order')
Copy file name to clipboardexpand all lines: docs/v3/source/includes/resources/deployments/_create.md.erb
+1
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,7 @@ Name | Type | Description | Default
78
78
**revision**<sup>[1]</sup> | _object_ | The [revision](#revisions) whose droplet to deploy for the app; this will update the app's [current droplet](#get-current-droplet-association-for-an-app) to this droplet |
79
79
**strategy** | _string_ | The strategy to use for the deployment | `rolling`
80
80
**options.max_in_flight** | _integer_ | The maximum number of new instances to deploy simultaneously | 1
81
+
**options.canary.steps** | _array of [canary step objects](#canary-steps-object)_ | An array of canary steps to use for the deployment
81
82
**metadata.labels** | [_label object_](#labels) | Labels applied to the deployment
82
83
**metadata.annotations** | [_annotation object_](#annotations) | Annotations applied to the deployment
Copy file name to clipboardexpand all lines: docs/v3/source/includes/resources/deployments/_object.md.erb
+9-1
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,12 @@ Name | Type | Description
15
15
**status.value** | _string_ | The current status of the deployment; valid values are `ACTIVE` (meaning in progress) and `FINALIZED` (meaning finished, either successfully or not)
16
16
**status.reason** | _string_ | The reason for the status of the deployment;<br>following list represents valid values:<br>1. If **status.value** is `ACTIVE`<br>- `DEPLOYING`<br>- `PAUSED` (only valid for canary deployments) <br>- `CANCELING`<br>2. If **status.value** is `FINALIZED`<br>- `DEPLOYED`<br>- `CANCELED`<br>- `SUPERSEDED` (another deployment created for app before completion)<br>
17
17
**status.details.last_successful_healthcheck** | _[timestamp](#timestamps)_ | Timestamp of the last successful healthcheck
18
-
**status.details.last_status_change** | _[timestamp](#timestamps)_ | Timestamp of last change to status.value or status.reason
18
+
**status.details.last_status_change** | _[timestamp](#timestamps)_ | Timestamp of last change to status.value or status.reason**status.details.last_status_change** | _[timestamp](#timestamps)_ | Timestamp of last change to status.value or status.reason
19
+
**status.canary.steps.current** | _integer_ | The current canary step. Only available for deployments with strategy 'canary'. (experimental)
20
+
**status.canary.steps.total** | _integer_ | The total number of canary steps. Only available for deployments with strategy 'canary'. (experimental)
19
21
**strategy** | _string_ | Strategy used for the deployment; supported strategies are `rolling` and `canary` (experimental)
20
22
**options.max_in_flight** | _integer_ | The maximum number of new instances to deploy simultaneously
23
+
**options.canary.steps** | _array of [canary step objects](#canary-steps-object)_ | Canary steps to use for the deployment. Only available for deployments with strategy 'canary'. (experimental)
21
24
**droplet.guid** | _string_ | The droplet guid that the deployment is transitioning the app to
22
25
**previous_droplet.guid** | _string_ | The app's [current droplet guid](#get-current-droplet-association-for-an-app) before the deployment was created
23
26
**new_processes** | _array_ | List of processes created as part of the deployment
@@ -26,3 +29,8 @@ Name | Type | Description
26
29
**metadata.labels** | [_label object_](#labels) | Labels applied to the deployment
27
30
**metadata.annotations** | [_annotation object_](#annotations) | Annotations applied to the deployment
28
31
**links** | [_links object_](#links) | Links to related resources
32
+
33
+
34
+
#### Canary steps object
35
+
36
+
**instance_weight** | _integer_ | The percentage of instances to be deployed as part of the canary process in this step (experimental)
0 commit comments