fix(large-refs): cleanup based on table read (#4716)

* fix(large-refs): cleanup based on table read

* address comments

* address comments

* bubble up storage ref errors

* cleanup code

* do not attempt blob deletion for infra outage

* cleanup dup helper
This commit is contained in:
Vikhyath Mondreti
2026-05-22 12:08:22 -07:00
committed by GitHub
parent 786c6f0607
commit 209ca5f121
18 changed files with 19392 additions and 135 deletions
+17 -12
View File
@@ -234,20 +234,25 @@ export const dbChainMock = {
* Creates a mock database connection.
*/
export function createMockDb() {
const fromBuilder = () => ({
where: vi.fn(() => ({
limit: vi.fn(() => Promise.resolve([])),
orderBy: vi.fn(() => Promise.resolve([])),
})),
leftJoin: vi.fn(() => ({
where: vi.fn(() => Promise.resolve([])),
})),
innerJoin: vi.fn(() => ({
where: vi.fn(() => Promise.resolve([])),
})),
})
return {
select: vi.fn(() => ({
from: vi.fn(() => ({
where: vi.fn(() => ({
limit: vi.fn(() => Promise.resolve([])),
orderBy: vi.fn(() => Promise.resolve([])),
})),
leftJoin: vi.fn(() => ({
where: vi.fn(() => Promise.resolve([])),
})),
innerJoin: vi.fn(() => ({
where: vi.fn(() => Promise.resolve([])),
})),
})),
from: vi.fn(fromBuilder),
})),
selectDistinct: vi.fn(() => ({
from: vi.fn(fromBuilder),
})),
insert: vi.fn(() => ({
values: vi.fn(() => ({
+23
View File
@@ -157,6 +157,29 @@ export const schemaMock = {
files: 'files',
createdAt: 'createdAt',
},
executionLargeValues: {
key: 'key',
workspaceId: 'workspaceId',
workflowId: 'workflowId',
ownerExecutionId: 'ownerExecutionId',
size: 'size',
createdAt: 'createdAt',
deletedAt: 'deletedAt',
},
executionLargeValueReferences: {
key: 'key',
executionId: 'executionId',
source: 'source',
workspaceId: 'workspaceId',
workflowId: 'workflowId',
createdAt: 'createdAt',
},
executionLargeValueDependencies: {
parentKey: 'parentKey',
childKey: 'childKey',
workspaceId: 'workspaceId',
createdAt: 'createdAt',
},
pausedExecutions: {
id: 'id',
workflowId: 'workflowId',