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

fix(docker): bumped up node version #7822

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

afilekovic
Copy link
Contributor

@afilekovic afilekovic commented Nov 7, 2023

I tried to run ort analyze but I got the error that npm could not be found. I found in the dockerfile that NODEJS_VERSIONS differed between the installed version and the used version(18.14.2 and 20.9.0). This caused ort to not be able to run properly. After changing the NODEJS_VERSIONS to 20.9.0 ort scan started to work since the old version(18.14.2) was not installed and it could not be found.

@afilekovic afilekovic requested a review from a team as a code owner November 7, 2023 16:42
@@ -455,7 +455,7 @@ COPY --from=python --chown=$USER:$USER $PYENV_ROOT $PYENV_ROOT
RUN syft $PYENV_ROOT -o spdx-json --file /usr/share/doc/ort/ort-python.spdx.json

# NodeJS
ARG NODEJS_VERSION=18.14.2
ARG NODEJS_VERSION=20.9.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hasn't this just been upgraded here? #7782 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the dockerfile there are 2 references from what i can see. In #7782 it has been changed in the nodejsbuild on line 184. Then there is a reference in the run step at line 458 that has not been changed.

Copy link
Member

@sschuberth sschuberth Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's a bit unfortunate that this argument is repeated in two stages. I guess the correct way to solve this is to make it a "global" argument which gets its default value only assigned once, and only repeat the argument's name (but not its default value) in the stages that use the argument. But that aside, I believe the fix is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have pushed a change were NodeJS version now is global.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but if doing that in this PR, it IMO should be done consistently for all tool versions (even if they might not be used in different stages yet, but as a preparation for being able to do so).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Maybe it's indeed better to just stick to the original commit in this PR to change the version, and do the rest later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, no problem! i have reverted it back now to the previous change :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind mentioning in the commit message that this was a left over from: cad94e3 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added it in the commit message

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the current docker implementation, it should change only in one place, .versions
ARG will be overridden

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc7d534) 67.06% compared to head (dfc951c) 67.06%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7822   +/-   ##
=========================================
  Coverage     67.06%   67.06%           
  Complexity     2041     2041           
=========================================
  Files           356      356           
  Lines         17045    17045           
  Branches       2438     2438           
=========================================
  Hits          11431    11431           
  Misses         4594     4594           
  Partials       1020     1020           
Flag Coverage Δ
funTest-docker 63.11% <ø> (ø)
test 36.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

fviernau
fviernau previously approved these changes Nov 8, 2023
@sschuberth
Copy link
Member

sschuberth commented Nov 8, 2023

@afilekovic there's now a merge commit in your PR, which we don't allow. Please drop that and rebase against latest main instead. And while at it, you could also U`update the commit message to use imperative mood and better formatting, like

fix(docker): Bump up The Node.JS version in another place

This is a fixup for cad94e3.

Signed-off-by: Armin Filekovic <[email protected]>

@afilekovic afilekovic force-pushed the main branch 2 times, most recently from 14b4b7e to cc25486 Compare November 10, 2023 12:59
This is a fixup for cad94e3.

Signed-off-by: Armin Filekovic <[email protected]>
@sschuberth sschuberth disabled auto-merge November 14, 2023 16:47
@sschuberth
Copy link
Member

Merging despite the current test failures, which are not caused by this PR.

@sschuberth sschuberth merged commit bb742aa into oss-review-toolkit:main Nov 14, 2023
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants