@dxos/functions-testing 0.8.4-main.3c1ae3b → 0.8.4-main.937b3ca

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/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@dxos/functions-testing",
3
- "version": "0.8.4-main.3c1ae3b",
3
+ "version": "0.8.4-main.937b3ca",
4
4
  "description": "Functions tests",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "info@dxos.org",
9
13
  "sideEffects": true,
@@ -33,19 +37,18 @@
33
37
  "src"
34
38
  ],
35
39
  "dependencies": {
36
- "@effect/platform": "0.92.1",
37
- "@dxos/async": "0.8.4-main.3c1ae3b",
38
- "@dxos/client": "0.8.4-main.3c1ae3b",
39
- "@dxos/functions": "0.8.4-main.3c1ae3b",
40
- "@dxos/config": "0.8.4-main.3c1ae3b",
41
- "@dxos/echo": "0.8.4-main.3c1ae3b",
42
- "@dxos/functions-runtime": "0.8.4-main.3c1ae3b",
43
- "@dxos/functions-runtime-cloudflare": "0.8.4-main.3c1ae3b",
44
- "@dxos/invariant": "0.8.4-main.3c1ae3b",
45
- "@dxos/log": "0.8.4-main.3c1ae3b",
46
- "@dxos/protocols": "0.8.4-main.3c1ae3b"
40
+ "@effect/platform": "0.93.6",
41
+ "@dxos/async": "0.8.4-main.937b3ca",
42
+ "@dxos/client": "0.8.4-main.937b3ca",
43
+ "@dxos/config": "0.8.4-main.937b3ca",
44
+ "@dxos/functions": "0.8.4-main.937b3ca",
45
+ "@dxos/functions-runtime": "0.8.4-main.937b3ca",
46
+ "@dxos/echo": "0.8.4-main.937b3ca",
47
+ "@dxos/functions-runtime-cloudflare": "0.8.4-main.937b3ca",
48
+ "@dxos/log": "0.8.4-main.937b3ca",
49
+ "@dxos/protocols": "0.8.4-main.937b3ca",
50
+ "@dxos/invariant": "0.8.4-main.937b3ca"
47
51
  },
48
- "devDependencies": {},
49
52
  "publishConfig": {
50
53
  "access": "public"
51
54
  },
@@ -113,7 +113,7 @@ describe.runIf(process.env.DX_TEST_TAGS?.includes('functions-e2e'))('CPU limit',
113
113
  await observeInvocations(space, 100);
114
114
  });
115
115
 
116
- test('break CPU limit through natural exection', { timeout: 520_000 }, async ({ expect }) => {
116
+ test.only('break CPU limit through natural exection', { timeout: 520_000 }, async ({ expect }) => {
117
117
  const { client, space, functionsServiceClient } = await setup(config);
118
118
  const func = await deployFunction(
119
119
  space,
@@ -14,7 +14,7 @@ import { InvocationTraceEndEvent, InvocationTraceStartEvent } from '@dxos/functi
14
14
  import { FunctionsServiceClient } from '@dxos/functions-runtime/edge';
15
15
  import { bundleFunction } from '@dxos/functions-runtime/native';
16
16
  import type { BundleResult } from '@dxos/functions-runtime/native';
17
- import { type FunctionRuntimeKind } from '@dxos/protocols';
17
+ import { ErrorCodec, type FunctionRuntimeKind } from '@dxos/protocols';
18
18
  import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
19
19
 
20
20
  export const writeBundle = (path: string, bundle: BundleResult) => {
@@ -95,7 +95,9 @@ export const observeInvocations = async (space: Space, maxCount: number | null)
95
95
  count: count++,
96
96
  begin: invocation,
97
97
  });
98
- console.log(`${count.toString().padStart(3, ' ')}: BEGIN ${JSON.stringify(invocation.input)}`);
98
+ console.log(
99
+ `${count.toString().padStart(3, ' ')}: BEGIN ${invocation.runtime ?? '(unknown runtime)'} ${JSON.stringify(invocation.input)}`,
100
+ );
99
101
  } else if (Obj.instanceOf(InvocationTraceEndEvent, invocation)) {
100
102
  const data = invocationData.get(invocation.invocationId);
101
103
  if (!data || !!data.end) {
@@ -107,8 +109,8 @@ export const observeInvocations = async (space: Space, maxCount: number | null)
107
109
  console.log(
108
110
  `${data.count.toString().padStart(3, ' ')}: END outcome=${outcome} duration=${data.end.timestamp - data.begin.timestamp}`,
109
111
  );
110
- if (outcome === 'failure') {
111
- console.log(data.end.error?.stack);
112
+ if (outcome === 'failure' && data.end.error) {
113
+ console.error(ErrorCodec.decode(data.end.error));
112
114
  }
113
115
  }
114
116
  }