Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
address review comments
adilson7434055ff4f1
diff --git a/backend/src/db/migrations/utils/approval-migration.ts b/backend/src/db/migrations/utils/approval-migration.tsindex 237fc08269..fb0d0e80b9 100644--- a/backend/src/db/migrations/utils/approval-migration.ts+++ b/backend/src/db/migrations/utils/approval-migration.ts@@ -140,7 +140,7 @@ export const readLegacyReviews = async (if (!requestIds.length) return [] as TLegacyReview[];const columns = ["id", "requestId", "reviewerUserId", "status", "createdAt", ...(withComment ? ["comment"] : [])];return (await tx(tables.legacyReviewers)- .whereRaw(`"requestId" = ANY(?::uuid[])`, [requestIds])+ .whereIn("requestId", requestIds).select(columns)) as TLegacyReview[];};@@ -154,7 +154,7 @@ export const readApproverGroupMembers = async (tx: Knex, approvers: TLegacyApproexport const readRequestIdsAlreadyOnGlobal = async (tx: Knex, requestIds: string[]) => {if (!requestIds.length) return [] as string[];- return (await tx(TableName.ApprovalRequests).whereRaw(`"id" = ANY(?::uuid[])`, [requestIds]).pluck("id")) as string[];+ return (await tx(TableName.ApprovalRequests).whereIn("id", requestIds).pluck("id")) as string[];};export const checkPolicyEnvironments = (environments: TPolicyEnvironment[], failures: TMigrationFailure[]) => {@@ -559,7 +559,7 @@ export const runLegacyPolicyMigration = async (if (hasPostgresErrorCode(error, DatabaseErrorCode.LockNotAvailable)) {counts.locked += 1;logger.warn(- `${logPrefix}: policy not migrated, it stays on the legacy approval system [policyId=${policyId}] reasons=[locked: its rows were held by another transaction for over ${POLICY_LOCK_TIMEOUT_MS}ms, the next run retries it]`+ `${logPrefix}: policy not migrated, it stays on the legacy approval system [policyId=${policyId}] reasons=[locked: its rows were held by another transaction for over ${POLICY_LOCK_TIMEOUT_MS}ms]`);} else {counts.failedWithError += 1;