feat(billing): use advisory locks for credit operations #5522
ci.yml
on: push
build-and-check
2m 30s
test-integration-packages/billing
1m 6s
Matrix: test-integration
Matrix: test
Annotations
20 errors and 4 warnings
|
TypeError: undefined is not an object (evaluating 'result.autoTopupEnabled'):
packages/billing/src/__tests__/grant-credits.test.ts#L159
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:159:16)
|
|
TypeError: undefined is not an object (evaluating 'result.autoTopupEnabled'):
packages/billing/src/__tests__/grant-credits.test.ts#L137
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:137:16)
|
|
TypeError: undefined is not an object (evaluating 'result.autoTopupEnabled'):
packages/billing/src/__tests__/grant-credits.test.ts#L114
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:114:16)
|
|
error::
packages/billing/src/__tests__/org-billing.test.ts#L288
Expected promise that resolves
Received promise that rejected: Promise { <rejected> }
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/org-billing.***.ts:288:18)
|
|
error::
packages/billing/src/__tests__/org-billing.test.ts#L255
Expected promise that resolves
Received promise that rejected: Promise { <rejected> }
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/org-billing.***.ts:255:18)
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/org-billing.***.ts:238:51)
|
|
TypeError: undefined is not an object (evaluating 'result.consumed'):
packages/billing/src/org-billing.ts#L314
at consumeOrganizationCredits (/home/runner/work/***/***/packages/billing/src/org-billing.ts:314:24)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/org-billing.***.ts:226:28)
|
|
TypeError: undefined is not an object (evaluating 'result.quotaResetDate'):
packages/billing/src/__tests__/grant-credits.test.ts#L201
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:201:16)
|
|
TypeError: undefined is not an object (evaluating 'result.autoTopupEnabled'):
packages/billing/src/__tests__/grant-credits.test.ts#L159
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:159:16)
|
|
TypeError: undefined is not an object (evaluating 'result.autoTopupEnabled'):
packages/billing/src/__tests__/grant-credits.test.ts#L137
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:137:16)
|
|
TypeError: undefined is not an object (evaluating 'result.autoTopupEnabled'):
packages/billing/src/__tests__/grant-credits.test.ts#L114
at <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:114:16)
|
|
error: Failed query: insert into "credit_ledger" ("operation_id":
node_modules/drizzle-orm/pg-core/session.js#L41
params: parallel-user1-grant,advisory-lock-***-user-1,100,100,free,Advisory lock integration *** grant,10,2026-02-22T01:03:43.964Z,2026-01-03T01:03:43.964Z,,parallel-user2-grant,advisory-lock-***-user-2,100,100,free,Advisory lock integration *** grant,10,2026-02-22T01:03:43.964Z,2026-01-03T01:03:43.964Z,
at queryWithCache (/home/runner/work/***/***/node_modules/drizzle-orm/pg-core/session.js:41:15)
|
|
error:
packages/internal/internal:shared#L56
at new NodeAggregateError (internal:shared:56:10)
at internalConnectMultiple (node:net:1081:40)
at afterConnectMultiple (node:net:1171:30)
at connectError (node:net:350:48)
|
|
error: Failed query: delete from "credit_ledger" where "credit_ledger"."user_id" = $1:
node_modules/drizzle-orm/pg-core/session.js#L41
params: advisory-lock-***-user-1
at queryWithCache (/home/runner/work/***/***/node_modules/drizzle-orm/pg-core/session.js:41:15)
|
|
error:
packages/internal/internal:shared#L56
at new NodeAggregateError (internal:shared:56:10)
at internalConnectMultiple (node:net:1081:40)
at afterConnectMultiple (node:net:1171:30)
at connectError (node:net:350:48)
|
|
error: Failed query: insert into "credit_ledger" ("operation_id":
node_modules/drizzle-orm/pg-core/session.js#L41
params: rapid-fire-grant,advisory-lock-***-user-1,1000,1000,free,Advisory lock integration *** grant,10,2026-02-22T01:03:43.959Z,2026-01-03T01:03:43.959Z,
at queryWithCache (/home/runner/work/***/***/node_modules/drizzle-orm/pg-core/session.js:41:15)
|
|
error:
packages/internal/internal:shared#L56
at new NodeAggregateError (internal:shared:56:10)
at internalConnectMultiple (node:net:1081:40)
at afterConnectMultiple (node:net:1171:30)
at connectError (node:net:350:48)
|
|
error: Failed query: delete from "credit_ledger" where "credit_ledger"."user_id" = $1:
node_modules/drizzle-orm/pg-core/session.js#L41
params: advisory-lock-***-user-1
at queryWithCache (/home/runner/work/***/***/node_modules/drizzle-orm/pg-core/session.js:41:15)
|
|
error:
packages/internal/internal:shared#L56
at new NodeAggregateError (internal:shared:56:10)
at internalConnectMultiple (node:net:1081:40)
at afterConnectMultiple (node:net:1171:30)
at connectError (node:net:350:48)
|
|
error: Failed query: insert into "credit_ledger" ("operation_id":
node_modules/drizzle-orm/pg-core/session.js#L41
params: concurrent-consume-grant,advisory-lock-***-user-1,100,100,free,Advisory lock integration *** grant,10,2026-02-22T01:03:43.953Z,2026-01-03T01:03:43.953Z,
at queryWithCache (/home/runner/work/***/***/node_modules/drizzle-orm/pg-core/session.js:41:15)
|
|
error:
packages/internal/internal:shared#L56
at new NodeAggregateError (internal:shared:56:10)
at internalConnectMultiple (node:net:1081:40)
at afterConnectMultiple (node:net:1171:30)
at connectError (node:net:350:48)
|
|
test-packages/billing
Attempt 2 failed. Reason: Child_process exited with error code 123
|
|
test-packages/billing
Attempt 1 failed. Reason: Child_process exited with error code 123
|
|
test-integration-packages/internal
Attempt 2 failed. Reason: Child_process exited with error code 123
|
|
test-integration-packages/internal
Attempt 1 failed. Reason: Child_process exited with error code 123
|