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

Add logging for task stop operations #14192

Merged
merged 6 commits into from
May 30, 2023

Conversation

findingrish
Copy link
Contributor

No description provided.

@findingrish findingrish marked this pull request as ready for review May 19, 2023 10:04
@findingrish findingrish changed the title Improve error message Add logging for task stop operations May 19, 2023
.onHttpError(e -> Either.value(false))
.onNotAvailable(e -> Either.value(false))
.onHttpError(e -> {
log.warn("Task [%s] coundln't be stopped because of http request failure.", id);
Copy link
Contributor

Choose a reason for hiding this comment

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

we also want to log what this failure was. is it something that e.getMessage will have?

return Either.value(false);
})
.onNotAvailable(e -> {
log.warn("Task [%s] coundln't be stopped because it is not available.", id);
Copy link
Contributor

Choose a reason for hiding this comment

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

what does being "not available" exactly mean here? The task port is not reachable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this corresponds to ServiceNotAvailableException which is thrown when the service locator returns empty set of locations

return isSuccess(response);
boolean isSuccess = isSuccess(response);
if (!isSuccess) {
log.warn("Task [%s] coundln't be stopped because of http request failure.", id);
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to get the exact http request failure?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@abhishekagarwal87 abhishekagarwal87 merged commit 2086ff8 into apache:master May 30, 2023
71 checks passed
@abhishekagarwal87 abhishekagarwal87 added this to the 27.0 milestone Jul 19, 2023
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.

None yet

2 participants