Skip to content

ceph-pr-pipeline: fail conflicted PRs with a clear status - #2693

Open
djgalloway wants to merge 1 commit into
mainfrom
wip-pr-pipeline-unmergeable
Open

ceph-pr-pipeline: fail conflicted PRs with a clear status#2693
djgalloway wants to merge 1 commit into
mainfrom
wip-pr-pipeline-unmergeable

Conversation

@djgalloway

Copy link
Copy Markdown
Contributor

Follow-up from live triage: build 45 (ceph/ceph#70703) failed all five legs with "Couldn't find any revision to build" because conflicted PRs have no refs/pull/N/merge on GitHub. prepare now checks .mergeable (with retries while GitHub computes it lazily) and posts a single clear error status per applicable context instead of letting every checkout crash. Takes effect on merge (Jenkinsfile is fetched from main per build).

GitHub does not publish refs/pull/N/merge for a PR with merge
conflicts, so every leg's checkout died with "Couldn't find any
revision to build" and left five cryptic red statuses (seen on build 45
for ceph/ceph#70703; the old GHPRB jobs had the same rough edge).

prepare now checks pr_data.mergeable (retrying while GitHub computes it
lazily, since a fetch right after a push usually returns null) and, for
a conflicted PR, posts one plain-language error status on each
applicable context -- "PR has merge conflicts; resolve and push to run
CI" -- then stops before any leg runs.  The post{failure} sweep stays
quiet because no run flags were set yet.

Signed-off-by: David Galloway <david.galloway@ibm.com>
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