Scheduling infrastructure for absolutely everyone.
fix test flakes (#25240)
Anik Dhabal Babu5cda123a4c52
diff --git a/.github/actions/cache-db/action.yml b/.github/actions/cache-db/action.ymlindex 7906afed02f..32b9b0c083b 100644--- a/.github/actions/cache-db/action.yml+++ b/.github/actions/cache-db/action.yml@@ -26,7 +26,7 @@ runs:with:path: ${{ inputs.path }}key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}- - run: USE_POOL=true yarn db-seed+ - run: yarn db-seedif: steps.cache-db.outputs.cache-hit != 'true'shell: bash- name: Postgres Dump Backupdiff --git a/apps/api/v1/lib/utils/isAdmin.ts b/apps/api/v1/lib/utils/isAdmin.tsindex 38f3cc30998..1958ee055fc 100644--- a/apps/api/v1/lib/utils/isAdmin.ts+++ b/apps/api/v1/lib/utils/isAdmin.ts@@ -16,13 +16,15 @@ export const isAdminGuard = async (req: NextApiRequest) => {where: {userId: userId,accepted: true,+ role: {+ in: [MembershipRole.OWNER, MembershipRole.ADMIN],+ },team: {isOrganization: true,organizationSettings: {isAdminAPIEnabled: true,},},- OR: [{ role: MembershipRole.OWNER }, { role: MembershipRole.ADMIN }],},select: {team: {diff --git a/packages/prisma/index.ts b/packages/prisma/index.tsindex 6be7cc31648..1c7a844a55d 100644--- a/packages/prisma/index.ts+++ b/packages/prisma/index.ts@@ -8,9 +8,8 @@ import { excludePendingPaymentsExtension } from "./extensions/exclude-pending-paimport { PrismaClient, type Prisma } from "./generated/prisma/client";const connectionString = process.env.DATABASE_URL || "";-const isIntegrationTest = process.env.INTEGRATION_TESTS === "true";const pool =- !isIntegrationTest && (process.env.USE_POOL === "true" || process.env.USE_POOL === "1")+ process.env.USE_POOL === "true" || process.env.USE_POOL === "1"? new Pool({connectionString: connectionString,max: 5,