fix(snapshot): changed insert to upsert when concurrent identical child workflows are running #10280
ci.yml
on: pull_request
Detect Version
0s
Test and Build
/
Test and Build
2m 1s
Check Docs Changes
0s
Matrix: Build AMD64
Matrix: Build ARM64 (GHCR Only)
Process Docs
/
Process Documentation Embeddings
Matrix: Create GHCR Manifests
Create GitHub Release
Annotations
7 errors and 3 warnings
|
Test and Build / Test and Build
Process completed with exit code 1.
|
|
lib/logs/execution/snapshot/service.test.ts > SnapshotService > createSnapshotWithDeduplication > should always call insert, never a separate select for deduplication:
apps/sim/lib/logs/execution/snapshot/service.ts#L41
Error: [vitest] No "workflowExecutionSnapshots" export is defined on the "@sim/db/schema" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("@sim/db/schema"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ SnapshotService.createSnapshotWithDeduplication lib/logs/execution/snapshot/service.ts:41:15
❯ lib/logs/execution/snapshot/service.test.ts:528:21
|
|
lib/logs/execution/snapshot/service.test.ts > SnapshotService > createSnapshotWithDeduplication > should pass state_data in the ON CONFLICT SET clause:
apps/sim/lib/logs/execution/snapshot/service.ts#L41
Error: [vitest] No "workflowExecutionSnapshots" export is defined on the "@sim/db/schema" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("@sim/db/schema"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ SnapshotService.createSnapshotWithDeduplication lib/logs/execution/snapshot/service.ts:41:15
❯ lib/logs/execution/snapshot/service.test.ts:502:21
|
|
lib/logs/execution/snapshot/service.test.ts > SnapshotService > createSnapshotWithDeduplication > should not throw on concurrent inserts with the same hash:
apps/sim/lib/logs/execution/snapshot/service.ts#L41
Error: [vitest] No "workflowExecutionSnapshots" export is defined on the "@sim/db/schema" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("@sim/db/schema"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ SnapshotService.createSnapshotWithDeduplication lib/logs/execution/snapshot/service.ts:41:15
❯ lib/logs/execution/snapshot/service.test.ts:468:17
|
|
lib/logs/execution/snapshot/service.test.ts > SnapshotService > createSnapshotWithDeduplication > should detect reused snapshot when returned id differs from generated id:
apps/sim/lib/logs/execution/snapshot/service.ts#L41
Error: [vitest] No "workflowExecutionSnapshots" export is defined on the "@sim/db/schema" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("@sim/db/schema"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ SnapshotService.createSnapshotWithDeduplication lib/logs/execution/snapshot/service.ts:41:15
❯ lib/logs/execution/snapshot/service.test.ts:429:36
|
|
lib/logs/execution/snapshot/service.test.ts > SnapshotService > createSnapshotWithDeduplication > should use upsert to insert a new snapshot:
apps/sim/lib/logs/execution/snapshot/service.ts#L41
Error: [vitest] No "workflowExecutionSnapshots" export is defined on the "@sim/db/schema" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("@sim/db/schema"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ SnapshotService.createSnapshotWithDeduplication lib/logs/execution/snapshot/service.ts:41:15
❯ lib/logs/execution/snapshot/service.test.ts:392:36
|
|
Test and Build / Test and Build
sim#test: command (/home/runner/_work/sim/sim/apps/sim) /home/runner/.bun/bin/bun run test exited (1)
|
|
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
|
|
Test and Build / Test and Build
- Step: unknown (failed)
|
|
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps
|