Description:
When relaunching a failed execution of a Spring Boot 3/Spring Batch 5 batch, it doesn't relaunch properly. Instead, it creates a new JobInstance and starts all over again. It also sends some weird JobExecutionParams that we are not entirely understanding, where the run.id appears multiple times with different type of values and many of our arguments are also duplicated.
Note that we are using an RunIncrementerId in our jobs.
Release versions:
2.11.X
Steps to reproduce:
The steps are:
- Create a job that fails in a chunk step.
- Try to restart it.
Screenshots:
The Job_Executions. The one we are launching first and making it fail is the number 54.

These are the arguments sent and recorded in the database:

After it fails, we relaunch, and we see these arguments:

And the new created JobInstance:

Which makes the newly restarted job not being able to pick up the execution where it left it.
Additional context:
Relaunch in Spring Boot 2 version works, our jobs didn't have any problem with that, saving the arguments correctly for the future relaunches:

It stays the same throughout the executions, while with Spring Boot 3 doesn't.
While debugging and trying to relaunch a SB3 job, we see that in this method

When mixing up the task params and the job params, it gets the run.id as a long:

But then it appears as a double in the database:

In case this helps identifying why this happens.