GSTT-CSC / hazen

Quality assurance framework for Magnetic Resonance Imaging
https://github.com/GSTT-CSC/hazen
Apache License 2.0
22 stars 12 forks source link

Status check applicable to main branch gets stuck on "waiting for status to be reported" #289

Closed heyhaleema closed 1 year ago

heyhaleema commented 1 year ago

Recent PRs seem to consistently have 1 expected check pending which never gets reported, i.e. test:

Screenshot 2022-12-16 at 14 12 22

Screenshot 2022-12-16 at 14 12 13

This doesn't seem to have a source(?) vs. those in the branch protection rules applicable to release/*:

image

The result is we end up bypassing branch protections to merge PRs:

image

tomaroberts commented 1 year ago

I think @laurencejackson said this is a known bug in GitHub?

laurencejackson commented 1 year ago

I remember seeing a post somewhere saying that this was a known issue, but now I've had another look around I think its probably related to the if: github.event.pull_request.base.ref == 'main' statement at the end of the test job in tests_development.yml. This condition evaluates to true when the branch the PR merges into the main branch.

It looks like for whatever reason - when this condition is True and the step runs the result is never returned. This could be an issue with the action (schneegans/dynamic-badges-action@v1.3.0).

I think we should open a new PR to explore this, happy to do this unless someone else is interested?

laurencejackson commented 1 year ago

Sorry, @heyhaleema think I understand what you're saying now. You're right we used to have one 'test' job, but now we test on dev and on release. This meant that 'test' was never run so it couldn't get a status.

I've updated the branch protection rule to use the correctly named tests.