Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ehuss opened this issue Dec 20, 2024 · 0 comments
Open

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

ehuss opened this issue Dec 20, 2024 · 0 comments
Labels
A-merge-conflicts Area: merge conflict notifications

Comments

@ehuss
Copy link
Contributor

ehuss commented Dec 20, 2024

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?

@ehuss ehuss added the A-merge-conflicts Area: merge conflict notifications label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-merge-conflicts Area: merge conflict notifications
Projects
None yet
Development

No branches or pull requests

1 participant