Skip to content

Commit ba66672

Browse files
committed
Fix #229: Force job refresh on run update and add logging
1 parent decdefa commit ba66672

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/store/store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export class RunStore extends EventEmitter<RunStoreEvent> {
8383
});
8484

8585
const run = result.data;
86+
logDebug("Polled run:", run.id, "Status:", run.status, "Conclusion:", run.conclusion);
8687
this.addRun(updater.repoContext, run);
8788

8889
if (run.status === "completed" || run.status === "cancelled" || run.status === "failure" || run.status === "success" || run.status === "skipped" || run.status === "timed_out") {

src/store/workflowRun.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ abstract class WorkflowRunBase {
3535
}
3636

3737
updateRun(run: model.WorkflowRun) {
38-
if (this._run.status !== "completed" || this._run.updated_at !== run.updated_at) {
39-
// Refresh jobs if the run is not completed or it was updated (i.e. re-run)
40-
// For in-progress runs, we can't rely on updated at to change when jobs change
41-
this._jobs = undefined;
42-
}
38+
// Always clear jobs cache when updating run to ensure we get latest job status
39+
// This is critical for polling to work correctly for in-progress runs
40+
this._jobs = undefined;
4341

4442
this._run = run;
4543
}

0 commit comments

Comments
 (0)