spring-cloud-task icon indicating copy to clipboard operation
spring-cloud-task copied to clipboard

Application name reset when TaskExecution created by TaskRepository

Open zargarf opened this issue 3 years ago • 1 comments
trafficstars

Similarly to Issue 861, if you create a TaskExecution externally using the TaskRepository.createTaskExecution(TaskExecution) , where the app name of the TaskExecution is "applicationA". When the task is updated by the TaskLifecycleListener.doTaskStart() method in the task execution pod, the appName is overwritten with the default from the TaskNameResolver rather than keeping the value that was initially used.

zargarf avatar Sep 15 '22 15:09 zargarf

Hello @zargarf I originally marked this as a bug as with #861. But with this issue it is a bit different. In this case we want the user the ability to override the name of the task at execution time. Where in 861 the user should be able to override the start time prior to execution and not have the system override it.

cppwfs avatar Sep 19 '22 13:09 cppwfs

This is a good question, I had to think about it. In this case if a user specifies a different application.name at startup time then by the nature of boot it should override the default name (whether it is stored in the database before the app starts or if it is a property in the application.properties file. If you have any additional information we can discuss and reopen the case.

cppwfs avatar Feb 16 '23 21:02 cppwfs