-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Added feature to download boot jdk on demand #3725
Conversation
The windows label is wrong. I can not change t on my own. Please fix it to (linux) if possible. |
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.
A block has been put on this Pull Request as this repository is temporarily under a code freeze due to an ongoing release cycle.
If this pull request needs to be merged during the release cycle then please comment /merge
and a PMC member will be able to remove the block.
If the code freeze is over you can remove this block by commenting /thaw
.
I guess on windows, I will extract temurin-build/build-farm/platform-specific-configurations/windows.sh Lines 47 to 99 in 95385f4
downloader.sh as downloadWindowsBootJDK aybe with some adjustments... thoughts?
|
ps: I had noticed the bash-lint issues, mos tof them are valid. Will elaborate as the review progresses here. |
Now works for windows and linuxes. I do not have more paltforms to try on. Please consider this. |
Thanx a lot for eyball! |
@judovana Needs a rebase |
yup. Thats exactly the reason why I do not want to change the extracted download code in this PR. |
d4a7f6f
to
040bc17
Compare
currenlty only dne for linux, shoudl be easy to extend for windows, not sure what whith other platfroms. Is done via magic parameter of `download` for -J: -J download
It seems that the directory was changed in recent times from jdk-8... to jdk8...
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
9b2614d
to
10bc5b5
Compare
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'm broadly OK with the implementation. Requesting other reviewers
/thaw |
Pull Request unblocked - code freeze is over.
Tried but I don't trust the labeller not to add windows back in again ;-) |
sbin/prepareWorkspace.sh
Outdated
if [ -e "$bootDir" ] ; then | ||
echo "Reusing $bootDir" | ||
else | ||
source "$SCRIPT_DIR/../build-farm/platform-specific-configurations/downloaders.sh" |
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.
Architecturally I'm not a fan of this. The stuff in the root of this repository and sbin
is supposed to be fully independent. The bits in build-farm
is for the adoptium build processes and configures the environment for our setup and wraps around the other stuff. Calling out from sbin
to platform-specific-configurations
is therefore not ideal.
I like the idea of the option to specify a boot JDK to download, but I think this implementation will need some refinement first.
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.
It should be quite strightforward to move downloaders.sh next to common.sh and refactor them so the $bootDir
is not missused.
I will elaborate on the bootDir
as I really do not like it. Do you have any prefferences on downloaders.sh
location?
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'm undecided but marginally leaning towards sbin
or sbin/common
. WDYT @andrew-m-leonard ?
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.
Architecturally I'm not a fan of this. The stuff in the root of this repository and
sbin
is supposed to be fully independent. The bits inbuild-farm
is for the adoptium build processes and configures the environment for our
Actually there is an misunderstanding, caused by bootJdk
variable name clash. I will rework it so it is no longer there.
The if [ -e "$bootDir" ] ; then
is independent local check, if boot jdk was already downloaded, so it is not downloaded again.
Pleae advice on downloaders.sh location
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.
done 00b599c
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.
hmmh. I would probably leave the file in build-farm. Just to be sure, that it is clear, where the logic is borrowed from.
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'm undecided but marginally leaning towards
sbin
orsbin/common
. WDYT @andrew-m-leonard ?
@sxa yes I agree with you, looking at this again I feel uncomfortable that "sbin" code is calling out to "build-farm", as this could lead code-creep in the future architecturally in the wrong direction.
@judovana We should move the downloaders.sh to sbin/common, which is the common place that both sbin and build-farm pull "common" things from please.
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.
Sure, Thanx a lot, on it!
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.
done. Tested on win x86, el8 aarch64 and f38 x64 aganst jdk8,17 and 21.
ping please? |
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
@sxa its upt o you now
I had resolved the major issue you had (the global variable) but the shared file remained in |
/integrate |
sbin/prepareWorkspace.sh
Outdated
if [ -e "$bootDir" ] ; then | ||
echo "Reusing $bootDir" | ||
else | ||
source "$SCRIPT_DIR/../build-farm/platform-specific-configurations/downloaders.sh" |
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'm undecided but marginally leaning towards
sbin
orsbin/common
. WDYT @andrew-m-leonard ?
@sxa yes I agree with you, looking at this again I feel uncomfortable that "sbin" code is calling out to "build-farm", as this could lead code-creep in the future architecturally in the wrong direction.
@judovana We should move the downloaders.sh to sbin/common, which is the common place that both sbin and build-farm pull "common" things from please.
build-farm/platform-specific-configurations/downloaders.sh -> sbin/common/downloaders.sh
done. Tested on win x86, el8 aarch64 and f38 x64 aganst jdk8,17 and 21. |
rm -rf "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/installedalsa" || true | ||
rm -rf "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/installedfreetype" || true | ||
rm -rf "${BUILD_CONFIG[WORKSPACE_DIR]}/downloaded-boot-jdk-${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" || true |
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'm inclined to suggest leaving this in place as a cache for anyone using our scripts since the JDK is quite a big download, but I'm also ok with this.
I was going to comment on the fact that || true
is unnecessary with rm -f
but sine that's also in the previous three lines I'll ignore it ;-)
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 agree, and I'm keeping it. It will be removed only if if [[ "${BUILD_CONFIG[CLEAN_LIBS]}" == "true" ]]; then
oook? Yah, I was wondering on the double passig rf || true, but left in the style!
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.
LGTM and I've very happy to see all of this logic moved out of the platform-specific-configurations
directory :-)
I've done a few tests on Linux but not Windows.
In the future we should look at doing the same for AIX, Solaris and macos so I suggest creating an issue for that since I'm not going to mandate that we do it now.
Also, one other question for anyone else reading this - should we default to download
if we can't find a JDK in any other location?
/integrate |
that would be NACK by me. It is not small dependence, and one should have boot jdk around. The -J download is highly comfortable option issue created: #3804 |
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
currenlty only dne for linux, shoudl be easy to extend for windows, not sure what whith other platfroms.
Is done via magic parameter of
download
for -J: -J download