@adobe/helix-deploy 12.0.5 → 12.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [12.0.6](https://github.com/adobe/helix-deploy/compare/v12.0.5...v12.0.6) (2024-08-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * AWS Lambda not ready for updates fixes [#727](https://github.com/adobe/helix-deploy/issues/727) ([#728](https://github.com/adobe/helix-deploy/issues/728)) ([9810e3c](https://github.com/adobe/helix-deploy/commit/9810e3c207300c69e143cd6927a7ce915d5dd078))
7
+
1
8
  ## [12.0.5](https://github.com/adobe/helix-deploy/compare/v12.0.4...v12.0.5) (2024-07-31)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-deploy",
3
- "version": "12.0.5",
3
+ "version": "12.0.6",
4
4
  "description": "Library and Commandline Tools to build and deploy OpenWhisk Actions",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/adobe/helix-deploy#readme",
@@ -12,6 +12,7 @@
12
12
  /* eslint-disable no-await-in-loop,no-restricted-syntax */
13
13
  import chalk from 'chalk-template';
14
14
  import processQueue from '@adobe/helix-shared-process-queue';
15
+ import { promisify } from 'util';
15
16
 
16
17
  import {
17
18
  DeleteObjectCommand,
@@ -57,6 +58,8 @@ import BaseDeployer from './BaseDeployer.js';
57
58
  import ActionBuilder from '../ActionBuilder.js';
58
59
  import AWSConfig from './AWSConfig.js';
59
60
 
61
+ const sleep = promisify(setTimeout);
62
+
60
63
  const API_GW_NAME_DEFAULT = 'API Managed by Helix Deploy';
61
64
 
62
65
  export default class AWSDeployer extends BaseDeployer {
@@ -991,7 +994,8 @@ export default class AWSDeployer extends BaseDeployer {
991
994
  }
992
995
 
993
996
  async checkFunctionReady(arn) {
994
- let tries = 3;
997
+ let tries = 6;
998
+ let wait = 1500;
995
999
  while (tries > 0) {
996
1000
  try {
997
1001
  tries -= 1;
@@ -1006,9 +1010,8 @@ export default class AWSDeployer extends BaseDeployer {
1006
1010
  return;
1007
1011
  }
1008
1012
  // eslint-disable-next-line no-await-in-loop
1009
- await new Promise((resolve) => {
1010
- setTimeout(resolve, 1500);
1011
- });
1013
+ await sleep(wait);
1014
+ wait *= 2;
1012
1015
  } catch (e) {
1013
1016
  this.log.error(chalk`{red error}: error checking function state`);
1014
1017
  throw e;