GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add an error condition for an unstable Microsoft OpenJDK build by dmitry-shibanov · Pull Request #263 · actions/setup-java

Conversation

@dmitry-shibanov

@dmitry-shibanov dmitry-shibanov commented Dec 13, 2021 •
edited by MaksimZhukov
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description:
In scope of this pull request we add condition to throw an error for an unstable Microsoft OpenJDK build. Some distributions support early access versions with syntax 11-ea. For now Microsoft OpenJDK does not provide ea versions. The action will not throw an error if user tries to install ea version for Microsoft OpenJDK

Related issue:

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dmitry-shibanov
throw error if version is not stable
49b34f3
MaksimZhukov
MaksimZhukov approved these changes Dec 13, 2021
View reviewed changes
@dmitry-shibanov

dmitry-shibanov commented Dec 13, 2021

Copy link
Copy Markdown
Contributor Author

Hello everyone. Could you please take a look at these changes.
cc: @brcrista @brendandburns

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brcrista
brcrista reviewed Dec 13, 2021
View reviewed changes
Comment thread src/distributions/microsoft/installer.ts Outdated
}

if (!this.stable) {
throw new Error('Unstable versions are not supported');

@brcrista brcrista Dec 13, 2021

Copy link
Copy Markdown
Contributor

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.

What's the value of adding a special error message here? We only have two hardcoded versions currently. If someone requests something that's not one of those versions, we'll raise an error and show the available versions (lines 62-70 of this file).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dmitry-shibanov dmitry-shibanov Dec 14, 2021

Copy link
Copy Markdown
Contributor Author

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 can get ga/ea versions of java releases, but Microsoft OpenJDK builds do not have ea versions. If we pass 11-ea in java-version input, the action won't throw an error and install stable version, because the action normalizes version to 11 and set stable to the false value. For now I think we should write a condition to throw an error for ea builds.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brcrista reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@brcrista brcrista Dec 14, 2021

Copy link
Copy Markdown
Contributor

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.

Suggested change
throw new Error('Unstable versions are not supported');
throw new Error('Early access versions are not supported');

While it's true that it's not a stable version, "unstable" has a stronger denotation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dmitry-shibanov dmitry-shibanov Dec 14, 2021

Copy link
Copy Markdown
Contributor Author

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. Thank you.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dmitry-shibanov
fix error message for ea version
4f4e294
brcrista
brcrista approved these changes Dec 14, 2021
View reviewed changes
@dmitry-shibanov
dmitry-shibanov merged commit d23aed3 into actions:main Dec 15, 2021
tdfacer pushed a commit to ifit/setup-java that referenced this pull request Oct 7, 2025
@dmitry-shibanov
Add an error condition for an unstable Microsoft OpenJDK build (actio…
13f43f5
…ns#263)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@brcrista brcrista brcrista approved these changes
@MaksimZhukov MaksimZhukov MaksimZhukov approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dmitry-shibanov @brcrista @MaksimZhukov
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.