Uh oh!
There was an error while loading. Please reload this page.
Enable ccache for Alpine builds on Travis CI - #918
Conversation
dc6d32d to
8003f10Compare8003f10 to
481f3fdCompareThe first build with ccache will take longer time than usual, and may exceed the hard limit 50 mins for free plan on Travis CI, no ideas on how to fix it yet. |
PeterDaveHello
commented
Nov 20, 2018
The latest record we didn't skip any build: https://travis-ci.com/nodejs/docker-node/builds/91724465 cc @nodejs/docker |
PeterDaveHello
commented
Nov 20, 2018
After a few retires, it passed now. |
53a7b30 to
c672865ComparePeterDaveHello
commented
Nov 20, 2018
Wait for #919 to unlock CI blocking. |
chorrell
commented
Nov 20, 2018
I approved and merged #919 |
294faa9 to
e055d20CompareLaurentGoderre
commented
Nov 21, 2018
Wow!! Didn't know about netcat!! Really cool! |
chorrell
commented
Nov 21, 2018
Yeah! This was a long journey by well worth it. A lot of groundwork covered by #786 too |
LaurentGoderre
commented
Nov 21, 2018
The only thing I wonder is how will netcat react if nothing is listening to that port for the docker official builds? |
chorrell
commented
Nov 21, 2018
Yeah, not sure. |
PeterDaveHello
commented
Nov 21, 2018
Then it failed, it's fine, as the trailing |
Well, I missed the later |
PeterDaveHello
commented
Nov 21, 2018
PR sent: #923 |
Looks strange, the cache fetching process is not so reliable in real situation(however, it looks fine on my own environment, that's why it took me 2 days to test the cases), for example, in the latest master branch build: https://travis-ci.com/nodejs/docker-node/builds/92180608, v10 & v11 fetched and extracted the cache without problem, v6 & v8 failed, so if this keeps happening, I'm going to switch to use a simple python http server to handle it, which should be more reliable, I didn't do it because it looks not so pretty as the netcat method should work on both download and upload side usually, I don't want to use two different tools and methods to handle it, but looks like the most easiest way here is to use a workaround. |
PeterDaveHello
commented
Nov 21, 2018
Oh nope, looks like this is only happenning on v6 image(ignore the v8 one as it's just updated), which is based on Alpine v3.4, may be another software issue, will need the update of v6 to fix it. To be clear, my testing environment is on Ubuntu 16.04.5 host and Alpine v3.6 container, didn't recall that we have old to Alpine v3.4. |
PeterDaveHello
commented
Nov 21, 2018
From the v8 build here as we can see: https://travis-ci.com/nodejs/docker-node/jobs/160105110, a version update will make the cache all missed, so we also need to have an mechanism to clear the cache once the version was changed in case the cache going so fat, and the most important, useless. |
PeterDaveHello
commented
Nov 21, 2018
I can reproduce that issue now.
So this is the strange case I didn't noticed before, the workaround is to use other method like http transferring, but a little bit ugly, or, as it's just on v6 image, we can wait until it got any update(unpredictable?). Summary: current method can't work on node.js v6 based on alpine v3.4, current workaround is ugly and will be applied to all Alpine images, which I don't want to, just waiting may be also an option. Not sure if I explain well, let me know what do you guys think, thanks. |
LaurentGoderre
commented
Nov 21, 2018
@PeterDaveHello i don't understand, a version change should not invalidate the cache |
chorrell
commented
Nov 21, 2018
I think it's worth breaking our update policy in this case and update the v6 alpine image to 3.8. Alpine 3.4 dropped out of support earlier this year: https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases So having it on an unsupported Alpine version is probably worse from an LTS/security update perspective than the possible breaking change of going from 3.4 to 3.8 with a non-Node.js update. We might as well bump yarn too while we're at it. |
PeterDaveHello
commented
Nov 21, 2018
@LaurentGoderre The ccache summary shows the updated version hit 0% cache, I'll have another test for it, but here is the result saw on our build log. |
LaurentGoderre
commented
Nov 21, 2018
I'm surprised you don't have to extract the cache from the image. Too bad we can't inspect the cache in more details |
LaurentGoderre
commented
Nov 21, 2018
@PeterDaveHello I can't get this to work for me locally. The build gets connection refused for nc |
LaurentGoderre
commented
Nov 21, 2018
Hmmmm! we have to pass |
LaurentGoderre
commented
Nov 21, 2018
@PeterDaveHello btw, are you aware of Pipe Viewer ( |
PeterDaveHello
commented
Nov 22, 2018
Yes I know pv but it's no need when building Docker image, as its standard output won't appear on the screen |
PeterDaveHello
commented
Nov 22, 2018
Directly tested on Ubuntu 16.04.5 amd64, build node-v8.12.0 and then node-v8.13.0, as you can see, no cache hit: I think at least we can set the max cache size to 150MB or 200MB at most, as a fresh build of v6, v8, v10, v11 generates about 96.3, 110.7, 130.3 & 129.3MB, 150MB should be enough for a while, and the files being evicted should be those we don't need, I'll send a PR for it. |
PeterDaveHello
commented
Nov 22, 2018
PR sent here: #927 |
PeterDaveHello
commented
Nov 22, 2018
Even test with v6.10.0 & v6.10.1 which contains smaller changes: |
PeterDaveHello
commented
Feb 14, 2019
Reimplement again in #927 |
cc #786