-
Notifications
You must be signed in to change notification settings - Fork 8
Predictable References implementation #383
Comments
I finally get the point and it makes sense to me after the meeting lol. Thanks! |
I thought
Then we need to start thinking about how this "Predictable references" idea would interact with with pre-merge pipelines, which to be very clear, as far as I'm concerned, definitely doesn't have to be delivered together with this. I think the "pre-merge pipelines for pull requests" GitLab feature would work well in conjunction to Alternative 1 because it doesn't incur the creation of new SHAs (which would have to be updated in all the companions). Alternatively, we could have a branch which would be updated via Git push when |
everyone
we'll have a whole bunch of higher-level migrations from GitHub API in such a case, so it won't be the main problem.
yup, automatically by GitHub, so we shouldn't care. But it's important to keep them within the "Companion PR" job only, so no chances it gets released.
This is a great point in the view of the upcoming pre-merge pipelines! The idea with them that they will be launched after the PR is marked as ready. This makes a good place to execute Companion jobs too. So I'd give it a go unless there's some corner cases that would oppose this logic.
yeah, for sure. But as they will be (or will have to be) implemented separately, I see no bad in starting here. With a due explanation of course.
I think in our case it makes sense to just do a rebase within a Companion job if GitHub doesn't update |
For the record I've added the feedback I got from @bkchr on Matrix about the idea of merging the |
Added the |
blocked until we have the decision on monorepo |
Extracted from #327
At the moment, the Polkadot PR is expected to fail until the previously-explained lockfile update happens, but then it is expected to work after the lockfile update happens - which, in practice, is an iffy expectation because we're not running the whole Polkadot CI ahead of time.
This whole workflow could be enhanced with the following approaches
Alternative 1: Predictable References
pr-123
refs/pull/123/head
asrefs/pull/123/merge
Create a companion PR on Polkadot
When
bot merge
is called, the bot will update the Polkadot PR's Substrate reference inCargo.toml
andCargo.lock
via commit, e.g.By doing the above we expect that the Polkadot PR's CI will pass because it would be already referencing the Substrate PR, which is supposed to solve its breaking changes. Doing so will viabilize checking that both sides are passing before going through with the merges - at the moment it's not viable because the Polkadot PR is expected to be failing at first - therefore we'll overcome "Risk of desynchronization for merge failures" because all CIs should be green before the merge.
Wait for all CIs to pass
Merge all pull requests simultaneously
For the record: when @joao-paulo-parity explained this to @bkchr on Matrix DMs, the idea of merging the
rev = "refs/pull/123/merge"
to master was not well received, which motivated the design of Alternative 2.Alternative 2: Predictable References, but don't commit the updated references
This approach would work similar to Alternative 1 except that we don't end up merging the changes to
Cargo.lock
andCargo.toml
(related to step 4 of Alternative 1) into master. In this alternative the reference changes ofrev = "refs/pull/123/merge"
tobranch = "master"
are not committed to the companion branches, instead they are tested on temporary GitLab branches.Explained in https://github.com/paritytech/ci_cd/issues/234#issuecomment-1160141699.
The text was updated successfully, but these errors were encountered: