-
Notifications
You must be signed in to change notification settings - Fork 583
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
Weird behavior when running Spring Cloud Task applications with Spring Boot Native support #5886
Comments
@klopfdreh Do you have any pod logs from the task application or data flow server during the launch? |
I had to rerun it and to change the urls / package names: s3-uploader-native-task-0lllwn2nog-hrkbq-s3-uploader-native-task-q2225oz2ww.log |
Hey @corneil - here is the pod log with logging:
level:
org.springframework.jdbc.core: TRACE
spring:
jpa:
show-sql: true
properties:
hibernate:
format_sql: true s3-uploader-native-task-g666gry1g7-mqg5k-s3-uploader-native-task-d222pqonz6.log It seems that this is caused by See the following update statement in the log
Application Properties:
Platform properties:
|
It seems that the task name is not resolved correctly at the start of the task application. I had a deeper look into this - the interface I have no idea why it is switched at start. |
I changed |
I found a workaround: spring:
application:
name: ${spring.cloud.task.name}
cloud:
task:
name: ${SPRING_CLOUD_TASK_NAME:s3-uploader-native-task} Maybe this is an issue of |
@corneil - did you had the chance to also test it, yet? |
Just a small shoutout: We managed to migrate 11 task applications to Spring Boot Native (with this workaround here) and a lot of commits to various projects. |
Description:
Because of the startup time we are currenty evaluating to migrate our Spring Cloud Task applications to Spring Boot Native.
We managed to get the native application running and uploading files to the s3 bucket, but there is a weird behavior of the native application compared to the java application in the Spring Cloud Data Flow UI.
Setup
We created an application with type
task
and Spring Boot versionSpring Boot 3.x
and URIdocker://...../<imagename>:<version>
(the docker image is a native image)We created a task which just points towards the application
We did the same for a Java docker image. So there are two applications
s3-uploader-native-app
ands3-uploader-app
and two taskss3-uploader-native-task
ands3-uploader-task
We launched the task of the native application like the task of the java application
Outcome
Java Application: It runs like expected and if you click on the execution id everything is fine. (The task is listed at the side of the information)
Native Application: The application executed without any errors, but if you click on the execution id some information are missing (The task is NOT listed at the side of the information)
There is also a difference in the task executions view: The java application finished with the execution name
s3-uploader-task
. The native application finished with the execution names3-uploader-native-app
During the runtime however, the native task is executing with the correct name
s3-uploader-native-task
- it is switched tos3-uploader-native-app
when completed:If you click on the name of the native task execution in the task executions view (not on the execution id) an error occurs and you are redirected to the task view
Also an error occurs if you click on the execution id and after this on the job execution id (I guess it is because the UI can't resolve the task execution for the job execution)
Release versions:
Custom apps:
N/A
Steps to reproduce:
native-image
of Liberica NIK orspring-boot-maven-plugin
withpacketo buildpacks
to create a native image of the Spring Cloud Task applicationScreenshots:
See description
Additional context:
When I manually change the name of any task execution in the database from
s3-uploader-native-app
tos3-uploader-native-task
everthing is like it should be.The text was updated successfully, but these errors were encountered: