-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
717 lines (622 loc) · 23.3 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
const core = require('@actions/core');
const fs = require('fs');
const {ECSClient, CreateServiceCommand, DescribeServicesCommand, UpdateServiceCommand, DeleteServiceCommand, waitUntilServicesInactive, ListTasksCommand, DescribeTasksCommand} = require('@aws-sdk/client-ecs');
const _ = require('lodash');
/**
*
* ERRORS
* Provides signals for controlling application behavior.
*
*****************************************************************************************/
/**
* An error type representing a failure to find a Service
* @extends Error
*/
class NotFoundException extends Error {
/**
* @param {String} message Error message
*/
constructor(message) {
super(message);
this.name = 'NotFoundException';
this.message = message;
this.stack = (new Error()).stack;
}
}
/**
* An error type representing a need to recreate a Service
* @extends Error
*/
class Draining extends Error {
/**
* @param {String} message Error message
*/
constructor(message) {
super(message);
this.name = 'Draining';
this.message = message;
this.stack = (new Error()).stack;
}
}
/**
* An error type representing a need to recreate a Service
* @extends Error
*/
class NeedsReplacement extends Error {
/**
* @param {String} message Error message
*/
constructor(message) {
super(message);
this.name = 'NeedsReplacement';
this.message = message;
this.stack = (new Error()).stack;
}
}
/**
*
* PARAMETER CONVERSION
* Converts the supplied (create) parameters into the formats for describe, update, and delete.
*
*****************************************************************************************/
/**
* return only defined properties
* @param {Object} obj
* @return {Object} sans keynames with 'undefined' values'
*/
function omitUndefined(obj) {
return _.pickBy(obj, (value, key) => {
return value !== undefined;
});
}
/**
* Filter parameters according to createService API
* @param {Object} parameters Original parameters
* @return {Object} Filtered parameters
*/
function createInput(parameters) {
return omitUndefined(
{
capacityProviderStrategy: parameters.spec.capacityProviderStrategy,
clientToken: parameters.spec.clientToken,
cluster: parameters.spec.cluster,
deploymentConfiguration: parameters.spec.deploymentConfiguration,
deploymentController: parameters.spec.deploymentController,
desiredCount: parameters.spec.desiredCount,
enableECSManagedTags: parameters.spec.enableECSManagedTags,
enableExecuteCommand: parameters.spec.enableExecuteCommand,
healthCheckGracePeriodSeconds: parameters.spec.healthCheckGracePeriodSeconds,
launchType: parameters.spec.launchType,
loadBalancers: parameters.spec.loadBalancers,
networkConfiguration: parameters.spec.networkConfiguration,
placementConstraints: parameters.spec.placementConstraints,
placementStrategy: parameters.spec.placementStrategy,
platformVersion: parameters.spec.platformVersion,
propagateTags: parameters.spec.propagateTags,
role: parameters.spec.role,
schedulingStrategy: parameters.spec.schedulingStrategy,
serviceName: parameters.spec.serviceName,
serviceRegistries: parameters.spec.serviceRegistries,
tags: parameters.spec.tags,
taskDefinition: parameters.spec.taskDefinition,
},
);
}
/**
* Filter parameters according to describeService API
* @param {Object} parameters Original parameters
* @return {Object} Filtered parameters
*/
function describeInput(parameters) {
return {
cluster: parameters.spec.cluster,
include: ['TAGS'],
services: [parameters.spec.serviceName],
};
}
/**
* Filter parameters according to [@aws-sdk/client-ecs/UpdateServiceCommandInput}](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ecs/interfaces/updateservicecommandinput.html)
* @param {Object} parameters Original parameters
* @return {Object} Filtered parameters
*/
function updateInput(parameters) {
return omitUndefined(
{
capacityProviderStrategy: parameters.spec.capacityProviderStrategy,
cluster: parameters.spec.cluster,
deploymentConfiguration: parameters.spec.deploymentConfiguration,
desiredCount: parameters.spec.desiredCount,
enableExecuteCommand: parameters.spec.enableExecuteCommand,
forceNewDeployment: parameters.forceNewDeployment,
healthCheckGracePeriodSeconds: parameters.spec.healthCheckGracePeriodSeconds,
networkConfiguration: parameters.spec.networkConfiguration,
placementConstraints: parameters.spec.placementConstraints,
placementStrategy: parameters.spec.placementStrategy,
platformVersion: parameters.spec.platformVersion,
service: parameters.spec.serviceName,
taskDefinition: parameters.spec.taskDefinition,
},
);
}
/**
* Filter parameters according to deleteService API
* @param {Object} parameters Original parameters
* @return {Object} Filtered parameters
*/
function deleteInput(parameters) {
return omitUndefined(
{
cluster: parameters.spec.cluster,
service: parameters.spec.serviceName,
force: parameters.forceDelete,
},
);
}
/**
*
* waitUntilDeploymentComplete
*
*****************************************************************************************/
const {WaiterState, checkExceptions, createWaiter} = require('@aws-sdk/util-waiter');
async function checkState(client, parameters) {
const response = await describeService(client, parameters);
// core.debug(`checkState: response: ${JSON.stringify(response)}`);
const remaining = response.deployments[0].desiredCount - response.deployments[0].runningCount;
const state = response.deployments[0].rolloutState;
const reason = response.deployments[0].rolloutStateReason;
core.info(`...${reason}: ${remaining} containers remaining to be created...`);
if (state === 'COMPLETED') {
return {state: WaiterState.SUCCESS, reason};
}
if (state === 'IN_PROGRESS') {
return {state: WaiterState.RETRY, reason};
}
return {state: WaiterState.FAILURE, reason};
};
/**
* Wait for Tasks to become RUNNING.
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
*/
async function waitUntilDeploymentComplete(client, parameters) {
if (parameters.waitUntilDeploymentComplete) {
core.info('...Waiting for tasks to enter a RUNNING state...');
const result = await createWaiter({client, maxWaitTime: 3600, minDelay: 2, maxDelay: 20}, parameters, checkState);
core.info('...all desired instances are running.');
return checkExceptions(result);
}
}
/**
*
* DELETE
*
*****************************************************************************************/
/**
* Wait for Service to become INACTIVE.
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
*/
async function doWaitUntilServiceInactive(client, parameters) {
core.info('...Waiting up to one hour for service to become INACTIVE...');
const result = await waitUntilServicesInactive({client, maxWaitTime: 3600}, describeInput(parameters));
if (result.state === 'SUCCESS') {
core.info('...service is INACTIVE...');
} else {
throw new Error(`Service ${parameters.spec.serviceName} failed to delete: ${JSON.stringify(result)}`);
}
}
/**
* Delete Service or throw an error
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
* @return {Promise} that resolves to {@aws-sdk/client-ecs/CreateServiceCommandOutput}
*/
async function deleteService(client, parameters) {
if (!parameters.forceDelete) {
core.info('Reducing Service\'s desired count to 0');
const updateParameters = {...parameters, spec: {...parameters.spec, desiredCount: 0}};
await updateService(client, updateParameters);
}
const command = new DeleteServiceCommand(deleteInput(parameters));
const response = await client.send(command);
core.info(`Deleted ${parameters.spec.serviceName}.`);
await doWaitUntilServiceInactive(client, parameters);
const found = findServiceInResponse(response, parameters.spec.serviceName, false);
return found;
}
/**
*
* UPDATE
*
*****************************************************************************************/
/**
* Determine the delta between the current and desired Service
* @param {@aws-sdk/client-ecs/Service} currentService Service
* @param {Object} parameters Original parameters
* @return {Object} The proposed input to the updateService command
*/
function whatsTheDiff(currentService, parameters) {
const updateParams = updateInput(parameters);
const difference = {};
Object.keys(updateParams).forEach((key) => {
if (!_.isEqual(currentService[key], updateParams[key])) {
difference[key] = updateParams[key];
}
});
return difference;
}
/**
* Determine if Service needs update
* @param {@aws-sdk/client-ecs/Service} currentService Service
* @param {Object} parameters Original parameters
* @return {Array} [true, updateParameters] if update needed, [false, updateParameters] otherwise
*/
function updateNeeded(currentService, parameters) {
const difference = whatsTheDiff(currentService, parameters);
// True if the Service needs to be updated
// False if the difference is just the 2 idenfitying parameters.
// `cluster` and `service` are given as parameters, but not returned by AWS.
// So these will always be different in that they exist on the right side, but not the left side.
const changes = !_.isEqual(difference, {cluster: parameters.spec.cluster, service: parameters.spec.serviceName});
return [changes, difference];
}
/**
* Determine if update shape is valid according to API constraints found in
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ecs/classes/updateservicecommand.html
* @param {@aws-sdk/client-ecs/Service} currentService Service
* @param {Object} updateParams Parameters describing the update
* @return {Array} [true, []]] if update shape is valid, [false, additionalKeys] otherwise
*/
function isUpdateShapeValid(currentService, updateParams) {
const commonKeys = ['cluster', 'desiredCount', 'enableECSManagedTags', 'enableExecuteCommand', 'forceNewDeployment', 'placementConstraints', 'placementStrategy', 'propagateTags', 'service'];
const ecsAvailableKeys = ['deploymentConfiguration', 'loadBalancers', 'networkConfiguration', 'serviceRegistries', 'taskDefinition'];
const codeDeployAvailableKeys = ['deploymentConfiguration', 'healthCheckGracePeriodSeconds'];
const externalAvailableKeys = ['healthCheckGracePeriodSeconds'];
const deploymentController = currentService.deploymentController;
let additionalKeys;
if (deploymentController == 'CODE_DEPLOY') {
additionalKeys = _.difference(Object.keys(updateParams), commonKeys, codeDeployAvailableKeys);
} else if (deploymentController == 'EXTERNAL') {
additionalKeys = _.difference(Object.keys(updateParams), commonKeys, externalAvailableKeys);
} else {
// Default for undefined deploymentController is 'ECS'
additionalKeys = _.difference(Object.keys(updateParams), commonKeys, ecsAvailableKeys);
}
if (_.isEmpty(additionalKeys)) {
return [true, []];
} else {
return [false, additionalKeys];
}
}
/**
* Update Service or throw an error
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
* @return {Promise} that resolves to {@aws-sdk/client-ecs/CreateServiceCommandOutput}
*/
async function updateService(client, parameters) {
const command = new UpdateServiceCommand(updateInput(parameters));
const response = await client.send(command);
await waitUntilDeploymentComplete(client, parameters);
const found = findServiceInResponse(response, parameters.spec.serviceName);
core.info(`Updated ${parameters.spec.serviceName}.`);
return found;
}
/**
*
* FIND
*
*****************************************************************************************/
function handlefindServiceInResponseErrors(response, serviceName) {
if (hasMissingFailure(response)) {
throw new NotFoundException(`Service ${serviceName} not found.`);
}
if (hasOtherFailures(response)) {
throw new Error(`findServiceInResponse: ${serviceName} has failures. See: ${JSON.stringify(response)}`);
}
}
// Response parsing
/* eslint-disable require-jsdoc */
function findInDescribeServiceCommandOutput(response, serviceName) {
if (response && response.services) {
return response.services.find((service) => service.serviceName === serviceName);
}
return false;
}
// CreateServicesCommandOutput / UpdateServiceCommandOutput / DeleteServiceCommandOutput
function findInCreateServiceCommandOutput(response) {
if (response && response.service) {
return response.service;
}
return false;
}
function hasMissingFailure(response) {
return response.failures && response.failures.find((failure) => failure.reason === 'MISSING');
}
function hasOtherFailures(response) {
return response.failures && response.failures.length > 0;
}
/* eslint-enable require-jsdoc */
/**
* Find Service
* @param {@aws-sdk/client-ecs/DescribeServicesCommandOutput} response Response from DescribeServicesCommand or CreateServicesCommand
* @param {String} serviceName Name of the service
* @param {Boolean} statusCheck Whether to check the status of the service. True by default.
* @return {@aws-sdk/client-ecs/Service} or throw one of [NotFoundException, Draining, Error]
*/
function findServiceInResponse(response, serviceName, statusCheck = true) {
handlefindServiceInResponseErrors(response, serviceName);
let found = findInDescribeServiceCommandOutput(response, serviceName);
if (!found) {
found = findInCreateServiceCommandOutput(response);
}
// If found and we have a status...
if (found && found.status && statusCheck) {
if (found.status === 'ACTIVE') {
return found;
} else if (found.status === 'INACTIVE') {
throw new NotFoundException(`Service ${serviceName} is inactive and should be recreated.`);
} else if (found.status === 'DRAINING') {
throw new Draining('Service is draining and should be recreated.');
} else {
throw new Error(`findServiceInResponse: ${serviceName} has an unexpected status: ${found.status}`);
}
}
// If found and we don't have a status to check...
if (found) {
return found;
}
// Not found...
throw new NotFoundException(`Service ${serviceName} not found.`);
}
/**
* Fetch Service or throw an error
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
* @return {Promise} that resolves to {@aws-sdk/client-ecs/DescribeServiceCommandOutput
*/
async function describeService(client, parameters) {
const command = new DescribeServicesCommand(describeInput(parameters));
const response = await client.send(command);
const found = findServiceInResponse(response, parameters.spec.serviceName);
core.info(`Found ${parameters.spec.serviceName}.`);
return found;
}
/**
*
* CREATE
*
*****************************************************************************************/
/**
* Create Service or throw an error
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
* @return {Promise} that resolves to {@aws-sdk/client-ecs/CreateServiceCommandOutput}
*/
async function createService(client, parameters) {
const command = new CreateServiceCommand(createInput(parameters));
const response = await client.send(command);
await waitUntilDeploymentComplete(client, parameters);
const found = findServiceInResponse(response, parameters.spec.serviceName);
core.info(`...created ${parameters.spec.serviceName}.`);
return found;
}
/**
*
* FIND / CREATE / UPDATE (Logic)
*
*****************************************************************************************/
/**
* Respond to errors from findServiceInResponse.
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
* @param {Error} err Error
* @return {Promise} that resolves to {@aws-sdk/client-ecs/DescribeServiceCommandOutput} or {@aws-sdk/client-ecs/CreateServiceCommandOutput}
*/
async function handlefindCreateOrUpdateServiceErrors(client, parameters, err) {
if (err.name === 'NotFoundException') {
core.info(`Unable to find ${parameters.spec.serviceName}. Creating newly...`);
return await createService(client, parameters);
} else if (err.name === 'Draining') {
core.info(`Service ${parameters.spec.serviceName} is draining. Creating newly after waiting up to an hour for it to enter an INACTIVE state...`);
await doWaitUntilServiceInactive(client, parameters);
core.info('...service is now INACTIVE...');
return await createService(client, parameters);
} else {
throw err;
}
}
/**
* Find or create the Service
* @param {@aws-sdk/client-ecs/ECSClient} client client
* @param {Object} parameters Original parameters
* @return {Promise} that resolves to {@aws-sdk/client-ecs/DescribeServiceCommandOutput} or {@aws-sdk/client-ecs/CreateServiceCommandOutput}
*/
async function findCreateOrUpdateService(client, parameters) {
core.info(`Looking for Service: ${parameters.spec.serviceName}`);
const found = await describeService(client, parameters).catch((err) => {
return handlefindCreateOrUpdateServiceErrors(client, parameters, err);
});
const [changes, updateParams] = updateNeeded(found, parameters);
if (changes) {
const [valid, additionalKeys] = isUpdateShapeValid(found, updateParams);
if (valid) {
core.info(`Found, but update needed. Updating ${parameters.spec.serviceName} with: ${JSON.stringify(updateParams)}`);
return await updateService(client, parameters);
} else {
throw new NeedsReplacement(`The Service needs to be replaced, as the following changes cannot be made: ${JSON.stringify(additionalKeys)}.`);
}
} else {
core.info(`${parameters.spec.serviceName} looks good. No further action needed.`);
return found;
}
}
/**
*
* GITHUB ACTIONS INTERFACE
* - Gets parameters from the user.
* - Posts results as output.
*
*****************************************************************************************/
/**
* @param {Error} err The original error
* @param {String} param The parameter that was being evaluated
* @param {String} s The supplied string
* @return {Error} The Error indicating invalid JSON, if JSON, else err.
*/
function handleGetParameterErrors(err, param, s) {
if (err instanceof SyntaxError) {
return new Error(`Invalid JSON for ${param}: ${err.message}: ${s}`);
} else if (err.code === 'ENOENT') {
return new Error(`Unable to open ${param}: ${err.message}`);
} else {
return err;
}
}
/**
* @param {Object} parameters Parameters
* @return {Object} The same parameters or undefined
*/
function validateParameters(parameters) {
const requiredKeys = ['serviceName'];
if (!parameters.spec) {
throw new Error('Either `spec` or `spec-file` are required.');
}
const containsAllRequiredKeys = requiredKeys.every((key) => Boolean(parameters.spec[key]));
if (!containsAllRequiredKeys) {
throw new Error('Parameters missing from `spec`. Required keys: ' + requiredKeys.join(', '));
}
return parameters;
}
/**
* Fetch parameters pertinent to creating the Service
* @return {Object} parameters
*/
function getParameters() {
const parameters = {
action: core.getInput('action', {required: false}) || 'create', // create or delete
forceNewDeployment: core.getInput('force-new-deployment', {required: false}), // for update only
forceDelete: core.getInput('force-delete', {required: false}), // for delete only
waitUntilDeploymentComplete: core.getInput('wait-until-deployment-complete', {required: false}), // for create or update only
};
specFile = core.getInput('spec-file', {required: false});
if (specFile) {
let specFileData;
try {
fileData = fs.readFileSync(specFile, 'utf8');
specFileData = JSON.parse(fileData);
} catch (err) {
throw handleGetParameterErrors(err, 'spec-file', fileData);
}
Object.assign(parameters, {spec: specFileData});
}
spec = core.getInput('spec', {required: false});
if (spec) {
let specData;
try {
specData = JSON.parse(spec);
} catch (err) {
throw handleGetParameterErrors(err, 'spec', spec);
}
Object.assign(parameters, {spec: Object.assign({}, parameters.spec, specData)});
}
const filteredParams = _.pickBy(
parameters,
(value, key) => {
return value !== '';
},
);
return validateParameters(filteredParams);
}
/**
* Posts the results of the action to GITHUB_ENV
* @param {@aws-sdk/client-ecs/Service} service Service
*/
function postToGithub(service) {
const arn = service.serviceArn;
if (arn) {
core.info('ARN found, created, updated, or deleted: ' + arn);
core.setOutput('service', JSON.stringify(service));
core.setOutput('arn', arn);
} else {
throw new Error('Unable to determine ARN');
}
}
/**
*
* ENTRYPOINT
*
*****************************************************************************************/
/**
* Executes the action
* @return {Promise} that resolves to {@aws-sdk/client-ecs/DescribeServiceCommandOutput} or {@aws-sdk/client-ecs/CreateServiceCommandOutput}
*/
async function run() {
const client = new ECSClient({
customUserAgent: 'amazon-ecs-service-for-github-actions',
});
const plugin = {
applyToStack: (stack) => {
// Middleware added to mark start and end of an complete API call.
stack.add(
(next, context) => async (args) => {
const start = process.hrtime.bigint();
core.debug(`${context.commandName} to ${context.clientName} sending: ${JSON.stringify(args)}`);
const result = await next(args);
const end = process.hrtime.bigint();
// core.debug(`${context.commandName} to ${context.clientName} received: ${JSON.stringify(result.output)}`);
core.debug(`API call round trip uses ${Number(end - start) / 1_000_000} milliseconds`);
return result;
},
{tags: ['ROUND_TRIP']},
);
},
};
client.middlewareStack.use(plugin);
// Get input parameters
const parameters = getParameters();
let service;
if (parameters.action === 'create') {
core.info('Creating / Updating Service...');
service = await findCreateOrUpdateService(client, parameters);
} else if (parameters.action === 'delete') {
core.info('Deleting Service...');
service = await deleteService(client, parameters);
}
core.info('...done.');
postToGithub(service);
return service;
}
/* istanbul ignore next */
if (require.main === module) {
run().catch((err) => {
core.debug(`Received error: ${JSON.stringify(err)}`);
const httpStatusCode = err.$metadata ? err.$metadata.httpStatusCode : undefined;
core.setFailed(`${err.name} (Status code: ${httpStatusCode}): ${err.message}`);
core.debug(err.stack);
process.exit(1);
});
}
/* For testing */
module.exports = {
createInput,
createService,
deleteInput,
deleteService,
describeInput,
describeService,
findCreateOrUpdateService,
findServiceInResponse,
getParameters,
isUpdateShapeValid,
NeedsReplacement,
NotFoundException,
omitUndefined,
postToGithub,
run,
updateInput,
updateNeeded,
updateService,
waitUntilDeploymentComplete,
whatsTheDiff,
};