-
Notifications
You must be signed in to change notification settings - Fork 721
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
Use Java 20 as bootjdk for jdknext #17302
Conversation
In draft mode until we ensure build machines are ready for this change. |
I don't think this will work. It downloads the JVM from https://api.adoptopenjdk.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/openj9/normal/adoptopenjdk?project=jdk for which there is no openj9 version of 20 (or even 19) yet. |
You can modify the download link. I wrote some ramblings about that in #17289 (comment) |
This new version updates the URL for downloading (new) boot JDKs. |
dir_strip: | ||
all: '1' | ||
url: | ||
all: "https://api.adoptopenjdk.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/openj9/normal/adoptopenjdk?project=jdk" | ||
all: 'https://api.adoptium.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/hotspot/normal/eclipse?project=jdk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only be using hotspot for next
and openj9 for the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using "openj9" for 17, I got a 404 error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps @AdamBrousseau knows, I assume it used to work. It's only needed when we have a new machine that doesn't already have the binary. We could leave versions earlier than next
as-is for now in order to deliver the jdk21 fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adam explained that while adoptopenjdk.net redirects to adoptium.net, the redirection doesn't apply to api.adoptopenjdk.net. I'll update this accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
@@ -163,11 +163,11 @@ boot_jdk_default: | |||
17: '17' | |||
19: '18' | |||
20: '18' | |||
next: '18' | |||
next: 'https://api.adoptium.net/v3/binary/latest/20/ga/${os}/${arch}/jdk/hotspot/normal/eclipse?project=jdk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? I think you need to put the version here and the url under url:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right, perhaps this section should look like this?
boot_jdk_default:
boot_jdk:
location:
all: '${HOME}/bootjdks'
version:
8: '8'
11: '11'
17: '17'
19: '18'
20: '18'
next: '20'
dir_strip:
all: '1'
url:
all: 'https://api.adoptopenjdk.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/openj9/normal/adoptopenjdk?project=jdk'
next: 'https://api.adoptium.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/hotspot/normal/eclipse?project=jdk'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I believe we've done something like that before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
jenkins compile amac jdknext |
Unfortunately it doesn't work, I guess you'll have to specify all the individual versions rather than setting all. |
Either than or perhaps the code that uses it could be fixed to recognize the version before using all. |
I expect @AdamBrousseau can confirm, but I don't think this change is included in the early stages of the build and so cannot affect the bootjdk URL. |
I think the version-specific URL would be fine if this change were loaded early enough; see https://github.com/eclipse-openj9/openj9/blob/master/buildenv/jenkins/common/variables-functions.groovy#L1603. |
We can see what happened in the console output https://openj9-jenkins.osuosl.org/job/Build_JDKnext_aarch64_mac_Personal/75/console It does the following before using the variable file.
Did you look at how getScalarField is implemented? |
dir_strip: | ||
all: '1' | ||
url: | ||
all: "https://api.adoptopenjdk.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/openj9/normal/adoptopenjdk?project=jdk" | ||
all: 'https://api.adoptopenjdk.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/openj9/normal/adoptopenjdk?project=jdk' | ||
next: 'https://api.adoptium.net/v3/binary/latest/${bootJDKVersion}/ga/${os}/${arch}/jdk/hotspot/normal/eclipse?project=jdk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think next
needs to be 20
. L1603 is using bootJDKVersion which has already been processed into a number at that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think I see what you mean; '20': {url} - that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 93021cf.
Fetch bootjdk for jdknext from adoptium. Issue: 17289. Signed-off-by: Keith W. Campbell <[email protected]>
Clearly I was incorrect, the build tried to use 20 for the boot jdk, but didn't have the right mapping to a URL. |
jenkins compile amac jdknext |
Seems we need more changes to handle other builds, I see
|
jenkins compile amac jdknext |
@@ -1618,7 +1618,7 @@ def download_boot_jdk(bootJDKVersion, bootJDK) { | |||
sh """ | |||
curl -LJkO ${sdkUrl} | |||
mkdir -p ${bootJDK} | |||
sdkFile=`ls | grep semeru` | |||
sdkFile=`ls | grep 'tar\|zip'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need 2 back slashes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using single quotes keeps the shell from giving the backslash special meaning; I guess it has to get past groovy first.
Signed-off-by: Keith W. Campbell <[email protected]>
jenkins compile amac jdknext |
Looks good now:
|
jenkins compile win jdknext |
The Windows build failed:
@AdamBrousseau Why should that be? |
Looks like that dir is owned by Administrator on the new machines. |
I restarted your running win build. |
Is this another feature of new machines?
|
@AdamBrousseau Has the problem on Windows build machines that caused the failure noted in #17302 (comment) been addressed? |
jenkins compile win jdknext |
See #17289.