-
Notifications
You must be signed in to change notification settings - Fork 37
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
Sanitize sparkUpgrade error message #1077
base: main
Are you sure you want to change the base?
Sanitize sparkUpgrade error message #1077
Conversation
Signed-off-by: Siri Teja Gaddameedi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate when this will happen and add IT for the changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case e: SparkUpgradeException => | ||
incrementCounter(MetricConstants.RESULT_WRITER_FAILED_METRIC) | ||
throwableHandler.recordThrowable( | ||
s"Failed to write to result. Cause='${sanitizeSparkUpgradeErrorMessage(e.getMessage)}'", | ||
e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/opensearch-project/opensearch-spark/blob/main/spark-sql-application/src/main/scala/org/apache/spark/sql/FlintJobExecutor.scala#L445 should be the start point handling query exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the usecase being having to sanitize/trim the error message, where as handleQueryException
handles various exceptions and adds a prefix to the error message
Description
Sanitize sparkUpgrade error message
We noticed a when user enter incorrect query related to date time formatter, spark throws sparkUpgradeException. This error message contains sparkUpgrade related text and we are sanitizing the error message
Related Issues
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.