| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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.
git reset --hard HEAD?
Sorry, something went wrong.
There was a problem hiding this comment.
Indeed this is a better way, I've updated accordingly. Thank you.
Sorry, something went wrong.
| 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.
If the goal is to bring the tree back to a pristine state consider changing this to -dfx so .gitignored files are also deleted.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
files which are not present in the remote repo.
There was a problem hiding this comment.
LGTM. Let's see how the V8 CI fares: https://ci.nodejs.org/job/node-test-commit-v8-linux/390/
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
| mv v8 $v8ver | ||
| mv .v8old v8 | ||
| if [ "$BRANCH" == "master" ]; then | ||
| echo "git cleanup if branch is master" |
There was a problem hiding this comment.
Why cleaning up only for master?
Sorry, something went wrong.
There was a problem hiding this comment.
we only need the cleanup for the v8 bundled with node (here master would be v8 master). If you want to test eg v8@5.5, 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.
Sorry, something went wrong.
There was a problem hiding this comment.
What about the case were somebody has a pr and launches the job against their id/repo ?
Sorry, something went wrong.
There was a problem hiding this comment.
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 v8@5.5 does not really make sense to me. If you said test using the tools from v8@5.5 then that might make more sense.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
| 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.
Nit: git clean has a quiet option as well
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks, I've updated accordingly.
Sorry, something went wrong.
| mv $v8ver v8 | ||
| mv v8 .v8old | ||
|
|
||
| echo "Fetching v8 from chromium.googlesource.com" |
There was a problem hiding this comment.
Nit: We may not have to mention the location.
Sorry, something went wrong.
There was a problem hiding this comment.
for someone looking at the job's console log, this would be useful information?
Sorry, something went wrong.
| else | ||
| # eg: 5.4-lkgr | ||
| BRANCH="$1" | ||
| fi |
There was a problem hiding this comment.
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.
Sorry, something went wrong.
|
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: rsync: change_dir "/data/iojs/build/workspace/node-test-commit-v8-linux/nodes/rhel72-s390x/v8test/v8test/deps//.v8old" failed: No such file or directory (2) Is it possible that because you have done the reset/clean that you end up removing the v8old directory ? |
Sorry, something went wrong.
|
@mhdawson Yes, that might be the case, although I did test my changes before committing. I'll take a look at it now. |
Sorry, something went wrong.
|
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: HEAD is now at 164d9f6 Using git clean quiet option instead of directing stdout to /dev/null I'm trying to understand as my first through is that we should have seen the same hash. |
Sorry, something went wrong.
|
@mhdawson not sure how the job is setup, shouldn't the initial checkout also point to 164d9f6? like the previous job . |
Sorry, something went wrong.
|
V8 version is in include/v8-version.h in the V8 source tree. |
Sorry, something went wrong.
|
@jbajwa , this is what I see in the job you pointed to: git checkout -f 7537718460c7b964ffbbc0910b12eaff9cd8b7a8 As for the v8 version checking include/v8-versions.h as suggested by @richardlau seems reasonable. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
deps/v8/include/v8-version.h
|
I've updated the script to query v8 branch from include/v8-version.h. |
Sorry, something went wrong.
|
Looks good, CI run to validate https://ci.nodejs.org/job/node-test-commit-v8-linux/397/ |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM - CI run was good.
Sorry, something went wrong.
| cd v8 | ||
|
|
||
| echo "Checking out branch:$BRANCH" | ||
| if [ "$BRANCH" != "master" ]; then |
There was a problem hiding this comment.
This check is not necessary anymore, as the branch is determined from the file.
Sorry, something went wrong.
There was a problem hiding this comment.
agreed, I've updated the script.
Sorry, something went wrong.
|
I may be missing something. Let me list down what this change does
I am not able to understand the last four steps. Reset node, this will remove all the changes done. Cleanup .v8old, so that all the compilations related files will be cleaned up and copy it back to v8. Isn't this more like a no-op or am I missing something? |
Sorry, something went wrong.
|
Hi @thefourtheye , |
Sorry, something went wrong.
|
@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 .v8old, new changes are fetched and then the user made changes are restored, with rsync, what if there are conflicts? |
Sorry, something went wrong.
|
There shouldn't be any conflicts, for eg:
|
Sorry, something went wrong.
|
Just holding off until @thefourtheye confirms he's happy with all of the answers. |
Sorry, something went wrong.
Sorry, something went wrong.
|
@thefourtheye , thanks for pointing it out :) , I've updated the script to use git stash. |
Sorry, something went wrong.
|
Actually, I want to avoid doing fetch v8. It downloads a lot of files from the server. Will something like this work? git stash fetch v8 git checkout branch gclient sync git stash pop |
Sorry, something went wrong.
|
@thefourtheye |
Sorry, something went wrong.
|
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? |
Sorry, something went wrong.
|
The fetch cmd only works for initial checkout, otherwise you get the following error: >fetch v8 Running: gclient root Your current directory appears to already contain, or be part of, a checkout. "fetch" is used only to get new checkouts. Use "gclient sync" to update existing checkouts. Fetch also does not yet deal with partial checkouts, so if fetch failed, delete the checkout and start over (crbug.com/230691). Since there is no deps/v8/.git gclient sync would also perform a full initial checkout, which is significantly slower than fetch v8. |
Sorry, something went wrong.
|
@jbajwa Ah, you are correct. One last thing, git stash will not work if the users have temporarily committed the changes |
Sorry, something went wrong.
|
@thefourtheye if the user has committed the changes in their working tree then git reset should point to that. |
Sorry, something went wrong.
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
Thanks @jbajwa for helping me understand :-) |
Sorry, something went wrong.
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
I've gone ahead and backported this change to both v4 and v6 to allow us to test changes to v8 in CI |
Sorry, something went wrong.
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected 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