Skip to content

JobExecution returned by SimpleJobExplorer.getLastJobExecution() does not have StepExecutions #3810

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

Closed
lucaliechti opened this issue Dec 2, 2020 · 1 comment
Labels
status: duplicate Issues that are duplicates of other issues

Comments

@lucaliechti
Copy link

lucaliechti commented Dec 2, 2020

Expected Behavior

When calling SimpleJobExplorer.getLastJobExecution(JobInstance jobInstance), a JobExecution with all its StepExecutions is returned.

Current Behavior

The stepExecutions variable of the returned JobExecution is empty. Calling SimpleJobExplorer.getJobExecutions(JobInstance jobInstance) and taking the last element from there behaves differently; the StepExecutions are there.

Context

The workaround is described in the section above (just take the last element of the getJobExecutions return value). However, I lost some time until I found out about these different implementations. The documentation does not mention anything about missing StepExecutions. I guess there are good reasons behind this, but they are not clear to me and I didn't see them in the documentation.

As I guess this method is most often used in the process of recovering state from an unfinished job, I would expect the StepExecution to be important here. But maybe there are good reasons which I'm unaware of. In this case I would still at least update the Javadoc.

@lucaliechti lucaliechti added status: waiting-for-triage Issues that we did not analyse yet type: feature labels Dec 2, 2020
@fmbenhassine
Copy link
Contributor

Thank you for reporting this. The issue has been fixed in #3943.

@fmbenhassine fmbenhassine added status: duplicate Issues that are duplicates of other issues and removed status: waiting-for-triage Issues that we did not analyse yet type: feature labels May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate Issues that are duplicates of other issues
Projects
None yet
Development

No branches or pull requests

2 participants