Skip to content

Commit 7678870

Browse files
Recover interrupted inventory refreshes
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent b609071 commit 7678870

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/extensions/process-workflow-fleet/fleet-service.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,23 @@ export function createFleetService({ getSession, repositoryRoot }) {
251251
`Unsupported or mismatched state at ${statePath()}.`,
252252
);
253253
}
254+
if (
255+
state.inventoryStatus === "refreshing" &&
256+
!refreshes.has(identity)
257+
) {
258+
return writeState({
259+
...state,
260+
inventoryStatus: "not-refreshed",
261+
generatedAt: null,
262+
error: {
263+
code: "inventory_refresh_interrupted",
264+
message:
265+
"The previous inventory refresh was interrupted. Refresh again.",
266+
},
267+
records: [],
268+
selection: [],
269+
});
270+
}
254271
return state;
255272
} catch (error) {
256273
if (error?.code === "ENOENT") {

0 commit comments

Comments
 (0)