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

[CDK] Always use lower cases for error message regex matching in error translation #44832

Merged
merged 6 commits into from
Aug 28, 2024

Conversation

theyueli
Copy link
Contributor

What

Fixes #44439

Need to bump the certified connector to use it in the next.

Can this PR be safely reverted and rolled back?

  • [ X] YES πŸ’š
  • NO ❌

@theyueli theyueli added the bug label Aug 27, 2024
@theyueli theyueli requested review from a team as code owners August 27, 2024 19:25
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
airbyte-docs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Aug 27, 2024 11:45pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Aug 27, 2024
@@ -145,7 +145,7 @@ open class ConnectorExceptionHandler {
open fun translateConnectorSpecificErrorMessage(e: Throwable?): String? {
if (e == null) return null
for (error in connectorErrorDictionary) {
if (e.message?.lowercase()?.matches(error.regexMatchingPattern.toRegex())!!)
if (e.message?.lowercase()?.matches(error.regexMatchingPattern.lowercase().toRegex())!!)
Copy link
Contributor

Choose a reason for hiding this comment

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

rather than doing that, I'd rather store a pattern in the error object, and compile it with compilePattern(CASE_INSENSITIVE)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea! fixed, please take another look. thanks!

@theyueli
Copy link
Contributor Author

theyueli commented Aug 27, 2024

/publish-java-cdk force=true

πŸ•‘ https://github.com/airbytehq/airbyte/actions/runs/10587620025
βœ… Successfully published Java CDK version=0.44.17!

@theyueli theyueli merged commit 8568ad3 into master Aug 28, 2024
31 checks passed
@theyueli theyueli deleted the yue/matching-errmsg-with-lower-case branch August 28, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two source-postgres PSQL exceptions do not get translated
3 participants