Don't report "Rebase needed" when only the CI build failed - #27
Open
petergeoghegan wants to merge 1 commit into
Open
Don't report "Rebase needed" when only the CI build failed#27petergeoghegan wants to merge 1 commit into
petergeoghegan wants to merge 1 commit into
Conversation
cfbot_web.py decided that a submission failed to apply whenever its latest branch row had status 'failed'. That was correct when the only writer of that status was cfbot_patch.py, but cfbot_cirrus.py and cfbot_github.py now also set status = 'failed' on a branch that applied and was pushed fine but whose CI build failed. The web pages then showed the "Rebase needed" link (pointing at an apply log that shows success) and tagged every green task "(rebase needed)", even though the patch applied cleanly. Only genuine apply failures leave commit_id NULL, so use that as the signal instead. This matches what the commitfest app already does when deciding whether a patch needs a rebase. Seen with commitfest entry 4351, whose only problem was a failing Windows CI job.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://cfbot.cputube.org/peter-geoghegan.html incorrectly reported that my patch set for commitfest entry 4351 failed to apply. I noticed this yesterday, September 7 2026. This contradicts https://commitfest.postgresql.org/patch/4351/, which correctly indicates that the patch applies. There was a failure on the Windows CI job, which the CF app represents correctly.
I believe that this lone Windows failure caused CFBot to spuriously interpreted this as indicating that the whole patch wouldn't apply, when in reality there was only a transient CI problem that likely has nothing to do with my patch set.
I had Claude fable 5.1 take a look at the problem. It came up with this pull request, based on the following plausible-looking explanation, which I have not attempted to verify myself (hopefully this will be easy for you to verify):
"""
cfbot_web.py decided that a submission failed to apply whenever its latest branch row had status 'failed'. That was correct when the only writer of that status was cfbot_patch.py, but cfbot_cirrus.py and cfbot_github.py now also set status = 'failed' on a branch that applied and was pushed fine but whose CI build failed. The web pages then showed the "Rebase needed" link (pointing at an apply log that shows success) and tagged every green task "(rebase needed)", even though the patch applied cleanly.
Only genuine apply failures leave commit_id NULL, so use that as the signal instead. This matches what the commitfest app already does when deciding whether a patch needs a rebase.
"""
Thanks