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

Sanitize sparkUpgrade error message #1077

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Siritejagaddameedi
Copy link

@Siritejagaddameedi Siritejagaddameedi commented Mar 4, 2025

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

  • We need to trim the error messages to make it customer friendly

Check List

  • Updated documentation (docs/ppl-lang/README.md)
  • Implemented unit tests
  • Implemented tests for combination with other commands
  • New added source code should include a copyright header
  • Commits are signed per the DCO using --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.

Signed-off-by: Siri Teja Gaddameedi <[email protected]>
Copy link
Collaborator

@dai-chen dai-chen left a 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?

Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

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

Comment on lines +157 to +161
case e: SparkUpgradeException =>
incrementCounter(MetricConstants.RESULT_WRITER_FAILED_METRIC)
throwableHandler.recordThrowable(
s"Failed to write to result. Cause='${sanitizeSparkUpgradeErrorMessage(e.getMessage)}'",
e)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Author

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

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