Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Implement merge queue #332

Closed
joao-paulo-parity opened this issue Oct 17, 2021 · 0 comments
Closed

Implement merge queue #332

joao-paulo-parity opened this issue Oct 17, 2021 · 0 comments

Comments

@joao-paulo-parity
Copy link
Contributor

joao-paulo-parity commented Oct 17, 2021

To work around "Risk of desynchronization for merge failures" problem outlined in #327, which is, quoted:

Risk of desynchronization for merge failures

Since the Substrate PR introduces breaking changes for Polkadot, should the Polkadot companion failed to be merged, because the Substrate PR is merged first (and we hope that the Polkadot one will be merged soon after), all future Substrate PRs could be blocked until the companion is merged because Polkadot master does not yet have the code to keep up with the Substrate PR's changes.

The solution mentioned there can be implemented

Solution: Implement a merge queue in processbot in order to prevent PRs without companions from being merged until PRs which have a companion are merged.

For this queue to work properly regarding companions, we'll need to get rid of the "ahead-of-time merge" behavior described in #327, that is, we'll wait until both sides (dependencies and dependents) are passing, instead of merging the dependency first and then the dependents. It would work as follows:

  1. Receive bot merge on Substrate
  2. Update Cargo.lock on Polkadot
  3. Put the merge in the queue (of course this also takes into account the companion(s))
  4. Wait until both are passing (restore the code of 271f265)
  5. Merge both simultaneously

When updating the Cargo.lock file, first we'll probably need to create a tag on Substrate for the Substrate PR so that its head SHA is kept available in the repository and therefore can be referenced on Polkadot. To make it clear why this is relevant, we can not update Substrate's reference on Polkadot using the PR's head because it might come from an external repository and so we don't have a guarantee that the referenced SHA would be available indefinitely - creating tags on Substrate would be a way to guarantee that.

This implementation might fix #236 partially or totally; this should be verified when/if this ticket gets implemented.

We can also provide a queue visualization tool such as https://bors.rust-lang.org/queue/rust.

@joao-paulo-parity joao-paulo-parity changed the title Merge queue Implement merge queue Oct 17, 2021
@Vovke Vovke added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Apr 12, 2022
@joao-paulo-parity joao-paulo-parity self-assigned this Jun 19, 2022
@joao-paulo-parity joao-paulo-parity removed their assignment Oct 19, 2022
@mordamax mordamax closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants