Skip to content

SystemCommandTasklet does not propagate errors #4483

Closed
@cachescrubber

Description

@cachescrubber

SystemCommandTasklet does not propagate errors

If a command executed by SystemCommandTasklet returns a non zero exit code, the system exit code is mapped to ExitStatus.FAILED. However, the overall step execution status is BatchStatus.COMPLETED, meaning the step (and the job) is completed successfully.

Environment
spring-batch 5.0.3

Steps to reproduce
Create a Job with a SystemCommandTasklet where the system command executed will return a non zero exit code.

Expected behavior
The error should be propagated to the Step, and ultimately to the overall Job execution status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: backport-to-5.0.xIssues that will be back-ported to the 5.0.x linefor: backport-to-5.1.xIssues that will be back-ported to the 5.1.x linehas: minimal-exampleBug reports that provide a minimal complete reproducible examplein: coretype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions