webfactory/create-aws-codedeploy-deployment

UnhandledPromiseRejectionWarning on concurrent deployments

mpdude opened this issue ยท 1 comments

This happened while several workflows were running for deployments.

Workflow 1:

2022-07-01T10:23:36.1875380Z ๐ŸŽ‹ On branch 'master', head commit ...
2022-07-01T10:23:36.1966415Z ๐Ÿ’ก Using appspec.yml -> branch_config 'master' for 'master'
2022-07-01T10:23:36.1967287Z ๐ŸŽณ Using deployment group '...'
2022-07-01T10:23:36.9842514Z โš™๏ธ  Updated deployment group '...'
2022-07-01T10:23:36.9843283Z 
2022-07-01T10:23:38.2323454Z ๐Ÿ”Ž Last attempted deployment was from run number 5, this is run number 8 - proceeding.
2022-07-01T10:23:39.1556959Z (node:1604) UnhandledPromiseRejectionWarning: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
2022-07-01T10:23:39.1558100Z     at Object.exports.createDeployment (/home/runner/work/_actions/webfactory/create-aws-codedeploy-deployment/master/dist/index.js:157:43)
2022-07-01T10:23:39.1558699Z     at processTicksAndRejections (internal/process/task_queues.js:97:5)
2022-07-01T10:23:39.1560649Z (node:1604) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2022-07-01T10:23:39.1564370Z (node:1604) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Workflow 2:

2022-07-01T10:23:34.7799394Z ๐ŸŽ‹ On branch 'master', head commit ...
2022-07-01T10:23:34.7882115Z ๐Ÿ’ก Using appspec.yml -> branch_config 'master' for 'master'
2022-07-01T10:23:34.7882798Z ๐ŸŽณ Using deployment group '...'
2022-07-01T10:23:35.6488998Z โš™๏ธ  Updated deployment group '...'
2022-07-01T10:23:35.6491254Z 
2022-07-01T10:23:37.0387457Z ๐Ÿ”Ž Last attempted deployment was from run number 5, this is run number 9 - proceeding.
2022-07-01T10:23:38.2165169Z ๐Ÿšš๏ธ Created deployment d-P72JNXQBI โ€“ https://console.aws.amazon.com/codesuite/codedeploy/deployments/d-P72JNXQBI?region=eu-central-1
2022-07-01T10:23:38.2165860Z 
2022-07-01T10:23:38.2167636Z 
2022-07-01T10:23:38.2169431Z โฒ  Waiting for deployment d-P72JNXQBI to finish
2022-07-01T10:27:18.3784075Z ๐Ÿฅณ Deployment successful

Merged log lines based in GitHub's timestamps:

2022-07-01T10:23:34.7799394Z Workflow2 ๐ŸŽ‹ On branch 'master', head commit ...
2022-07-01T10:23:34.7882115Z Workflow2 ๐Ÿ’ก Using appspec.yml -> branch_config 'master' for 'master'
2022-07-01T10:23:34.7882798Z Workflow2 ๐ŸŽณ Using deployment group '...'
2022-07-01T10:23:35.6488998Z Workflow2 โš™๏ธ  Updated deployment group '...'
2022-07-01T10:23:35.6491254Z Workflow2
2022-07-01T10:23:36.1875380Z Workflow1 ๐ŸŽ‹ On branch 'master', head commit ...
2022-07-01T10:23:36.1966415Z Workflow1 ๐Ÿ’ก Using appspec.yml -> branch_config 'master' for 'master'
2022-07-01T10:23:36.1967287Z Workflow1 ๐ŸŽณ Using deployment group '...'
2022-07-01T10:23:36.9842514Z Workflow1 โš™๏ธ  Updated deployment group '...'
2022-07-01T10:23:36.9843283Z Workflow1
2022-07-01T10:23:37.0387457Z Workflow2 ๐Ÿ”Ž Last attempted deployment was from run number 5, this is run number 9 - proceeding.
2022-07-01T10:23:38.2165169Z Workflow2 ๐Ÿšš๏ธ Created deployment d-P72JNXQBI โ€“ https://console.aws.amazon.com/codesuite/codedeploy/deployments/d-P72JNXQBI?region=eu-central-1
2022-07-01T10:23:38.2165860Z Workflow2
2022-07-01T10:23:38.2167636Z Workflow2
2022-07-01T10:23:38.2169431Z Workflow2 โฒ  Waiting for deployment d-P72JNXQBI to finish
2022-07-01T10:23:38.2323454Z Workflow1 ๐Ÿ”Ž Last attempted deployment was from run number 5, this is run number 8 - proceeding.
2022-07-01T10:23:39.1556959Z Workflow1 (node:1604) UnhandledPromiseRejectionWarning: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
2022-07-01T10:23:39.1558100Z Workflow1     at Object.exports.createDeployment (/home/runner/work/_actions/webfactory/create-aws-codedeploy-deployment/master/dist/index.js:157:43)
2022-07-01T10:23:39.1558699Z Workflow1     at processTicksAndRejections (internal/process/task_queues.js:97:5)
2022-07-01T10:23:39.1560649Z Workflow1 (node:1604) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2022-07-01T10:23:39.1564370Z Workflow1 (node:1604) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2022-07-01T10:27:18.3784075Z Workflow2 ๐Ÿฅณ Deployment successful

Might be the Race Condition mentioned in the README, although workflow 1 logged the check slightly after workflow 2 had started the deployment.