-
Notifications
You must be signed in to change notification settings - Fork 697
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
The CI docs skip hack is fundamentally broken WRT branch protection settings #10365
Comments
Okay, it's a little more complicated than that. The post job works as expected for In this case, the workaround might be to set the option in the branch protection rules that blocks administrators from overriding GitHub with respect to branch protection rules. But we would need to then toggle it if we need to merge something that doesn't pass CI as part of fixing a complex CI breakage, or else cherry-pick all fixes into a single PR so its CI passes (I did this as part of fixing the Windows CI breakage on 3.12). |
Interestingly, #10357 ran the full set. But I had noticed that the marathon run of backports went in unexpectedly quickly, so now I need to check how the release branch rules differ from |
The behavior is fairly inconsistent. I still think this is something about how Mergify evaluates the branch protection rules (which are the same between That said, I also wonder why |
Okay, looked over triggers for
So if we have a PR targeting |
Okay, so GHA controls aren't flexible enough. But Mergify can I think be told to accept "skipped" as "success" — or may even do so by default, unlike GHA. So we'd again just move that branch protection rule to Mergify config. |
Hm. Actually, GHA claims that "skipped" counts as success, contrary to the claim in the comments for our docs hack. Is this a bad interaction with the |
Another observation: our CI proceeds in weird steps that may be contributing here. For example, our validate post job checks all the preceding steps, but those steps don't exist as far as both GitHub Actions and Mergify are concerned while earlier steps are running; they're only populated when earlier steps are finished, for some reason. That said, I have seen cases where the initial validate job is still running when something is merged, so this probably isn't (usually?) it. But I still wonder why those later jobs aren't listed as pending. |
It's worse than I thought… and it's not Mergify that's at fault, it is definitely GitHub.
|
|
I again propose to revert the hack and stop wasting the precious resource for investigating it any further. Mergify can't be not a part of the equation because the hack is known to work for pure GitHub workflows? |
As far as I can determine, it's branch protection that's failing, not Mergify; Mergify is just obeying the branch protection rules, and the sequence of events when the PR was committed clearly indicate that it was GitHub, not Mergify, that went green on branch protection inappropriately. Possibly the dual intention of our post jobs (both reducing the checks in e.g. validate to a single mega-check and enabling the docs skip hack) is contributing, because branch protection no longer knows about the details? I also think the reason GitHub's own merge queue isn't affected is because it waits for all checks to finish regardless. If they change that or anything related to it, it'll fail the same way because it goes by the branch protection rules and those are going green too early. In any case, I now think #10431 will fix it because Mergify would no longer jump the gun when GitHub's branch protection does. This is pretty much the only way Mergify is involved in the situation; GitHub's own merge queue probably still waits for the job to finish. |
Also, I think reverting the docs hack is itself a hackaround, because this will still be lying in wait to bite us in some other way. |
I reported Mergify's jumping the gun on the checks as a bug; sadly, the only feedback I got was a "thank you" from the bug reporting page, not even a bug number. |
Fair enough.
🤞
Is there a public link? |
Like I said, no feedback whatsoever aside from the "thank you". I had intended to put a link here, but apparently their bugs are not public. |
The Mergify tweak didn't work; it again merged while CI was running. Mergify support asked for more information which I gave them, and I'm waiting to hear back. |
Describe the bug
See https://github.com/haskell/cabal/actions/runs/10888849265/job/30214209267.
TL;DR: the "validate skip" post job succeeded immediately, so branch protection considered "Validate post job" to have succeeded and the PR was merged as soon as the other required jobs completed.
It's not clear whether "Bootstrap post job" has the same problem: the post job also completed¸ but so also did all the actual bootstrap jobs. It's possible that the so-called "quick jobs" take long enough for it to finish (I regularly see that getting canceled when I push a fix to something revealed within the first few minutes of a PR build). Or some other required job; I'd have to remind myself what's actually in the branch protection requirements to make more than a slightly-informed guess.
This doesn't seem to happen on "pull_request" or "push" jobs. I suspect that's because branch protection doesn't come into play on those, suggesting that it's overactive branch protection checks that are the real problem (which is a GitHub issue).
The text was updated successfully, but these errors were encountered: