-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
v8: update make-v8.sh to use git #9393
Conversation
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead.
rm -rf .v8old | ||
if [ "$BRANCH" == "master" ]; then | ||
echo "git cleanup if branch is master" | ||
git ls-files -m | xargs git checkout -- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git reset --hard HEAD
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed this is a better way, I've updated accordingly. Thank you.
if [ "$BRANCH" == "master" ]; then | ||
echo "git cleanup if branch is master" | ||
git ls-files -m | xargs git checkout -- | ||
git clean -fd >/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the goal is to bring the tree back to a pristine state consider changing this to -dfx
so .gitignored files are also deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to keep the dependencies which are part of .gitignore to be able to build v8 standalone, eg v8/third_party, v8/buildtools etc. git clean -fd should remove the rest of the files that .gitignore doesn't ignore, eg newer src/test files. The goal is to have node/deps/v8 with all the third party dependencies in it.
files which are not present in the remote repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's see how the V8 CI fares: https://ci.nodejs.org/job/node-test-commit-v8-linux/390/
The V8 CI passed successfully. Although I have one comment about the job itself, I noticed it does, "make v8" and then "make test-v8", but "make test-v8" itself does "make v8" first before running the suite, so there is a redundant "make v8". I think just "make test-v8" should be good. I was going to edit the job but don't have permissions to do so. |
mv v8 $v8ver | ||
mv .v8old v8 | ||
if [ "$BRANCH" == "master" ]; then | ||
echo "git cleanup if branch is master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why cleaning up only for master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we only need the cleanup for the v8 bundled with node (here master would be v8 master). If you want to test eg [email protected], then you don't need the cleanup since thats not the v8 bundled with node and can be tested standalone. Use case for that would be, if you want to test a specific v8 version before merging into node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the case were somebody has a pr and launches the job against their id/repo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More specifically as per my other comment I think we need more info on what BRANCH is. This job tests branches of node.js not v8 so saying you are going to test [email protected] does not really make sense to me. If you said test using the tools from [email protected] then that might make more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Launching a job with somebody's pr should still work, since their git repo will be tracking the files they updated. Like the job Ben started with my changes https://ci.nodejs.org/job/node-test-commit-v8-linux/390/
Regarding BRANCH, yes it indeed meant to test specific v8 version if needed, otherwise it will get the tools from V8 master. I might have misunderstood the exact purpose of this job, as you mentioned in the other comment if the purpose is to get the tools of a specific v8 version then I will have to do the cleanup for any branch. Will make the necessary changes.
if [ "$BRANCH" == "master" ]; then | ||
echo "git cleanup if branch is master" | ||
git reset --hard HEAD | ||
git clean -fd >/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: git clean
has a quiet option as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've updated accordingly.
mv $v8ver v8 | ||
mv v8 .v8old | ||
|
||
echo "Fetching v8 from chromium.googlesource.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We may not have to mention the location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for someone looking at the job's console log, this would be useful information?
else | ||
# eg: 5.4-lkgr | ||
BRANCH="$1" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need a bit more doc with respect to this. I interpret this to be the v8 branch from which we are going to get the additional tools required to build. So while we may be testing Node.js in branch X, in this case the branch refers to the v8 branch to get the tools from. If my interpretation is correct, adding some explanation of that would be useful.
I've updated the nightly job to temporarily apply this patch until it lands so that we get coverage and people can run for regression testing. I also updated to remove the redundant step of make v8. Looking at the output though it looks like there is an issue with the rsync:
Is it possible that because you have done the reset/clean that you end up removing the v8old directory ? |
@mhdawson Yes, that might be the case, although I did test my changes before committing. I'll take a look at it now. |
One more questions. In terms of validating that we end up testing the right thing. In https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel72-s390x,v8test=v8test/393/consoleFull The node version we check out was reported as :7537718460c7b964ffbbc0910b12eaff9cd8b7a8 but after the reset/clean I see this:
I'm trying to understand as my first through is that we should have seen the same hash. |
@mhdawson not sure how the job is setup, shouldn't the initial checkout also point to 164d9f6? like the previous job . |
V8 version is in |
@jbajwa , this is what I see in the job you pointed to:
As for the v8 version checking include/v8-versions.h as suggested by @richardlau seems reasonable. |
Ok talked to @jbajwa and figured out my mistake. It's that I'm applying his commit in the job as a temporary fix so of course its always the last commit and therefore what we reset to. |
deps/v8/include/v8-version.h
I've updated the script to query v8 branch from include/v8-version.h. |
Looks good, CI run to validate https://ci.nodejs.org/job/node-test-commit-v8-linux/397/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - CI run was good.
cd v8 | ||
|
||
echo "Checking out branch:$BRANCH" | ||
if [ "$BRANCH" != "master" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is not necessary anymore, as the branch is determined from the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, I've updated the script.
I may be missing something. Let me list down what this change does
I am not able to understand the last four steps. Reset |
Hi @thefourtheye , |
@jbajwa Ah, thanks for clarifying :-) I guess I needed some sleep. I totally misunderstood the exclusion part. Now, if the user makes some changes, that is stored in |
There shouldn't be any conflicts, for eg:
|
Just holding off until @thefourtheye confirms he's happy with all of the answers. |
@thefourtheye , thanks for pointing it out :) , I've updated the script to use git stash. |
Actually, I want to avoid doing
|
@thefourtheye |
If we kept the v8 directory only the new changes will be fetched right? It doesn't have to download the entire repository with the history? |
The
Since there is no deps/v8/.git |
@jbajwa Ah, you are correct. One last thing, |
@thefourtheye if the user has committed the changes in their working tree then |
Landed as 4aca347 |
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
landed as 4aca347 |
Thanks @jbajwa for helping me understand :-) |
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
I've gone ahead and backported this change to both v4 and v6 to allow us to test changes to v8 in CI |
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
v8
Description of change
google build tool gclient doesn't support svn anymore. Updating v8 build script
to use git instead. More info #9222