Skip to content

Commit 816da37

Browse files
authored
Merge branch 'main' into cschleiden/user-agent
2 parents 7228c0f + b70dba8 commit 816da37

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/store/workflowRun.ts

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

3535
updateRun(run: model.WorkflowRun) {
36-
if (this._run.updated_at !== run.updated_at) {
37-
// Run has changed, reset jobs. Note: this doesn't work in all cases, there might be race conditions
38-
// where the run update_at field isn't set but the jobs change, but in the vast majority of cases the
39-
// combined status/conclusion of the run is updated whenever a job changes, so this should be good enough
40-
// for now to reduce the # of API calls
36+
if (this._run.status !== "completed" || this._run.updated_at !== run.updated_at) {
37+
// Refresh jobs if the run is not completed or it was updated (i.e. re-run)
38+
// For in-progress runs, we can't rely on updated at to change when jobs change
4139
this._jobs = undefined;
4240
}
4341

0 commit comments

Comments
 (0)