Skip to content

[ML] Migrate stream to core error parsing #120722

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

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

prwhelan
Copy link
Member

Avoid trapping Throwable by rethrowing it on another thread, allowing us to reuse the generateFailureXContent for Exceptions and match the new 9.0 format.

Avoid trapping Throwable by rethrowing it on another thread, allowing us
to reuse the `generateFailureXContent` for Exceptions and match the new
9.0 format.
@prwhelan prwhelan added >enhancement :ml Machine learning Team:ML Meta label for the ML team v9.0.0 labels Jan 23, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @prwhelan, I've created a changelog YAML for you.

@prwhelan prwhelan marked this pull request as ready for review January 23, 2025 15:42
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

e = (Exception) t;
} else {
// if not exception, then error, and we should not let it escape. rethrow on another thread, and inform the user we're stopping.
ExceptionsHelper.maybeDieOnAnotherThread(t);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, do we need this because we're in a listener? Or why is it that we want to throw the error on a different thread?

Copy link
Member Author

@prwhelan prwhelan Jan 23, 2025

Choose a reason for hiding this comment

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

My thought process was to throw on another thread and forward the error to the user, though now that I think about it maybe we should invert that (throw on this thread and forward the error on another thread), but perhaps I'm over thinking it.

This is what we did for Bedrock here - #115868

@prwhelan prwhelan enabled auto-merge (squash) January 23, 2025 18:56
@prwhelan prwhelan merged commit bee1a4b into elastic:main Jan 23, 2025
16 checks passed
prwhelan added a commit to prwhelan/elasticsearch that referenced this pull request Jan 27, 2025
Avoid trapping Throwable by rethrowing it on another thread, allowing us
to reuse the `generateFailureXContent` for Exceptions and match the new
9.0 format.
elasticsearchmachine pushed a commit that referenced this pull request Jan 28, 2025
Avoid trapping Throwable by rethrowing it on another thread, allowing us
to reuse the `generateFailureXContent` for Exceptions and match the new
9.0 format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :ml Machine learning Team:ML Meta label for the ML team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants