misc(travis): fix travis hang by disabling yarn GPG verification#10075
misc(travis): fix travis hang by disabling yarn GPG verification#10075jayaddison wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Oh no linux is being hit by this now too!? :(
Can confirm this was a massive headache in lighthouse-ci windows builds
Personally, I say we just set YARN_GPG=no in all builds.
THanks so much for hunting this down and the PR @jayaddison!
|
@patrickhulce Unfortunately I don't know 100% that it's the root cause, but it's my strong suspicion - basically I think the Travis |
|
@patrickhulce As an outsider I guess I don't have a strong opinion, but for some reason, |
|
@patrickhulce Alright, yep - it looks like |
|
@paulirish an upstream fix might be ready from yarnpkg/website#1030 soon - maybe it's worth holding off temporarily? I'm a bit wary of disabling all GPG verification here (although yep, there's a tradeoff vs getting builds back in good shape for sure) |
|
It's really interesting that it's not happening to lighthouse-ci and that it's even before yarn is installed, so I'm not sure the GPG is to blame here. Based on the fact that it's hanging on adding the yarn directory to the cache and the master cache just ballooned to 6GB, maybe we try that? |
|
Well, that seemed to work at least and the cache is back down to ~900MB on master, maybe we just need to periodically clear them and/or prune unused yarn cruft? 🤷♂ |
|
@patrickhulce Great, ok - caching being the real root cause does sound like it fits the behaviour patterns and would make sense. In that case I think I'll close this PR for now, and I'll continue discussing the |
|
I haven't looked too far into this (and don't have much experience with TravisCI), but why do you need to install Yarn fresh for every single build? Usually the better and faster approach is to use a Docker container with all your build tools already installed, and just rebuild the Docker container every so often to upgrade the tools. If you disable GPG I'd recommend at least checking a SHA256 checksum of the file. |
|
@Daniel15 It looks like Travis-CI auto-detects and installs @.patrickhulce's theory (which I think matches the evidence) is that the GPG agent isn't really the cause of the recent It's possible Travis does create & re-use 'build-ready environments' the way you mention via container images, avoiding the need to run the |


Summary
Travis pull requests are running into 10 minute activity timeouts relatively frequently at the moment. At the time of writing, only 1 in the last 25 pull request builds succeeded.
Based on some web references, it looks like this might be due to the fact that the yarn install.sh script used by Travis may spin off a GPG agent during install verification, and this can prevent clean termination of build steps.
This changes attempts to disable the GPG verification check for PR builds only, via the Travis CI head_branch conditional.
I'm not yet certain this is the build failure cause -- disabling GPG verification seems ungreat, and every indication is that this was only a problem on the windows platform, so this is an experimental change.