Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Better handle of switching node version for OSD core #3362

Closed
peterzhuamazon opened this issue Apr 3, 2023 · 3 comments
Closed
Labels
enhancement New Enhancement

Comments

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Apr 3, 2023

As of now, if there is a version bump in nodejs for OSD core, the developer needs to update these values in dockerfile and ami template so that the images/amis can be rebuild.

The above is understandable as we do not want to use older version of node to build OSD and its plugins, even if they are compatible with lower versions defined by this PR:

However, the current switching of the node version is not ideal, as it uses the .nvmrc value to switch version, and sometimes if the images are not bundled with the requested version, the build fail:
1116d3b#diff-764d0f380e0ea7d984b96da62499e5bb1c9ad946ef6834fede55159c7dc13366
https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch-dashboards/detail/distribution-build-opensearch-dashboards/5794/pipeline/165

In discussing with @AMoo-Miki we note that node version change is going to be rapid later on in order to fix more cves related to nodejs.

We also might need to support multiple version in .nvmrc.

Since we do not want to do a installation of dependency during the build, this needs to have some improvements in both categories:

  1. Quick and easy quicker to rebuild images/amis after the updates in code.
  2. Ability to switch node version than the default nvm use abilities.

Thanks.

@peterzhuamazon peterzhuamazon added the enhancement New Enhancement label Apr 3, 2023
@github-actions github-actions bot added the untriaged Issues that have not yet been triaged label Apr 3, 2023
@prudhvigodithi prudhvigodithi removed the untriaged Issues that have not yet been triaged label Apr 11, 2023
@prudhvigodithi
Copy link
Member

[Triage]
Need a solution to fetch the node version from the Dashboard repo during the docker build, this way a manual PR is not required every time a new version is added.
@peterzhuamazon

@AMoo-Miki
Copy link
Contributor

So far, .nvmrc has been the source truth:

  1. It can handle only one version
  2. dockerfile has been an exception

I believe we should:

  • keep .nvmrc as the source of truth because it will be how contributors set their environment up,
  • get dockerfile to match .nvmrc, and
  • talk about "We also might need to support multiple version"

@peterzhuamazon
Copy link
Member Author

This has been partially solved by @AMoo-Miki to allow fallbacks of node14:

As for faster build of images, this PR has added some quick syncing to mitigate the issues a bit more.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants