Skip to content

Don't report "Rebase needed" when only the CI build failed - #27

Open
petergeoghegan wants to merge 1 commit into
macdice:masterfrom
petergeoghegan:fix-rebase-needed-on-ci-failure
Open

Don't report "Rebase needed" when only the CI build failed#27
petergeoghegan wants to merge 1 commit into
macdice:masterfrom
petergeoghegan:fix-rebase-needed-on-ci-failure

Conversation

@petergeoghegan

Copy link
Copy Markdown

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant