Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Merge Substrate master before checking Polkadot companion#5916

Merged
gavofyork merged 3 commits intomasterfrom
bkchr-merge-substrate-into-polkadot-build-check
May 7, 2020
Merged

Merge Substrate master before checking Polkadot companion#5916
gavofyork merged 3 commits intomasterfrom
bkchr-merge-substrate-into-polkadot-build-check

Conversation

@bkchr
Copy link
Copy Markdown
Member

@bkchr bkchr commented May 6, 2020

No description provided.

@bkchr bkchr added A0-please_review Pull request needs code review. M1-ci B0-silent Changes should not be mentioned in any release notes labels May 6, 2020
@bkchr bkchr requested a review from gabreal May 6, 2020 09:13

# 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to do this for substrate should we also do it below for the polkadot branch?

Copy link
Copy Markdown
Contributor

@gabreal gabreal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bkchr
Copy link
Copy Markdown
Member Author

bkchr commented May 6, 2020

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.

@andresilva
Copy link
Copy Markdown
Contributor

@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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when fetching with --depth 1 the master branch won't be available in this repo. this will require something like this before.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this is the case for all merges here, since GIT_DEPTH is set to only do shallow cloning)

@gabreal
Copy link
Copy Markdown
Contributor

gabreal commented May 6, 2020

also the merge of this pr failed:

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@runner-m1hcVmhZ-project-145-concurrent-0.(none)')

so for this a git config will be required and potentially some error checking (if desired) if the merge failed.
apart from that i under stand your points and even though i would prefer the other solution the argument that it will be merged with master in the end also makes sense to me. should there be stable branch in the future this may fall on our toes.

@bkchr
Copy link
Copy Markdown
Member Author

bkchr commented May 6, 2020

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.

@gabreal
Copy link
Copy Markdown
Contributor

gabreal commented May 6, 2020

alright. but still the master branch should be fetched like mentioned in the comment above. why is test-linux-stable failing now?

@gavofyork gavofyork merged commit ba0593d into master May 7, 2020
@gavofyork gavofyork deleted the bkchr-merge-substrate-into-polkadot-build-check branch May 7, 2020 10:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants