Skip to content

Check workflow runs#14

Merged
lubianat merged 8 commits intomasterfrom
check_runs_not_commits
Feb 19, 2026
Merged

Check workflow runs#14
lubianat merged 8 commits intomasterfrom
check_runs_not_commits

Conversation

@lubianat
Copy link
Contributor

  • Add checks for workflows run
  • Mock broken status for ansible-role
  • Handle both statuses

Fixes #13

@lubianat
Copy link
Contributor Author

@pwalczysko it is looking like

grafik

There is no preview currently in this repo (pending #9). I'll set that up on mine for now and write the code to do it here.

@pwalczysko
Copy link
Member

@pwalczysko it is looking like
grafik

There is no preview currently in this repo (pending #9). I'll set that up on mine for now and write the code to do it here.

Great, thank you, I like it. This is stricter than before, but it makes perfect sense to me.
Possibly we could compare the scheduled workflow runs and the other ones (like when PR was opened (maybe), or merged). If one is "FAILED" and the other is "SUCCESS" then the "more recent one" wins.

I mean for example the below is (in the sense of what I am suggesting) now green, although the scheduled workflow runs are definitely still FAILED:

Screenshot 2026-02-19 at 11 55 57

But if the above suggestion is too tricky to implement, then better leave it at this very strict state rather than reporting a false "SUCCESS".

Thanks a lot for this, I got quite used to this board.

@lubianat
Copy link
Contributor Author

Thank you, @pwalczysko.

For the snapshot, I am currently mocking the behaviour of the failure, but the new code may be doing what you say, if I got it correctly:

    # Check latest run for active workflows
    latest_per_workflow = {}
    for run in runs:
        workflow_id = run.get("workflow_id")
        if (
            workflow_id not in latest_per_workflow
            and workflow_id in active_workflow_ids
        ):
            latest_per_workflow[workflow_id] = run

The workflow id is the same regardless of triggers (scheduled, push, workflow_dispatch etc), so the code reports the last status.

Currently, it gets a SUCCESS report for ome/ansible-role-omero-server.

If a repository has multiple workflows (each with multiple runs), the dashboard will signal first any FAILURE, then any PENDING and only show SUCCESS if all latest runs look fine.

I've tested it now here and the automatic run updated it from "FAILURE" to "SUCCESS":

grafik

@lubianat
Copy link
Contributor Author

Now, as for behaviour, currently it reports a FAILURE if either the last commit OR the last workflow run failed.

Consider this situation:

  • A commit/merge in example_repo produced FAILURE due to, say, a bug in omero-test-infra

  • A fix was made without new commits to target_repo

  • Last commit will report FAILURE, but the last run of the workflow will report SUCCESS.

I think the dashboard should display SUCCESS in those cases.

So the last run is the source of truth for visual display. I'll add a commit to that.

@pwalczysko
Copy link
Member

I think the dashboard should display SUCCESS in those cases.

Agreed. Thanks.

- Status reports visually the sum of the _workflow_ runs
- Even if there are no _checks_, SUCCESS in workflows like dependabot will produce a green mark.
- A tooltip signals if the workflow_run and last_commit checks differ.
@lubianat lubianat added preview and removed preview labels Feb 19, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

🌐 Preview Deployment

Preview URL: https://ome.github.io/status/pr_preview/14/

Deployment is in progress and should be available shortly.

@lubianat
Copy link
Contributor Author

lubianat commented Feb 19, 2026

@pwalczysko

The PR Preview is available at https://ome.github.io/status/pr_preview/14/

Here is one example of it in action:

grafik

It is giving it a red flag because of:

grafik

It is ~1y old, but it is listed by GitHub as (1) an "active" workflow, for (2) which the latest result was a failure.

Would you benefit from any UI changes or anything different there?

@pwalczysko
Copy link
Member

The PR Preview is available at https://ome.github.io/status/pr_preview/14/

Thanks a lot @lubianat for this nice help on review.
I have gone through the board item by item and made the same conclusion on omero-iviewer. There is a failing check, agree this should be highlighted.

Lgtm

@lubianat lubianat merged commit 15791f8 into master Feb 19, 2026
6 checks passed
github-actions bot added a commit that referenced this pull request Feb 19, 2026
@lubianat lubianat deleted the check_runs_not_commits branch February 19, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misreporting of failed status

2 participants