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

restartable job not resuming the failed step when initialized as FlowJob #4379

Open
fabioportieri opened this issue May 19, 2023 · 1 comment
Labels
related-to: flow-definition status: waiting-for-reporter Issues for which we are waiting for feedback from the reporter type: bug

Comments

@fabioportieri
Copy link

Bug description

If i configure a restartable job as a flow job, and during a step it fails with an error, once i restart it the job resume from the next step,
terminating succesfully in case of single step jobs, and not retrying from the failed step
if the job is configured as SimpleJob, it works as expected

Environment
java 11
spring batch 4.3.7

Steps to reproduce
Steps to reproduce the issue.

configure a single step job like so:

 @Bean
    public Job job(Step failingStep) {
        return this.jobBuilderFactory.get("job")
                .incrementer(new RunIdIncrementer())
                .flow(failingStep)
                .end()
                .build();
    }

where failingStep is bound to throw an exception somewhere, thus completing the job as FAILED

Expected behavior
upon restarting of the job i expect the same step to be reprocessed, instead it goes to the next

with this job configuration it works as expected:

 @Bean
    public Job job(Step failingStep) {
        return this.jobBuilderFactory.get("job")
                .incrementer(new RunIdIncrementer())
                .start(failingStep)
                .end()
                .build();
    }

i'm not sure if it's working as intended and i need to configure a JobExecutionDecider to implement restartability of a chunk based step,
if so, please advice on how to do it

thank you

@fabioportieri fabioportieri added status: waiting-for-triage Issues that we did not analyse yet type: bug labels May 19, 2023
@fmbenhassine
Copy link
Contributor

Thank you for opening this issue. We do not exclude that this could be a bug in Spring Batch. However, we would like to validate that with a minimal complete verifiable example.

Could you please take some time to create a minimal example that reproduces the problem? To help you in reporting your issue, we have prepared a project template that you can use as a starting point. Please check the Issue Reporting Guidelines for more details about this.

Thank you for your collaboration.

@fmbenhassine fmbenhassine added status: waiting-for-reporter Issues for which we are waiting for feedback from the reporter and removed status: waiting-for-triage Issues that we did not analyse yet labels May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
related-to: flow-definition status: waiting-for-reporter Issues for which we are waiting for feedback from the reporter type: bug
Projects
None yet
Development

No branches or pull requests

2 participants