Merge Substrate master before checking Polkadot companion#5916
Merge Substrate master before checking Polkadot companion#5916
Conversation
|
|
||
| # Merge master into our branch before building Polkadot to make sure we don't miss | ||
| # any commits that are required by Polkadot. | ||
| git merge origin/master |
There was a problem hiding this comment.
If we're going to do this for substrate should we also do it below for the polkadot branch?
gabreal
left a comment
There was a problem hiding this comment.
IMO this will make the pull request test run on different code (most recent master merged in) with what the pull requests' code is currently at. This can lead to inconsistent results and also deliver false results. I would rather suggest to force pr to be actually up to date with the master branch or have a bot push to the branches.
|
The point is, we already have failing prs now because the branches are not up-to-date. While you are right that it may not solve all the problems, I think that it at least improves the current situation. People don't understand why their pr does not build with Polkadot, when they only changed internals in Substrate. |
|
@gabreal I kind of agree that we could instead force PRs to be up-to-date with master, ideally this could be done automatically by a bot. But this also brings other problems with commits going automatically (and maybe unexpectedly) into your PRs, I think for some people this would cause issues when they try to push before pulling the latest changes. The other drawback of the bot approach is that it doesn't exist yet and will take longer to implement than the simple changes in this PR. I think the changes here will not bring any false positives since ultimately we will merge the PR with master and we want it to be green there. What could cause an issue is when this script tries to merge master and it has conflicts, but since this is only done for the companion task I think it's manageable. |
| boldprint "companion pr specified/detected: #${pr_companion}" | ||
| git fetch --depth 1 origin refs/pull/${pr_companion}/head:pr/${pr_companion} | ||
| git checkout pr/${pr_companion} | ||
| git merge origin/master |
There was a problem hiding this comment.
when fetching with --depth 1 the master branch won't be available in this repo. this will require something like this before.
There was a problem hiding this comment.
(this is the case for all merges here, since GIT_DEPTH is set to only do shallow cloning)
|
also the merge of this pr failed: so for this a git config will be required and potentially some error checking (if desired) if the merge failed. |
|
We can remove these merges in the future again, that isn't that complicated :D Regarding the email & user name, I pushed some fix that hopefully fixes it. |
|
alright. but still the master branch should be fetched like mentioned in the comment above. why is |
No description provided.