Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

New image with node v16 (LTS) #374

Closed
kalimerre opened this issue Nov 3, 2021 · 20 comments · Fixed by #952
Closed

New image with node v16 (LTS) #374

kalimerre opened this issue Nov 3, 2021 · 20 comments · Fixed by #952
Assignees
Labels
enhancement New feature or request

Comments

@kalimerre
Copy link

Hello,

Node v16 had been released in the LTS mode (https://nodejs.org/en/blog/release/v16.13.0/). It also bundle npm v8.X in it which offers a package-lock v2.

Do you know when Renovate will offer new images with that new LTS version and therefore the new npm version ?
I assume it'll be in a new major version of Renovate to not break existing projects on the current version right ?

Thanks !

@rarkins
Copy link
Contributor

rarkins commented Nov 3, 2021

At the moment it's looking like weeks to months before we default the pre-built Renovate images to use Node 16. In the meantime you'd need to build your own custom image. e.g. https://github.com/renovatebot/docker-renovate-full/blob/main/Dockerfile

@viceice
Copy link
Member

viceice commented Nov 3, 2021

this is blocked by:

@Shegox
Copy link

Shegox commented Dec 17, 2021

As I just found this out today, there is a new self-hosted option "binarySource": "install", which dynamically installs the npm version depending on the engine field in the package.json without using a sidecar container and allows to use lockFileVersion1 and lockFileVersion2 for different repositories.

@rarkins
Copy link
Contributor

rarkins commented Dec 17, 2021

@Shegox yes, you're right. We'd be happy to hear feedback about whether it works flawlessly for you, because we plan to make it the default option for our images once we're confident we found and fixed any bugs or important edge cases

@Shegox
Copy link

Shegox commented Dec 17, 2021

@rarkins I just enabled it, but if any problems do come up I will make sure to open a proper bug report. From the first runs it looks like a really cool and good working feature! Thanks a lot for your and everyones awesome work on renovate!

@Ugoku
Copy link

Ugoku commented Mar 15, 2022

this is blocked by:

It seems there is nothing blocking this anymore. Any status update?

@viceice viceice linked a pull request Mar 16, 2022 that will close this issue
1 task
@scinos
Copy link

scinos commented Jun 3, 2022

FWIW, renovate 32.72-slim has node 16:

$ docker run --rm -ti --entrypoint /bin/bash renovate/renovate:32.72-slim -c 'node --version'
v16.15.1

@rarkins
Copy link
Contributor

rarkins commented Jun 3, 2022

Let's do a major release of Renovate next week so we can coincide this to be more polite to those who might be surprised that the node version changes in the full image

@dmosen
Copy link

dmosen commented Jun 15, 2022

@rarkins We are also affected by this issue. As we are using OpenShift and we are having some trouble getting binarySource=install or binarySource=docker to work, a renovate full image with preinstalled node 16 would be helpful for us.

@scinos
Copy link

scinos commented Jun 22, 2022

Is there something I can do to help this happening?

I see there is a pending Node 16 update in the Dependency Dashboard, but I can't click on it to force a PR creation.

@viceice
Copy link
Member

viceice commented Jun 22, 2022

Nope, still blocked by missing renovate feature

@scinos
Copy link

scinos commented Jun 22, 2022

I'm trying to understand the issue to see how can I help:

Looks like the "missing renovate feature" you mentioned comes from renovatebot/renovate#12177, right? But looking at the issue screenshot, that seems to be a problem with the Renovate publish flow itself, not that renovate won't work on a Node 16 environment. Is that correct?

Given the slim docker tag already has Node 16, I'd assume Renovate itself would work just fine. If so, would it be possible to release a new version of the Docker image with the current Renovate version? That way we don't need to wait to fix Renovate publish workflow, right?

@viceice
Copy link
Member

viceice commented Jun 22, 2022

no, it's because we break a lot existing users who need an older npm version.

so we wait for dynamic node install to support that. after we'll update node on this image.

@dmosen
Copy link

dmosen commented Jun 22, 2022

We finally got binarySource=install working in our OpenShift installation:

To fix this problem we needed to add BUILDPACK=1 explicitly to the container's environment variables. (We did so by adding the variable to the kubernetes manifest.)

Explanation

If you use Renovate on OpenShift the Renovate process is started by a dynamically generated user using /bin/sh instead of /bin/bash. In this case the environment variable BUILDPACK is not being set. This results in Renovate refusing to apply binarySource=install. If this is the case the Renovate logs contain the following entry:
binarySource=install is only compatible with images derived from containerbase/buildpack

@rarkins
Copy link
Contributor

rarkins commented Jun 22, 2022

Thanks for the info. Would this be something we could fix automatically if /bin/sh wraps /bin/bash?

@dmosen
Copy link

dmosen commented Jun 23, 2022

I think this should work. Starting /bin/bash inside /bin/sh also worked for us.

@viceice
Copy link
Member

viceice commented Jun 23, 2022

Can we simply add a small bash script as /bin/sh ?

#!/bin/bash

if [[ -f "$BASH_ENV" && -z "${BUILDPACK+x}" ]]; then
  . $BASH_ENV
fi

exec dumb-init -- "$@"

This will help to autoload our env in any case. So also jenkins pipelines work, as they use docker exec to execute commands.

Can someone evaluate if this works and then open an issue on https://github.com/containerbase/buildpack to autocreate this on install-buildpack

@scinos
Copy link

scinos commented Jul 22, 2022

binarySource=install won't affect which Node version is used, only which npm version, right?

@viceice
Copy link
Member

viceice commented Jul 22, 2022

yes, we will enable install mode soon

@viceice
Copy link
Member

viceice commented Oct 23, 2022

will be done tomorrow

@viceice viceice self-assigned this Oct 23, 2022
@viceice viceice added the enhancement New feature or request label Oct 23, 2022
@viceice viceice mentioned this issue Oct 24, 2022
@viceice viceice linked a pull request Oct 24, 2022 that will close this issue
1 task
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
7 participants