Closed leimichelle closed 4 years ago
Ours are ranging between 10 seconds to 25 minutes with this Orb ☹️
Hello all,
This is something we have seen internally as well. It seems to be mostly from my own testing the flakiness of the GPG keyservers (please let me know if you are experiencing a different issue). While we do have a node installation command, we actually do not recommend its use unless absolutely necessary. A key component of CI is determinism which is hard to achieve when large packages are being downloaded on every run.
If at all possible we highly encourage the use of the Node Docker images built for our new Next Generation convenience images
https://github.com/CircleCI-Public/cimg-node.
Utilizing a Node Docker image or building off of one (especially any of the ones above) will be faster, more deterministic, and ultimately cost less credit consumption.
But we didn't feel right about removing the ability to install NodeJS with the orb. A potential partial solution would be to skip the GPG key check, or make it optional (opt-out).
I would like to hear from you all more about the specific issues you have ran into, and if switching to a Node-based docker image is or is not a viable solution.
Thank you.
@KyleTryon Thanks for responding! Our use case is a ruby base image to build a rails project but we wanted a newer version of Node to compile the assets which is where this problem starting affecting us. Do you have a recommendation on the right way to tackle the multi-language image we want without this orb? We are currently using circleci/ruby:2.6.2-node-browsers
with this orb added in.
To clarify, we ideally want to pin to a particular node version and this pulls in the latest LTS https://github.com/CircleCI-Public/cimg-ruby/blob/master/2.6/node/Dockerfile also the browsers would not be on it 🤔
Hello @timtyrrell,
@felicianotech will actually have a blog post about this topic coming out very shortly but there are essentially two ways to go about it (ideally).
1. Use the Next Generation Ruby-Node convenience image. https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-do-i-securely-access-web-services
Much like the original image that you are currently using, the next generational images have a node variant option. Combining this executor with the Node orb would be a valid/expected use. This does come with the drawback of not being able to select a specific node version, the current version of node at the time of the image being built is used.
2. Build an image based on the Next Generation Ruby image.
Additionally, you could build a custom Docker image-based of the Ruby image. This has the benefits of caching on the platform for the base image, shorter time for download (as opposed to downloading and installing), and is not subject to the same network flakiness.
But does, of course, mean building and maintaining an image.
The above two methods are the ideal scenarios in many cases.
@KyleTryon Thank you for the response. Yes, we were already using our own custom docker image, so we did decide to just pin down a node version and install it in our docker image anyways. I agree with you that it's safer and faster.
And I don't have a problem anymore, so feel free to close the issue.
Update: https://github.com/CircleCI-Public/node-orb/pull/48
Soon to be changing to NVM install. Please feel free to leave feedback in the PR.
Orb version
2.1.0
What happened
results in the
Installing NodeJS Latest
job The installing run time is very unstable. The worst cases were more than 10mins and 20mins even. And it would fail sometimes due to timeout.Expected behavior