From 2ce08bbe30f4bbd6525963dfaf7c48af2769bd3d Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Wed, 13 Sep 2017 09:54:19 -0500 Subject: [PATCH] fix: TypeError exception --- docker-compose.yml | 8 ++++---- docker/api/package.json | 2 +- packages/portal-api/lib/watch/machines.js | 4 ++++ packages/portal-api/package.json | 2 +- triton-compose.yml | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 697dcd55..471fe9dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ consul: # it is included here for demo purposes and is not required ############################################################################# prometheus: - image: autopilotpattern/prometheus:1.7.1-r24 + image: autopilotpattern/prometheus:1.7.1-r20 restart: always mem_limit: 1g ports: @@ -46,7 +46,7 @@ prometheus: # FRONTEND ############################################################################# frontend: - image: joyent/copilot-frontend:1.3.4 + image: joyent/copilot-frontend:1.0.0 mem_limit: 512m links: - consul:consul @@ -66,7 +66,7 @@ frontend: # BACKEND ############################################################################# api: - image: joyent/copilot-api:1.8.5 + image: joyent/copilot-api:1.8.6 mem_limit: 512m links: - consul:consul @@ -83,7 +83,7 @@ api: # Docker-compose wrapper # Create _env file from running ./setup.sh compose-api: - image: joyent/copilot-compose:1.1.0 + image: joyent/copilot-compose:1.0.0 links: - consul:consul expose: diff --git a/docker/api/package.json b/docker/api/package.json index 464b0d50..d81c5f07 100644 --- a/docker/api/package.json +++ b/docker/api/package.json @@ -21,7 +21,7 @@ "joi": "^10.6.0", "joyent-cp-gql-schema": "^1.7.0", "piloted": "^3.1.1", - "portal-api": "^1.8.5", + "portal-api": "^1.8.6", "toppsy": "^1.1.0", "triton": "^5.2.0" } diff --git a/packages/portal-api/lib/watch/machines.js b/packages/portal-api/lib/watch/machines.js index 96f80753..8ec64fe1 100644 --- a/packages/portal-api/lib/watch/machines.js +++ b/packages/portal-api/lib/watch/machines.js @@ -341,6 +341,10 @@ module.exports = class MachineWatcher { }; const toBeActiveServiceResolver = (cb) => { + if (!version || !version.plan) { + return cb(); + } + VAsync.forEachParallel({ inputs: version.plan, func: (action, next) => { diff --git a/packages/portal-api/package.json b/packages/portal-api/package.json index 56a6af3a..ee94b202 100644 --- a/packages/portal-api/package.json +++ b/packages/portal-api/package.json @@ -1,6 +1,6 @@ { "name": "portal-api", - "version": "1.8.5", + "version": "1.8.6", "description": "", "main": "./lib/index.js", "scripts": { diff --git a/triton-compose.yml b/triton-compose.yml index e3d68ec0..f4442411 100644 --- a/triton-compose.yml +++ b/triton-compose.yml @@ -81,7 +81,7 @@ frontend: # BACKEND ############################################################################# api: - image: joyent/copilot-api:1.8.5 + image: joyent/copilot-api:1.8.6 mem_limit: 1g expose: - 3000