Skip to content

Commit dfff017

Browse files
committed
Remove todos and tidying
1 parent cbc0999 commit dfff017

File tree

7 files changed

+5
-10
lines changed

7 files changed

+5
-10
lines changed

app/models/runtime/deployment_model.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def before_update
9090
super
9191
set_status_updated_at
9292
end
93-
# TODO: documentation
9493

9594
def before_create
9695
self.canary_current_step = 1 if strategy == DeploymentModel::CANARY_STRATEGY

docs/v3/source/includes/resources/deployments/_create.md.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Name | Type | Description | Default
7878
**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 |
7979
**strategy** | _string_ | The strategy to use for the deployment | `rolling`
8080
**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)_ | Canary steps to use for the deployment An array of canary steps to use for the deployment
81+
**options.canary.steps** | _array of [canary step objects](#canary-steps-object)_ | An array of canary steps to use for the deployment
8282
**metadata.labels** | [_label object_](#labels) | Labels applied to the deployment
8383
**metadata.annotations** | [_annotation object_](#annotations) | Annotations applied to the deployment
8484

docs/v3/source/includes/resources/deployments/_object.md.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Name | Type | Description
1616
**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>
1717
**status.details.last_successful_healthcheck** | _[timestamp](#timestamps)_ | Timestamp of the last successful healthcheck
1818
**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 deployments with strategy 'canary'. (experimental)
20-
**status.canary.steps.total** | _integer_ | The total number of canary steps. Only available deployments with strategy 'canary'. (experimental)
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)
2121
**strategy** | _string_ | Strategy used for the deployment; supported strategies are `rolling` and `canary` (experimental)
2222
**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 deployments with strategy 'canary'. (experimental)
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)
2424
**droplet.guid** | _string_ | The droplet guid that the deployment is transitioning the app to
2525
**previous_droplet.guid** | _string_ | The app's [current droplet guid](#get-current-droplet-association-for-an-app) before the deployment was created
2626
**new_processes** | _array_ | List of processes created as part of the deployment

lib/cloud_controller/deployment_updater/actions/scale.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def call
2323
up_scaler = UpScaler.new(deployment, logger, interim_desired_instance_count, instance_count_summary)
2424

2525
deployment.db.transaction do
26-
# TODO: write scale test for prepaused state
2726
return unless [DeploymentModel::DEPLOYING_STATE, DeploymentModel::PREPAUSED_STATE].include?(deployment.lock!.state)
2827
return unless up_scaler.can_scale? || down_scaler.can_downscale?
2928

lib/cloud_controller/deployment_updater/updater.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def scale
2222

2323
def canary
2424
with_error_logging('error-canarying-deployment') do
25-
# TODO: do we need to pass in deployment.original_web_process_instance_count + 1 if there is a single canary instance?
2625
finished = Actions::Scale.new(deployment, logger, deployment.canary_total_instances, deployment.current_canary_instance_target).call
2726
if finished
2827
deployment.update(
@@ -33,7 +32,6 @@ def canary
3332
)
3433
logger.info("paused-canary-deployment-for-#{deployment.guid}")
3534
end
36-
# Actions::Canary.new(deployment, logger).call
3735
logger.info("ran-canarying-deployment-for-#{deployment.guid}")
3836
end
3937
end

spec/unit/messages/deployment_create_message_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ module VCAP::CloudController
271271
expect(message.errors[:'options.canary.steps.instance_weight']).to include('must be sorted in ascending order')
272272
end
273273

274-
it 'errors if any instance_weights are not a non-integer numeric' do
274+
it 'errors if any instance_weights are a non-integer numeric' do
275275
body['options'] = { canary: { steps: [{ instance_weight: 2 }, { instance_weight: 25.0 }] } }
276276
message = DeploymentCreateMessage.new(body)
277277
expect(message).not_to be_valid

spec/unit/messages/validators_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# require 'spec_helper'
21
require 'lightweight_spec_helper'
32
require 'messages/validators'
43
require 'messages/base_message'

0 commit comments

Comments
 (0)