webfactory / create-aws-codedeploy-deployment

Action to create AWS CodeDeploy deployments from GitHub Actions workflows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnhandledPromiseRejectionWarning on concurrent deployments

mpdude opened this issue Β· 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.