Skip to content

Conflict notifications fail to compute the PR number with merge queues #1870

Open
@ehuss

Description

@ehuss

The conflict notification tries to determine which PR caused the conflict. However, with merge queues, it seems to be failing to do this:

rust-lang/reference#1664 (comment) is an example.
It should be able to see that rust-lang/reference@06994b6 is rust-lang/reference#1696.

The code for this is here:

// Make a guess as to what is responsible for the conflict. This is only a
// guess, it can be inaccurate due to many factors (races, rebases, force
// pushes, etc.).
let possibly = match repo.pulls_for_commit(gh, push_sha).await {
Ok(prs) if prs.len() == 1 => Some(format!("#{}", prs[0].number)),
Err(e) => {
log::warn!("could not determine PRs for {push_sha}: {e:?}");
None
}
_ => None,
}

I'm wondering if there is a race on the GitHub side, where it computes this information async, and the information is not yet available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-merge-conflictsArea: merge conflict notifications

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions