@forge/tunnel 3.3.7-next.2 → 3.4.0-next.3

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,5 +1,11 @@
1
1
  # @forge/tunnel
2
2
 
3
+ ## 3.4.0-next.3
4
+
5
+ ### Minor Changes
6
+
7
+ - 5298560: Added warning message for functions exceeding invocation timeout limit
8
+
3
9
  ## 3.3.7-next.2
4
10
 
5
11
  ### Patch Changes
@@ -11,7 +11,7 @@ export interface Bundle {
11
11
  bundleFileSourceMapPath: string;
12
12
  bundleFileSourceMap?: string;
13
13
  }
14
- export declare const INVOCATION_TIMEOUT = 10;
14
+ export declare const INVOCATION_TIMEOUT = 25;
15
15
  export declare const MEMORY_LIMIT = 256;
16
16
  export declare class LocalFunctionHost implements FunctionChangeWatcher {
17
17
  private readonly configFile;
@@ -8,7 +8,7 @@ const tmp_1 = tslib_1.__importDefault(require("tmp"));
8
8
  const cli_shared_1 = require("@forge/cli-shared");
9
9
  const runtime_1 = require("@forge/runtime");
10
10
  const util_1 = require("../../util");
11
- exports.INVOCATION_TIMEOUT = 10;
11
+ exports.INVOCATION_TIMEOUT = 25;
12
12
  exports.MEMORY_LIMIT = 256;
13
13
  class LocalFunctionHost {
14
14
  constructor(configFile, logger, snapshot, createSandbox, featureFlags) {
@@ -1 +1 @@
1
- {"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../src/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAKV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,mBAAmB,CAAC;AAG9E,qBAAa,sBAAuB,YAAW,iBAAiB;IAE5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAFT,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;IAG1B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;IAqDhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;6BAEpB,MAAM,KACb,IAAI,CAUL;CACH"}
1
+ {"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../src/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAKV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,mBAAmB,CAAC;AAG9E,qBAAa,sBAAuB,YAAW,iBAAiB;IAE5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAFT,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;IAG1B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;IA2DhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;6BAEpB,MAAM,KACb,IAAI,CAUL;CACH"}
@@ -43,12 +43,16 @@ class LocalInvocationService {
43
43
  ctx: { requestId, traceId: requestId, timeout: interactors_1.INVOCATION_TIMEOUT }
44
44
  });
45
45
  const invocationLimits = (0, runtime_1.perInvocationLimitsTrackerFactory)(xenInvocationRequest);
46
+ const timeout = setTimeout(() => {
47
+ this.logger.warn(cli_shared_1.Text.tunnel.invocationTimeout(interactors_1.INVOCATION_TIMEOUT));
48
+ }, interactors_1.INVOCATION_TIMEOUT * 1000);
46
49
  const { body, metrics, success, error } = await (0, runtime_1.invoke)({
47
50
  sandbox,
48
51
  xenInvocationRequest,
49
52
  invocationLimits,
50
53
  inspector: inspect ? this.inspector : undefined
51
54
  });
55
+ clearTimeout(timeout);
52
56
  const reportMetrics = xenInvocationRequest.isFeatureFlagEnabled(runtime_1.XEN_RUNTIME_SHOULD_REPORT_METRICS);
53
57
  LocalInvocationService.printMetrics(reportMetrics, metrics, this.logger);
54
58
  return reportMetrics ? { body, metrics, success, error } : body;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/tunnel",
3
- "version": "3.3.7-next.2",
3
+ "version": "3.4.0-next.3",
4
4
  "description": "Tunnel functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",