Skip to content

Conversation

@diqksrk
Copy link

@diqksrk diqksrk commented Jul 7, 2024

see #41336

I have added logic to determine the application's state based on the job's status

@pivotal-cla
Copy link

@diqksrk Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@diqksrk Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 7, 2024
@diqksrk diqksrk closed this Jul 7, 2024
@diqksrk diqksrk reopened this Jul 7, 2024
@diqksrk diqksrk changed the title add job system exiter add validate job status code Jul 7, 2024
@codespearhead
Copy link

Does this patch intent to solve #41336 ?

If so, can you link this PR to that issue, so that issue is closed automatically when this PR is merged?

To do that, you just need to add the exact word combination in the PR description:

fix #41336

@scottfrederick
Copy link
Contributor

Thanks for trying to help @codespearhead, but the steps you mention are not necessary. When we're ready, we will manually close the issue as superseded by the PR, and we will ensure that the commit comments contain what's necessary to track back to the PR.

@wilkinsona
Copy link
Member

The changes proposed here shouldn't be necessary as JobExecutionExitCodeGenerator should produce an exit code based on the status of an jobs that have been executed:

@Override
public int getExitCode() {
for (JobExecution execution : this.executions) {
if (execution.getStatus().ordinal() > 0) {
return execution.getStatus().ordinal();
}
}
return 0;
}

If you use SpringApplication.exit, as I linked to above, this exit code generator should be involved in deciding the JVM's exit code. I'm going to close this one as I don't think the changes are needed. If you're using System.exit and SpringApplication.exit and it isn't working as expected, a different change to the one proposed here will be needed to fix it. We can figure that out in #41336.

@wilkinsona wilkinsona closed this Jul 9, 2024
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants