Skip to content

PR creation fails if there are merge conflicts with intervening updates to target branch #23129

@dsyme

Description

@dsyme

A proportion of our workflow failures are related to PR creation where there's been intervening updates, causing merge conflicts.

When there are no merge conflicts we just proceed and merge (which seems fine), but if there are merge conflicts we fail:

 :twisted_rightwards_arrows: Patch Apply Failed: The patch could not be applied to the current state of the repository. This is typically caused by a merge conflict between the agent's changes and recent commits on the target branch.
Failed Operations:
create_pull_request: Failed to apply patch

I'm guessing the problem is we're trying to create a PR against the head commit of the target branch - applying the patch direct to head branch - when we should be creating one against an earlier commit and accept the merge conflicts will show as soon as the PR is created.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions