Giter Site home page Giter Site logo

Comments (6)

leimichelle avatar leimichelle commented on July 25, 2024 1

@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.

from node-orb.

timtyrrell avatar timtyrrell commented on July 25, 2024

Ours are ranging between 10 seconds to 25 minutes with this Orb ☚ī¸

from node-orb.

KyleTryon avatar KyleTryon commented on July 25, 2024

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.

from node-orb.

timtyrrell avatar timtyrrell commented on July 25, 2024

@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 🤔

from node-orb.

KyleTryon avatar KyleTryon commented on July 25, 2024

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.

from node-orb.

KyleTryon avatar KyleTryon commented on July 25, 2024

Update: #48

Soon to be changing to NVM install. Please feel free to leave feedback in the PR.

from node-orb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.