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

Fix SystemCommandTasklet to propagate error when exit status is failed #4566

Conversation

injae-kim
Copy link
Contributor

Fixes #4483.

Motivation

Modification

  • Fix SystemCommandTasklet to propagate error when ExistStatus.FAILED

RepeatStatus exitStatus = tasklet.execute(stepContribution, null);

assertEquals(RepeatStatus.FINISHED, exitStatus);
assertEquals(ExitStatus.FAILED, stepContribution.getExitStatus());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssertionFailed
Expected :exitCode=FAILED;exitDescription=
Actual   :exitCode=EXECUTING;exitDescription=

With L329, this test failed so I just remove it.

Should we set contribution.setExitStatus(FAILED); on SystemCommandTasklet L128?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we need to update the contribution's exit status in both cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ updated! thank you :)

@fmbenhassine
Copy link
Contributor

Thank you for the update. LGTM now 👍 Rebased, squashed and merged as 692e769. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SystemCommandTasklet does not propagate errors
2 participants