jenkinsci / jenkinsci/jdk-tool-plugin
[JENKINS-69205] Different name same version installation not working
- Dominant language
- Java
- Stars
- 4
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
If you declare two (or more) times the same JDK version using different names you can install only one of them because of the name of the directory which is written inside the zip in the cache directory.
For example:
- Name: BUILD_JDK
- Version: jdk-11.0.16+8
- Name: SONARQUBE_JDK
- Version: jdk-11.0.16+8
The root directory inside [...]/jenkins-home/caches/adoptopenjdk/WINDOWS/amd64/jdk-11.0.16+8.zip is "BUILD_JDK" (the first used), so when it needs to install SONARQUBE_JDK it simply creates an empty directory.
---
Originally reported by
jhack, imported from: Different name same version installation not working
Raw content of original issue
If you declare two (or more) times the same JDK version using different names you can install only one of them because of the name of the directory which is written inside the zip in the cache directory.
For example:
- Name: BUILD_JDK
- Version: jdk-11.0.16+8
- Name: SONARQUBE_JDK
- Version: jdk-11.0.16+8
The root directory inside [...]/jenkins-home/caches/adoptopenjdk/WINDOWS/amd64/jdk-11.0.16+8.zip is "BUILD_JDK" (the first used), so when it needs to install SONARQUBE_JDK it simply creates an empty directory.
Contributor guide
Research direction
Start by tracing the JDK installation and cache handling described in the issue, focusing on how the cached ZIP's root directory is used. Reproduce the two differently named declarations with version jdk-11.0.16+8 on Windows amd64. Done means both names install successfully without an empty directory being created for the second installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100