Skip to content

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

fix(external-infisical): scope daily retry status update to queried IDs and propagate listProjects errors

Igor Correa1d0607246055
diff --git a/backend/src/services/app-connection/external-infisical/external-infisical-connection-service.ts b/backend/src/services/app-connection/external-infisical/external-infisical-connection-service.ts
index e7f06a5fa3..b29efb8c37 100644
--- a/backend/src/services/app-connection/external-infisical/external-infisical-connection-service.ts
+++ b/backend/src/services/app-connection/external-infisical/external-infisical-connection-service.ts
@@ -18,13 +18,8 @@ type TGetAppConnectionFunc = (
export const externalInfisicalConnectionService = (getAppConnection: TGetAppConnectionFunc) => {
const listProjects = async (connectionId: string, actor: OrgServiceActor): Promise<TRemoteProject[]> => {
- try {
- const appConnection = await getAppConnection(AppConnection.ExternalInfisical, connectionId, actor);
- return await listRemoteProjects(appConnection);
- } catch (error) {
- logger.error(error, "Failed to list projects from remote Infisical");
- return [];
- }
+ const appConnection = await getAppConnection(AppConnection.ExternalInfisical, connectionId, actor);
+ return listRemoteProjects(appConnection);
};
const getEnvironmentFolderTree = async (
diff --git a/backend/src/services/secret-sync/secret-sync-queue.ts b/backend/src/services/secret-sync/secret-sync-queue.ts
index 9ba8999182..2e626c7fa4 100644
--- a/backend/src/services/secret-sync/secret-sync-queue.ts
+++ b/backend/src/services/secret-sync/secret-sync-queue.ts
@@ -39,10 +39,7 @@ import {
} from "@app/services/secret-sync/secret-sync-enums";
import { SecretSyncError } from "@app/services/secret-sync/secret-sync-errors";
import { enterpriseSyncCheck, parseSyncErrorMessage, SecretSyncFns } from "@app/services/secret-sync/secret-sync-fns";
-import {
- SECRET_SYNC_DAILY_RETRY_DESTINATIONS,
- SECRET_SYNC_NAME_MAP
-} from "@app/services/secret-sync/secret-sync-maps";
+import { SECRET_SYNC_DAILY_RETRY_DESTINATIONS, SECRET_SYNC_NAME_MAP } from "@app/services/secret-sync/secret-sync-maps";
import {
SecretSyncAction,
SecretSyncStatus,
@@ -1195,9 +1192,7 @@ export const secretSyncQueueFactory = ({
await secretSyncDAL.update(
{
- syncStatus: SecretSyncStatus.Failed,
- isAutoSyncEnabled: true,
- $in: { destination: [...SECRET_SYNC_DAILY_RETRY_DESTINATIONS] }
+ $in: { id: failedSyncs.map((sync) => sync.id) }
},
{ syncStatus: SecretSyncStatus.Pending }
);