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

[Backport 2.x] Allow node patch versions to be higher on runtime #1677

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 0a24652 from #1189

This adjusts the runtime node version check to only compare major and
minor version requirements. Systems that don't use the bundled NodeJS
might update their node due to security patches, which would currently
break OpenSearch Dashboards unnecessarily.

```shell
% grep 14.18 ../../package.json
    "node": "14.18.2",
% nvm use 12
Now using node v12.22.8 (npm v6.14.15)
% node node_version_validator.js
OpenSearch Dashboards does not support the current Node.js version v12.22.8. Please use Node.js ~v14.18.
% nvm use 14
Now using node v14.18.3 (npm v6.14.15)
% node node_version_validator.js
%
```

* Mention Node.js version Dashboards was built with in runtime check error
* Use template literals in node version validator
* Add additional node validator tests, cleanup
* Don't allow node patch versions to be lower on runtime

Signed-off-by: Justin Kromlinger <[email protected]>
(cherry picked from commit 0a24652)
@tmarkley tmarkley merged commit f788377 into 2.x Jun 14, 2022
@github-actions github-actions bot deleted the backport/backport-1189-to-2.x branch June 14, 2022 20:25
cliu123 pushed a commit to cliu123/OpenSearch-Dashboards that referenced this pull request Jun 30, 2022
…#1189) (opensearch-project#1677)

This adjusts the runtime node version check to only compare major and
minor version requirements. Systems that don't use the bundled NodeJS
might update their node due to security patches, which would currently
break OpenSearch Dashboards unnecessarily.

```shell
% grep 14.18 ../../package.json
    "node": "14.18.2",
% nvm use 12
Now using node v12.22.8 (npm v6.14.15)
% node node_version_validator.js
OpenSearch Dashboards does not support the current Node.js version v12.22.8. Please use Node.js ~v14.18.
% nvm use 14
Now using node v14.18.3 (npm v6.14.15)
% node node_version_validator.js
%
```

* Mention Node.js version Dashboards was built with in runtime check error
* Use template literals in node version validator
* Add additional node validator tests, cleanup
* Don't allow node patch versions to be lower on runtime

Signed-off-by: Justin Kromlinger <[email protected]>
(cherry picked from commit 0a24652)
cliu123 pushed a commit to cliu123/OpenSearch-Dashboards that referenced this pull request Jun 30, 2022
…#1189) (opensearch-project#1677)

This adjusts the runtime node version check to only compare major and
minor version requirements. Systems that don't use the bundled NodeJS
might update their node due to security patches, which would currently
break OpenSearch Dashboards unnecessarily.

```shell
% grep 14.18 ../../package.json
    "node": "14.18.2",
% nvm use 12
Now using node v12.22.8 (npm v6.14.15)
% node node_version_validator.js
OpenSearch Dashboards does not support the current Node.js version v12.22.8. Please use Node.js ~v14.18.
% nvm use 14
Now using node v14.18.3 (npm v6.14.15)
% node node_version_validator.js
%
```

* Mention Node.js version Dashboards was built with in runtime check error
* Use template literals in node version validator
* Add additional node validator tests, cleanup
* Don't allow node patch versions to be lower on runtime

Signed-off-by: Justin Kromlinger <[email protected]>
(cherry picked from commit 0a24652)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants