Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite the required checks process to look for check runs of the commit #473

Merged
merged 1 commit into from Oct 17, 2023

Conversation

jgiannuzzi
Copy link
Member

@jgiannuzzi jgiannuzzi commented Oct 17, 2023

We were looking for the corresponding workflow runs, which could cause all kinds of race conditions. We now always get the latest info from the API instead of relying on what we received, which might be out of date by the time we actually run.

Here is the example of a dependabot pull request, which essentially creates 2 different runs (one for the pull_request event and one for the push event). The pull_request event results in a skipped run, and the push event eventually succeeds.

  1. when the check-required.yml workflow runs for the first time, its summary looks like this:
    image
  2. the check it creates looks like this:
    image
  3. when the push event run eventually succeeds, the check-required.yml workflow run that gets triggered looks like this:
    image
  4. and the resulting check looks like this:
    image
  5. finally, this is what the check looks like in the pull request:
    image

We were looking for the corresponding workflow runs, which could cause
all kinds of race conditions. We now always get the latest info from the
API instead of relying on what we received, which might be out of date
by the time we actually run.
@jgiannuzzi jgiannuzzi self-assigned this Oct 17, 2023
@jgiannuzzi jgiannuzzi added the ci CI related label Oct 17, 2023
@jgiannuzzi jgiannuzzi merged commit d851f13 into G-Research:main Oct 17, 2023
18 checks passed
@jgiannuzzi jgiannuzzi deleted the required-checks-rewrite branch October 17, 2023 20:41
suprjinx pushed a commit to suprjinx/fasttrackml that referenced this pull request Oct 23, 2023
…mit (G-Research#473)

We were looking for the corresponding workflow runs, which could cause
all kinds of race conditions. We now always get the latest info from the
API instead of relying on what we received, which might be out of date
by the time we actually run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci CI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants