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

add support for alibaba dragonwell #444

Closed
wants to merge 1 commit into from

Conversation

Accelerator1996
Copy link
Contributor

Description:
Add support for Alibaba Dragonwell JDK.

Related issue:
Issue #443

Check list:

  • README.md
  • docs/advanced-usage.md
  • src/distributions/distribution-factory.ts
  • src/distributions/dragonwell/installer.ts
  • src/distributions/dragonwell/models.ts
  • tests/data/dragonwell.json
  • tests/distributors/dragonwell-installer.test.ts

@Accelerator1996 Accelerator1996 requested a review from a team as a code owner January 12, 2023 08:00
@panticmilos
Copy link
Contributor

hi @Accelerator1996, thank you for the PR, we will take a look at it

@Accelerator1996 Accelerator1996 changed the title add dragonwell add support for alibaba dragonwell Jan 17, 2023
@Accelerator1996
Copy link
Contributor Author

Accelerator1996 commented Jan 28, 2023

hi @Accelerator1996, thank you for the PR, we will take a look at it

Hello, @panticmilos ! Could you please help me to review the PR? I tested it locally and it was fine. Thank you very much!

@Accelerator1996
Copy link
Contributor Author

Hi, @panticmilos ! There has been no reply for a long time. I want to know your opinions about this PR. If there is something inappropriate in my PR, I will revise it in time according to your opinions. Thank you so much!

@IvanZosimov
Copy link
Contributor

IvanZosimov commented Feb 6, 2023

Hi, @Accelerator1996 👋 Currently, we are investigating licenses of the Alibaba Dragonwell JDK. As soon as we finish we will get back to your PR.

@Accelerator1996
Copy link
Contributor Author

Hi, @Accelerator1996 👋 Currently, we are investigating licenses of the Alibaba Dragonwell JDK. As soon as we finish we will get back to your PR.

Thank you very much!

@Accelerator1996
Copy link
Contributor Author

I resolve the merge conflict and the local workflow works fine

@Accelerator1996
Copy link
Contributor Author

Hi, @IvanZosimov! How is the progress of the investigation? Some of our customers hope to simplify the process of deploying JDK through setup-java as soon as possible, and we are very eager to join your project. Thanks!

@IvanZosimov
Copy link
Contributor

Hi, @Accelerator1996, unfortunately, we are still in the process. Don't worry, as soon as it's done, we will let you know 😉

@mstoodle mstoodle mentioned this pull request Mar 7, 2023
2 tasks
@Accelerator1996
Copy link
Contributor Author

I solved the merge conflict and action workflow passed.
image

@Accelerator1996
Copy link
Contributor Author

Hi, @IvanZosimov . How is the progress of the investigation license? if possible, we are willing to provide relevant information to reduce your investigation work.

@gdams
Copy link
Contributor

gdams commented Jun 16, 2023

@IvanZosimov can you elaborate on what the licensing concerns are here? Dragonwell is shipped under the same GPL V2 (+ classpath exception) that the other OpenJDK distributions are.

This was linked to issues Jul 3, 2023
@IvanZosimov
Copy link
Contributor

Hi, @Accelerator1996 and @gdams. The question of licenses is solved, and we are starting to review and test the PR.

docs/advanced-usage.md Outdated Show resolved Hide resolved
majorVersion = splits[0];
version = splits.length >= 3 ? splits.slice(0, 3).join('.') : version;
}
const edition = majorVersion == '17' ? 'Standard' : 'Extended';
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please describe what is the difference between Standard and Extended version of the JDK. Also, I see that all versions have Standard and Extended editions but you have limited 17 to Standard only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you please describe what is the difference between Standard and Extended version of the JDK. Also, I see that all versions have Standard and Extended editions but you have limited 17 to Standard only.

  • Alibaba Dragonwell Standard Edition: OpenJDK upstream based and have more enhancements, including bug-fixing, security patches, tooling support, etc.
  • Alibaba Dragonwell Extended Edition: everything in the standard edition, plus: extra customized/significant features optimized for the cloud and widely used in Alibaba's production environment.
    And dragonwell17 only has standard edition.

Comment on lines 43 to 52
const resolvedVersion = matchVersions.length > 0 ? matchVersions[0] : null;
if (!resolvedVersion) {
const versionsMsg = core.isDebug()
? ' Available versions: ${availableVersions}'
: '';
throw new Error(
`Cannot find satisfied version for ${version}.${versionsMsg}`
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest to compile all these lines into one piece of code with the logic such as: If length of mathedVersions array is 0 -> throw; If not -> take the first satisfied version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd suggest to compile all these lines into one piece of code with the logic such as: If length of mathedVersions array is 0 -> throw; If not -> take the first satisfied version.

But I should return the value of resolvedVersion, so I need to define it as above.

src/distributions/dragonwell/installer.ts Outdated Show resolved Hide resolved
Comment on lines +62 to +65
if (['8', '11', '17'].includes(majorVersion) != true) {
throw new Error('Support dragonwell versions: 8, 11, 17');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we going to change these lines of code when a new version of the Dragonwell revealed? I believe throwing the error after the version matching operation is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is the pre-operation of the full check. If there is an invalid majorVersion, it can reduce the frequency of request to the website.

arch = arch.includes('x86') ? 'x64' : arch;

const availableVersionsUrl =
'https://dragonwell-jdk.io/map_with_checksum.json';
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently this link doesn't work and it didn't yesterday. The whole https://dragonwell-jdk.io is down. I have concerns about reliability of this API. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently this link doesn't work and it didn't yesterday. The whole https://dragonwell-jdk.io is down. I have concerns about reliability of this API. What do you think?

Sorry, our website is closed for a few days for some reason. I redeployed this morning.

src/distributions/dragonwell/installer.ts Outdated Show resolved Hide resolved
src/distributions/dragonwell/installer.ts Outdated Show resolved Hide resolved
src/distributions/dragonwell/installer.ts Outdated Show resolved Hide resolved
src/distributions/dragonwell/installer.ts Outdated Show resolved Hide resolved
@Accelerator1996
Copy link
Contributor Author

image
@IvanZosimov Hello! I have modified the code according to your opinion, and verified it with actions, but this error is not caused by dragonwell. I hope you can help me to review again when you are free. Thank you very much!

@Accelerator1996
Copy link
Contributor Author

@IvanZosimov Sorry, I've update code to fix the bug about 'arch' is never reassigned.

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.

Add Alibaba Dragonwell JDK Add support for Dragonwell binaries
5 participants