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

[Java] - features issue #1101 - installs -tem instead -ms for lts installation #1021

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

gauravsaini04
Copy link
Contributor

@gauravsaini04 gauravsaini04 commented Jun 28, 2024

Feature name:

  • Java

Description:

This PR is for solution to following issue:

  • Features issue #1011
    • jdk lts resulted in installation of 21.x-tem instead of 21.x.x-ms, which is not the intended behaviour.

Changelog:

  • Updated install.sh

Checklist:

  • Checked that applied changes work as expected

@gauravsaini04 gauravsaini04 requested a review from a team as a code owner June 28, 2024 07:08
src/java/install.sh Outdated Show resolved Hide resolved
src/java/install.sh Show resolved Hide resolved
src/java/install.sh Outdated Show resolved Hide resolved
src/java/install.sh Show resolved Hide resolved
@samruddhikhandale samruddhikhandale linked an issue Jun 28, 2024 that may be closed by this pull request
src/java/install.sh Outdated Show resolved Hide resolved
src/java/install.sh Show resolved Hide resolved
src/java/install.sh Outdated Show resolved Hide resolved
src/java/install.sh Outdated Show resolved Hide resolved
src/java/install.sh Outdated Show resolved Hide resolved
src/java/devcontainer-feature.json Outdated Show resolved Hide resolved
src/java/install.sh Outdated Show resolved Hide resolved
if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ] || [ "${requested_version}" = "lts" ]; then
if [ "${requested_version}" = "lts" ]; then
check_packages jq
all_lts_versions=$(curl -s https://api.adoptopenjdk.net/v3/info/available_releases)
Copy link
Member

Choose a reason for hiding this comment

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

I like the approach of how you are finding the LTS version 🎉

image

Quick question, who hosts this API? Is it https://adoptium.net/ or someone else?
We need to ensure it is safe to use before we use this approach

if [ "${requested_version}" = "lts" ]; then
check_packages jq
all_lts_versions=$(curl -s https://api.adoptopenjdk.net/v3/info/available_releases)
major_version=$(echo "$all_lts_versions" | jq -r '.available_lts_releases | sort | .[-1]')
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we directly use most_recent_lts property?

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.

java installed 21.x-tem instead of -ms by default
3 participants