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 new java-quarkus devfile version with java 21 as default #370

Merged
merged 1 commit into from May 23, 2024

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Apr 22, 2024

What does this PR do?:

Add new java-quarkus devfile version:

  • Use registry.access.redhat.com/ubi8/openjdk-21:1.19-1 as a container image.
  • Add j=21 query parameter to download the sample project configured to java 21.

Which issue(s) this PR fixes:

Link to github issue(s)

fixes devfile/api#1542

PR acceptance criteria:

  • Contributing guide
    Have you read the devfile registry contributing guide and followed its instructions?
  • Test automation
    Does this repository's tests pass with your changes?
  • Documentation
    Does any documentation need to be updated with your changes?
  • Check Tools Provider
    Have you tested the changes with existing tools, i.e. Odo, Che, Console? (See devfile registry contributing guide on how to test changes)

How to test changes / Special notes to the reviewer:

Copy link

openshift-ci bot commented Apr 22, 2024

Hi @vinokurig. Thanks for your PR.

I'm waiting for a devfile member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@Jdubrick Jdubrick left a comment

Choose a reason for hiding this comment

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

Does this work locally in odov3? I'm unsure if the failure is related to our CI or the stack itself.

https://github.com/devfile/registry/actions/runs/8782390440/job/24096589141?pr=370#step:10:24997

cc @thepetk might be related to a combination of both because java stacks have given us issues in the past.

stacks/java-quarkus/1.5.0/devfile.yaml Outdated Show resolved Hide resolved
stacks/java-quarkus/1.5.0/devfile.yaml Outdated Show resolved Hide resolved
@michael-valdron
Copy link
Member

Does this work locally in odov3? I'm unsure if the failure is related to our CI or the stack itself.

https://github.com/devfile/registry/actions/runs/8782390440/job/24096589141?pr=370#step:10:24997

cc @thepetk might be related to a combination of both because java stacks have given us issues in the past.

@Jdubrick Could be a result of what I've provided feedback on: #370 (comment)

FYI @vinokurig

@thepetk
Copy link
Contributor

thepetk commented Apr 23, 2024

/retest

@thepetk
Copy link
Contributor

thepetk commented Apr 23, 2024

Does this work locally in odov3? I'm unsure if the failure is related to our CI or the stack itself.

https://github.com/devfile/registry/actions/runs/8782390440/job/24096589141?pr=370#step:10:24997

cc @thepetk might be related to a combination of both because java stacks have given us issues in the past.

@Jdubrick locally it works for me by downloading the .zip file extract it and then run the devfile inside. Is strange that it doesn't work if I directly do:

$ odo init --devfile-path https://raw.githubusercontent.com/vinokurig/registry/java-quarkus-j-21/stacks/java-quarkus/1.5.0/devfile.yaml --name some

$ odo dev

Error:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.041 s
[INFO] Finished at: 2024-04-23T11:30:36Z
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/projects). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

@vinokurig Suggestion commits need amending to include the sign-off footer to pass DCO.

@michael-valdron
Copy link
Member

This PR will close devfile/api#1542

@vinokurig
Copy link
Contributor Author

vinokurig commented May 10, 2024

@michael-valdron @Jdubrick Looks like all comments have been addressed, could you please take a look?

@Jdubrick
Copy link
Contributor

/ok-to-test

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

Running odo dev gives the following error:

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.10.0:dev (default-cli) on project code-with-quarkus: Detected Maven Version (3.8.5)  is not supported, it must be in [3.8.6,). -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

This is related to devfile/api#1541 as applying this suggested fix solves the build error.

@Jdubrick
Copy link
Contributor

Does this work locally in odov3? I'm unsure if the failure is related to our CI or the stack itself.
https://github.com/devfile/registry/actions/runs/8782390440/job/24096589141?pr=370#step:10:24997
cc @thepetk might be related to a combination of both because java stacks have given us issues in the past.

@Jdubrick locally it works for me by downloading the .zip file extract it and then run the devfile inside. Is strange that it doesn't work if I directly do:

$ odo init --devfile-path https://raw.githubusercontent.com/vinokurig/registry/java-quarkus-j-21/stacks/java-quarkus/1.5.0/devfile.yaml --name some

$ odo dev

Error:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.041 s
[INFO] Finished at: 2024-04-23T11:30:36Z
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/projects). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

New changes work for me locally by doing it this way, I'm curious if it is possible to not use the zip way and instead mimic what all the other devfiles are doing to get the source files? This may be why Quarkus is giving us issues in tests as it is the only stack that uses zip to get the source.

@michael-valdron
Copy link
Member

I'm curious if it is possible to not use the zip way and instead mimic what all the other devfiles are doing to get the source files? This may be why Quarkus is giving us issues in tests as it is the only stack that uses zip to get the source.

@Jdubrick We need to use zip for Java Quarkus because the starter projects are generated as archived source projects on request from the Code with Quarkus community and the Code with Quarkus Red Hat product web services.

@jerolimov jerolimov removed their request for review May 14, 2024 15:26
@vinokurig
Copy link
Contributor Author

@michael-valdron

Running odo dev gives the following error:

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.10.0:dev (default-cli) on project code-with->quarkus: Detected Maven Version (3.8.5)  is not supported, it must be in [3.8.6,). -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

This is related to devfile/api#1541 as applying this suggested fix solves the build error.

Could you please elaborate more on how to fix the build? I tried to use the ./mvnw but the script is not present as the project is not downloaded.

@vinokurig vinokurig requested a review from a team as a code owner May 16, 2024 12:47
Signed-off-by: ivinokur <ivinokur@redhat.com>
@vinokurig
Copy link
Contributor Author

Also aligned with #399

Copy link
Contributor

@Jdubrick Jdubrick left a comment

Choose a reason for hiding this comment

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

New changes are working for me with odov3 for both starter projects. After downloading the zip files and adding the devfile to them I can run odo commands and they are successful.

@mohitsuman
Copy link

@michael-valdron can you please review this and merge, as this would be needed for IDE extensions using devfiles.

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

With the #399 changes, changes here looks good to me.

Need a sign off from stack owner.

cc @maxandersen

Copy link
Collaborator

@svor svor left a comment

Choose a reason for hiding this comment

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

lgtm

@openshift-ci openshift-ci bot added the lgtm Looks good to me label May 22, 2024
@maxandersen
Copy link
Collaborator

If you've tested this working I'm fine merging but why is it the force move to 21 is required for ide ext release ? Is the fixes for java 17 not sufficient?

@datho7561
Copy link

@maxandersen It seems the projects being generated by code.quarkus.io use Java 21 by default. When trying out vscode-openshift, Don Schenck ran into this; the project he was working with used Java 21, and the suggested Devfile used Java 17.

@maxandersen
Copy link
Collaborator

Yes but code.quarkus.redhat.com will use java 17.

Anyhow - seems no way for dev file to handle these differences well thus Ill +1 and if any reports of product issues we'll have to tell users to manually update the image.

Copy link
Collaborator

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

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

+1; knowing devfile will fail for red hat products defaults but do work for latest greatest Quarkus community default.

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

@Jdubrick Jdubrick left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented May 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jdubrick, maxandersen, michael-valdron, svor, vinokurig

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Jdubrick,michael-valdron]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron michael-valdron merged commit c3262a6 into devfile:main May 23, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
9 participants