Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit b595b6c

Browse files
committed
De-duplicate list of open app ports
This should fix rolling deployments on Windows [#172811099](https://www.pivotaltracker.com/story/show/172811099) Authored-by: Chris Selzo <cselzo@pivotal.io>
1 parent 3a3c8f7 commit b595b6c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/cloud_controller/diego/protocol/container_network_info.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def to_h
2020
'app_id' => app.guid,
2121
'space_id' => app.space.guid,
2222
'org_id' => app.organization.guid,
23-
'ports' => app.processes.map(&:open_ports).flatten.sort.join(','),
23+
'ports' => app.processes.map(&:open_ports).flatten.sort.uniq.join(','),
2424
'container_workload' => container_workload,
2525
},
2626
}

spec/unit/lib/cloud_controller/diego/protocol/container_network_info_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class Protocol
66
RSpec.describe ContainerNetworkInfo do
77
let(:app) { AppModel.make }
88
let!(:web_process) { ProcessModel.make(app: app, type: 'web') }
9+
let!(:deploying_web_process) { ProcessModel.make(app: app, type: 'web') }
910
let!(:other_process) { ProcessModel.make(app: app, ports: [8765], type: 'meow') }
1011
let!(:no_exposed_port_process) { ProcessModel.make(app: app, type: 'woof') }
1112
let!(:docker_process) { ProcessModelFactory.make(app: app, type: 'docker', ports: [1111, 2222]) }

0 commit comments

Comments
 (0)