Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion apps/server/src/vcs/GitVcsDriverCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
readonly count: number;
readonly retryAt: number;
readonly detail: string;
readonly cause: GitCommandError | undefined;
}
>();
const statusRemoteRefreshFailureKey = (cacheKey: StatusRemoteRefreshCacheKey) =>
Expand Down Expand Up @@ -3645,7 +3646,10 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
).pipe(
Effect.catchTags({
GitCommandError: (error) =>
Effect.succeed({ unavailable: `Could not list untracked files: ${error.detail}` }),
Effect.succeed({
unavailable: `Could not list untracked files: ${error.detail}`,
cause: error,
}),
}),
);
if ("unavailable" in untracked) return untracked;
Expand Down Expand Up @@ -3769,6 +3773,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
command: "git ls-files",
cwd,
detail: remembered.detail,
...(remembered.cause === undefined ? {} : { cause: remembered.cause }),
});
}
// Empty status can mean untracked files are hidden; retain the full scan.
Expand All @@ -3783,6 +3788,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
(yield* Clock.currentTimeMillis) +
Math.min(UNTRACKED_TOTALS_RETRY_MIN_MS * 2 ** (count - 1), UNTRACKED_TOTALS_RETRY_MAX_MS),
detail: untracked.unavailable,
cause: "cause" in untracked ? untracked.cause : undefined,
});
if (untrackedTotalsFailures.size > STATUS_UPSTREAM_REFRESH_CACHE_CAPACITY) {
const oldestKey = untrackedTotalsFailures.keys().next().value;
Expand All @@ -3793,6 +3799,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
command: "git ls-files",
cwd,
detail: untracked.unavailable,
...("cause" in untracked ? { cause: untracked.cause } : {}),
});
}
untrackedTotalsFailures.delete(cwd);
Expand Down
Loading