From fc1fba58dca4e52e793e0b193a41921bf871e6d7 Mon Sep 17 00:00:00 2001 From: Calaway Date: Mon, 8 Feb 2021 12:42:38 -0700 Subject: [PATCH 1/3] COBRA-4092: Allow removing a command from a formation --- plugins/ps/index.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/plugins/ps/index.js b/plugins/ps/index.js index ed27888..fe39c55 100755 --- a/plugins/ps/index.js +++ b/plugins/ps/index.js @@ -8,7 +8,7 @@ function format_formation(ps) { } function format_warning(ps, form_dynos) { - return `\n~~~⚠~~~ ${ps.type} dyno type has ${form_dynos.length} dynos, but ${ps.quantity} ${ps.quantity === 1 ? 'has' : 'have'} been requested. + return `\n~~~⚠~~~ ${ps.type} dyno type has ${form_dynos.length} dynos, but ${ps.quantity} ${ps.quantity === 1 ? 'has' : 'have'} been requested. ~~~⚠~~~ It may be scaling, crashing, restarting or deploying.`; } @@ -203,7 +203,7 @@ function update(appkit, args) { } assert.ok(args.app && args.app !== '', 'An application name was not provided.'); assert.ok(args.TYPE, 'No type was specified, this should be "web" if you need a web service, or "worker".'); - if (!args.size && !args.quantity && args.quantity !== 0 && !args.healthcheck && !args.removeHealthcheck && typeof (args.command) === 'undefined' && !args.port) { + if (!args.size && !args.quantity && args.quantity !== 0 && !args.healthcheck && !args.removeHealthcheck && !args.removeCommand && typeof (args.command) === 'undefined' && !args.port) { appkit.terminal.error(new Error('No new changes found for updating dyno formation.')); return; } @@ -226,6 +226,9 @@ function update(appkit, args) { if (args.removeHealthcheck) { payload.removeHealthcheck = true; } + if (args.removeCommand) { + payload['remove-command'] = true; + } const task = appkit.terminal.task(`Updating dyno for app ^^^${args.app}^^^, type **${args.TYPE}**`); task.start(); @@ -497,11 +500,21 @@ module.exports = { string: true, description: 'Healtheck endpoint for checking app readiness (web dyno only, must be valid URI /path)', }, + }; + + const require_formation_update_option = { + ...require_formation_create_option, removeHealthcheck: { alias: 'r', demand: false, description: 'Remove active healthcheck', }, + removeCommand: { + alias: 'x', + demand: false, + boolean: true, + description: 'Remove the set command and default to what is specified in the docker file', + }, }; const require_kill_option = { @@ -569,7 +582,7 @@ module.exports = { appkit.args .command('ps', 'List dynos for an app', require_app_option, list.bind(null, appkit)) .command('ps:create TYPE', 'Create a new dyno', require_formation_create_option, create.bind(null, appkit)) - .command('ps:update TYPE', 'Update dyno settings', require_formation_create_option, update.bind(null, appkit)) + .command('ps:update TYPE', 'Update dyno settings', require_formation_update_option, update.bind(null, appkit)) .command('ps:forward PORT', 'Forward web traffic to specific port', require_app_option, forward.bind(null, appkit)) .command('ps:destroy TYPE', 'Permanently delete a dyno', require_confirm_app_option, destroy.bind(null, appkit)) .command('ps:kill DYNO', 'Send a posix signal to a dyno', require_kill_option, kill.bind(null, appkit)) From 7d7e281e970d54a37936a144099984b38a165a1c Mon Sep 17 00:00:00 2001 From: Calaway Date: Mon, 8 Feb 2021 14:32:13 -0700 Subject: [PATCH 2/3] COBRA-4092: Bump patch version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b628944..c2e2140 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "akkeris", - "version": "3.1.18", + "version": "3.1.19", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6031556..1701856 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "akkeris", - "version": "3.1.18", + "version": "3.1.19", "description": "Akkeris CLI", "main": "aka.js", "scripts": { From 456e33c668c5435ba53a09c1b335874a7d03134a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 22:41:27 +0000 Subject: [PATCH 3/3] Bump semver from 7.3.2 to 7.3.4 Bumps [semver](https://github.com/npm/node-semver) from 7.3.2 to 7.3.4. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v7.3.2...v7.3.4) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c2e2140..f567e4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1180,6 +1180,14 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -1627,9 +1635,12 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } }, "set-blocking": { "version": "2.0.0", @@ -2000,6 +2011,11 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",