Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update image for springboot devfiles #6753

Merged
merged 1 commit into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ starterProjects:
components:
- name: tools
container:
image: quay.io/eclipse/che-java11-maven:next
image: registry.access.redhat.com/ubi8/openjdk-11:latest
memoryLimit: 768Mi
command: ['tail']
args: [ '-f', '/dev/null']
Expand All @@ -20,7 +20,7 @@ components:
mountSources: true
- name: runtime
container:
image: quay.io/eclipse/che-java11-maven:next
image: registry.access.redhat.com/ubi8/openjdk-11:latest
Copy link
Member

@rm3l rm3l Apr 20, 2023

Choose a reason for hiding this comment

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

/hold

I checked why the 'spring-boot' Maven plugin was surprisingly not found, and I think this has nothing to do with the container image.
It looks like the run command is being executed in the runtime container which has mountSources set to false. So without any local pom.xml files (coming from the project sources), Maven will try to resolve the short spring-boot plugin name from its known plugins by default.
I tested with the registry.access.redhat.com/ubi8/openjdk-11:latest image, and it behaves the same way, except that the command did not return any logs..
At least, the Dev Session started successfully by setting mountSources to true in the runtime container component. Well, it is still great to update the image name too.

Copy link
Member

Choose a reason for hiding this comment

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

/hold cancel

Unholding as it is still fine, but we can consider updating mountSources in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The error I have seen (and which has been fixed by changing the image) was occuring during the build command.

Copy link
Member

@rm3l rm3l Apr 21, 2023

Choose a reason for hiding this comment

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

Yes, for the build, I think it was a DNS resolution error (from what I can see in the job logs):

 [odo]  ✗  Building your application in container (command: defaultbuild) [2s]
  [odo] [INFO] Scanning for projects...
  [odo] Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.3.5.RELEASE/spring-boot-starter-parent-2.3.5.RELEASE.pom
  [odo] [ERROR] [ERROR] Some problems were encountered while processing the POMs:
  [odo] [FATAL] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.5.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.3.5.RELEASE/spring-boot-starter-parent-2.3.5.RELEASE.pom and 'parent.relativePath' points at no local POM @ line 5, column 10
  [odo]  @ 
  [odo] [ERROR] The build could not read 1 project -> [Help 1]
  [odo] [ERROR]   
  [odo] [ERROR]   The project com.example:demo:0.0.1-SNAPSHOT (/projects/pom.xml) has 1 error
  [odo] [ERROR]     Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.5.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.3.5.RELEASE/spring-boot-starter-parent-2.3.5.RELEASE.pom and 'parent.relativePath' points at no local POM @ line 5, column 10: 

Unknown host repo.maven.apache.org: Name or service not known -> [Help 2]

But once that passes, the run command (which runs the spring-boot:run goal) cannot run if the sources are not mounted (or if the Maven settings in the container image do not indicate how to resolve the spring-boot plugin).
I'll create a separate PR to mount the sources so that this can run properly..

memoryLimit: 768Mi
endpoints:
- name: "8080-tcp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ starterProjects:
components:
- name: tools
container:
image: quay.io/eclipse/che-java11-maven:next
image: registry.access.redhat.com/ubi8/openjdk-11:latest
memoryLimit: 768Mi
command: ['tail']
args: [ '-f', '/dev/null']
Expand All @@ -21,7 +21,7 @@ components:
mountSources: true
- name: runtime
container:
image: quay.io/eclipse/che-java11-maven:next
image: registry.access.redhat.com/ubi8/openjdk-11:latest
memoryLimit: 768Mi
endpoints:
- name: "8080-tcp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ starterProjects:
components:
- name: tools
container:
image: quay.io/eclipse/che-java11-maven:next
image: registry.access.redhat.com/ubi8/openjdk-11:latest
memoryLimit: 768Mi
command: ['tail']
args: [ '-f', '/dev/null']
Expand All @@ -21,7 +21,7 @@ components:
path: /data/cache/.m2
- name: runtime
container:
image: quay.io/eclipse/che-java11-maven:next
image: registry.access.redhat.com/ubi8/openjdk-11:latest
memoryLimit: 768Mi
endpoints:
- name: "8080-tcp"
Expand Down