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

feature: UnexpectedTaskExecutionException #5402

Merged

Conversation

klopfdreh
Copy link
Contributor

@klopfdreh klopfdreh commented Jul 17, 2023

It would be great if the CTR throws an UnexpectedTaskExecutionException in favor of UnexpectedJobExecutionException so that it is possible to create an ApplicationListener which can handle certain error causes.

Because the TaskExecution itself is not serializable, the fields are assigned to the UnexpectedTaskExecutionException.

If this code is fine for you it also needs to be merged into: #5368

The UnexpectedTaskExecutionException also uses the ExitCodeGenerator interface so that the error code of a task which has failed is also forwarded through the CTR to its caller.

If the exit code is null, the UnexpectedTaskExecutionException returns -1

@cppwfs cppwfs added the status/on-hold For various reasons is on hold label Jul 17, 2023
@klopfdreh
Copy link
Contributor Author

klopfdreh commented Jul 17, 2023

@cppwfs - This PR is also mentioned for the time period after 2.11.0, but in general - does the change looks fine for you?

@cppwfs
Copy link
Contributor

cppwfs commented Jul 19, 2023

Thank you for the contribution. LGTM. But I want to test it once we get PR 5404 merged.

@klopfdreh
Copy link
Contributor Author

Great! Thanks in advance for testing it! 👍

@klopfdreh
Copy link
Contributor Author

@cppwfs / @onobc - due to the reason that this is only a small change and tests are already present - can you consider to integrate it in 2.11.1?

@onobc onobc added this to the 2.11.1 milestone Sep 25, 2023
@onobc
Copy link
Contributor

onobc commented Sep 25, 2023

Hi @klopfdreh , should not be a problem. If we run into any issues we will ping back here.

@klopfdreh
Copy link
Contributor Author

Sure - at any time 👍

@onobc onobc modified the milestones: 2.11.1, 2.11.2 Oct 3, 2023
@onobc
Copy link
Contributor

onobc commented Oct 6, 2023

HI @klopfdreh ,

Just wanted to give you a heads up, we are shipping a very quick 2.11.1 that contains CVE fixes only. No sooner had we released than 2 new CVEs were discovered in libraries we use. We are doing planning for 2.11.2 early next week and will include this PR in the next release which should be out relatively quick.

@klopfdreh
Copy link
Contributor Author

Thanks for the information! 👍

@onobc
Copy link
Contributor

onobc commented Nov 9, 2023

Hi @klopfdreh , do you mind rebasing against main?

@klopfdreh klopfdreh force-pushed the feature/unexpectedtaskexecutionexception branch from 4defa79 to 81bdc43 Compare November 9, 2023 05:12
@klopfdreh
Copy link
Contributor Author

Hi @klopfdreh , do you mind rebasing against main?

Done - let's see what the CI does and if all tests are running as expected.

I force-pushed the changes based on the current main.

@onobc onobc removed the status/on-hold For various reasons is on hold label Nov 9, 2023
Copy link
Contributor

@onobc onobc left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @klopfdreh. Awesome work!

@onobc onobc merged commit 556658b into spring-cloud:main Nov 10, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants