feat(billing): Convert referral bonuses from monthly recurring to one-time credits, and bump them from 250 -> 500 #5706
ci.yml
on: pull_request
build-and-check
2m 45s
test-integration-packages/billing
1m 1s
test-integration-packages/internal
1m 14s
Matrix: test-integration
Matrix: test
Annotations
7 errors and 2 warnings
|
test-packages/billing
Final attempt failed. Child_process exited with error code 1
|
|
TypeError: db.select({:
packages/billing/src/grant-credits.ts#L53
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy is not a function. (In 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy(desc(schema.creditLedger.expires_at))', 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy' is undefined)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:53:6)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:34:50)
at <anonymous> (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:462:9)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:439:32)
at async triggerMonthlyResetAndGrant (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:432:28)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:515:15)
|
|
TypeError: db.select({:
packages/billing/src/grant-credits.ts#L53
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy is not a function. (In 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy(desc(schema.creditLedger.expires_at))', 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy' is undefined)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:53:6)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:34:50)
at <anonymous> (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:462:9)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:439:32)
at async triggerMonthlyResetAndGrant (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:432:28)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:471:15)
|
|
TypeError: db.select({:
packages/billing/src/grant-credits.ts#L53
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy is not a function. (In 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy(desc(schema.creditLedger.expires_at))', 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy' is undefined)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:53:6)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:34:50)
at <anonymous> (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:462:9)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:439:32)
at async triggerMonthlyResetAndGrant (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:432:28)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:515:15)
|
|
TypeError: db.select({:
packages/billing/src/grant-credits.ts#L53
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy is not a function. (In 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy(desc(schema.creditLedger.expires_at))', 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy' is undefined)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:53:6)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:34:50)
at <anonymous> (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:462:9)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:439:32)
at async triggerMonthlyResetAndGrant (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:432:28)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:471:15)
|
|
TypeError: db.select({:
packages/billing/src/grant-credits.ts#L53
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy is not a function. (In 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy(desc(schema.creditLedger.expires_at))', 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy' is undefined)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:53:6)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:34:50)
at <anonymous> (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:462:9)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:439:32)
at async triggerMonthlyResetAndGrant (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:432:28)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:515:15)
|
|
TypeError: db.select({:
packages/billing/src/grant-credits.ts#L53
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy is not a function. (In 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy(desc(schema.creditLedger.expires_at))', 'db.select({
principal: schema.creditLedger.principal
}).from(schema.creditLedger).where(and(eq(schema.creditLedger.user_id, userId), eq(schema.creditLedger.type, "free"), lte(schema.creditLedger.expires_at, now))).orderBy' is undefined)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:53:6)
at getPreviousFreeGrantAmount (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:34:50)
at <anonymous> (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:462:9)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:439:32)
at async triggerMonthlyResetAndGrant (/home/runner/work/***/***/packages/billing/src/grant-credits.ts:432:28)
at async <anonymous> (/home/runner/work/***/***/packages/billing/src/__***s__/grant-credits.***.ts:471:15)
|
|
test-packages/billing
Attempt 2 failed. Reason: Child_process exited with error code 1
|
|
test-packages/billing
Attempt 1 failed. Reason: Child_process exited with error code 1
|