Skip to content

Conversation

@Kathund
Copy link

@Kathund Kathund commented Oct 20, 2025

Description

Required for pelican-eggs/generic#24

All Submissions:

  • Have you ensured there aren't other open Pull Requests for the same update or change?
  • Have you created a new branch for your changes and PR from that branch and not from your master branch?

New Image Submissions:

  1. Have you added your image to the Github workflows?
  2. Have you updated the README list to contain your new image?

@QuintenQVD0
Copy link
Collaborator

It doesn't work like that, it is not because they are removed here that the images stop existing

@rmartinoscar
Copy link
Collaborator

When we drop a version we just comment it in its workflow file so image don't get updated but the files are still here for archive purposes.

tag:
- 12
- 14
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24

Like we did for java

tag:
- 8
# - 8j9
- 11
# - 11j9
- 16
# - 16j9
- 17
- 19
- 21
- 22
- 25

@gOOvER
Copy link

gOOvER commented Oct 20, 2025

i would keep, 12, 14, 16, 18, 20, 22, 24. 12-18 are EOL and normally they shouldnt used anymore

17, 19, 21, 23 could be removed in my eyes because they are not LTS

@Kathund
Copy link
Author

Kathund commented Oct 20, 2025

i would keep, 12, 14, 16, 18, 20, 22, 24. 12-18 are EOL and normally they shouldnt used anymore

17, 19, 21, 23 could be removed in my eyes because they are not LTS

The biggest issue is that npm wants node 20 to run. I don't see why we would let them install an npm version that won't work for there node version. That's why I dropped everything under 20

@gOOvER
Copy link

gOOvER commented Oct 20, 2025

you could stick the version with npm. I mean quinten allready did that in some images. for the installscript, you could write a function, which check which node version is installed and use the correct sticked npm version

@gOOvER
Copy link

gOOvER commented Oct 20, 2025

here is an example:

get_latest_npm_for_node() {
  # Get current Node.js version
  local node_version
  node_version=$(node -v 2>/dev/null | sed 's/^v//')

  if [[ -z "$node_version" ]]; then
    echo "Node.js is not installed or not in PATH."
    return 1
  fi

  echo "Detected Node.js version: $node_version"

  # Mapping: Node.js major version → recommended latest npm version
  # Source: https://github.com/npm/cli#compatibility
  declare -A npm_versions=(
    ["12"]="6.14.15"    
    ["14"]="6.14.18"
    ["16"]="8.19.4"
    ["18"]="9.8.1"
    ["20"]="10.5.0"
    ["21"]="10.5.0"
  )

  # Extract major version
  local major_version
  major_version=$(echo "$node_version" | cut -d. -f1)

  local npm_version="${npm_versions[$major_version]}"

  if [[ -z "$npm_version" ]]; then
    echo "No recommended npm version found for Node.js $node_version."
    return 2
  fi

  echo "Recommended npm version for Node.js $node_version: $npm_version"
  npm install -g "npm@$npm_version"
}

@mristau
Copy link

mristau commented Oct 20, 2025

When we drop a version we just comment it in its workflow file so image don't get updated but the files are still here for archive purposes.

there are some eggs, especially from the bots which might use node.js images too, even though it would be better to remove older versions, but that should be done in all eggs then

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.

5 participants