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

Clarify evaluation of check values reported concurrently from multiple sources #34568

Closed
1 task done
fjeldstad opened this issue Sep 12, 2024 · 8 comments
Closed
1 task done
Labels
content This issue or pull request belongs to the Docs Content team more-information-needed More information is needed to complete review pull requests Content related to pull requests SME reviewed An SME has reviewed this issue/PR

Comments

@fjeldstad
Copy link

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks

What part(s) of the article would you like to see updated?

I think there is a need for a new section that explains how multiple sources of values for a given check are evaluated. In particular, it is very important for users to understand that the branch protection feature will not wait for all running workflows to complete execution before setting the outcome of a specific check.

If I would write the section myself, it could be something along these lines:

Evaluation of concurrently reported check values

It is possible for multiple sources to report values for the same check. A common example would be GitHub Actions workflows with a job named corresponding to a required check.
For example, let's say a branch has a required check called test. If there are multiple workflows each with a job named test, they will all eventually contribute to the
final value of the check. If one of them fails, the check will be marked as failed, as you would expect. But the check engine will not wait for all workflows to finish before
evaluating the check value - it will aggregate values as they are reported; a check might be first marked as successful by a quick workflow just to later be changed
to failed by a slower workflow. In other words, there can be a time window when a pull request is able to merge even if it would be prevented from doing so by other pending workflows.
This behavior is especially important to be aware of if using the auto-merge feature as pull requests will be merged as soon as the first successful check value is reported.

Additional information

No response

@fjeldstad fjeldstad added the content This issue or pull request belongs to the Docs Content team label Sep 12, 2024
Copy link

welcome bot commented Sep 12, 2024

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Sep 12, 2024
@nguyenalex836 nguyenalex836 added waiting for review Issue/PR is waiting for a writer's review pull requests Content related to pull requests and removed triage Do not begin working on this issue until triaged by the team labels Sep 12, 2024
@nguyenalex836
Copy link
Contributor

@fjeldstad Thank you for raising this issue! I'll get this triaged for review ✨ Our team will provide feedback regarding the best next steps for this issue - thanks for your patience! 💛

@subatoi subatoi added the needs SME This proposal needs review from a subject matter expert label Sep 17, 2024
Copy link
Contributor

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

@nguyenalex836 nguyenalex836 added more-information-needed More information is needed to complete review SME reviewed An SME has reviewed this issue/PR and removed waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert labels Sep 26, 2024
@nguyenalex836
Copy link
Contributor

@fjeldstad Thank you for your patience while our SME team reviewed this issue! 💛 Our SME team observed the following -

I tried to set up a repro for this and wasn't able to observe the same behavior, but maybe I'm misunderstanding their setup. My setup was:

  • Two required workflows, one that succeeds and another that fails after a pause. They both have a single job with the same name
  • Open a PR that triggers the required workflows
  • Observe the commit status

My expectation based on their claim: The commit status goes green when the successful workflow finishes, then turns red after the failing workflow finishes
My observation: The commit status remains yellow (in progress) until all the checks are done, then turns red

I also tried adding an approval gate to the failing workflow to get it to wait indefinitely, but I still observed the expected behavior

As we are unable to reproduce this issue, can you reach out to our excellent support team? They are best equipped to reproduce the error you are seeing, which we will need to do before we make changes to the docs 💛

If after discussing with our support team there should be changes made to the docs, please let us know! ✨

@fjeldstad
Copy link
Author

fjeldstad commented Sep 26, 2024 via email

@nguyenalex836
Copy link
Contributor

@fjeldstad Thank you for letting us know! Would by chance be able to point to a public repo that exhibits this behavior (that we can use for testing)? If there's a setup you've personally put together to test this, we're happy to utilize that as well! 💛

@fjeldstad
Copy link
Author

fjeldstad commented Sep 27, 2024 via email

@nguyenalex836
Copy link
Contributor

@fjeldstad That's no problem, thank you for your patience while our team reviewed further!

While we are currently undergoing a repo freeze this week, internally we will be adding a note to the doc once the freeze is over along the lines of:

... to have uniquely named job names across multiple workflows if you’re using branch protections. If there is a conflict there is no waiting of any sort and it is ambiguous

We decided this would be the best course of action after additional discussion 💛 Thank you for your willingness to contribute to our docs, and raising a flag on this issue! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team more-information-needed More information is needed to complete review pull requests Content related to pull requests SME reviewed An SME has reviewed this issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants