Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Revert "fix(secret-sync): type lock key helper against the sync row"

DimitrisStaratzis7b9da513a2f3
diff --git a/backend/src/services/secret-sync/secret-sync-fns.ts b/backend/src/services/secret-sync/secret-sync-fns.ts
index 848d9025e4..38c19d3247 100644
--- a/backend/src/services/secret-sync/secret-sync-fns.ts
+++ b/backend/src/services/secret-sync/secret-sync-fns.ts
@@ -28,6 +28,7 @@ import {
TPreSaveTransformSyncOptionsFn,
TPreSaveTransformSyncOptionsParams,
TSecretMap,
+ TSecretSync,
TSecretSyncListItem,
TSecretSyncWithCredentials,
TSyncSecretsResult
@@ -756,12 +757,9 @@ const MAX_MESSAGE_LENGTH = 1024;
// Cloudflare Workers variables are written as the Worker's full binding list, so two syncs writing to one
// Worker at the same time would each drop what the other just wrote. Every write job on a Worker shares one
// lock; other destinations only need the per-sync lock.
-export const getSecretSyncWriteLockKeys = (secretSync: {
- id: string;
- destination: string;
- connectionId: string;
- destinationConfig: unknown;
-}) => {
+export const getSecretSyncWriteLockKeys = (
+ secretSync: Pick<TSecretSync, "id" | "destination" | "connectionId" | "destinationConfig">
+) => {
const keys: string[] = [KeyStorePrefixes.SecretSyncLock(secretSync.id)];
if (secretSync.destination === SecretSync.CloudflareWorkers) {