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

bulk-cdk: make exception classifiers recursive #45141

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

postamar
Copy link
Contributor

@postamar postamar commented Sep 4, 2024

What

I forgot to make the ExceptionClassifier implementations recursive, in terms of Exception causes. Without this, the RegexExceptionClassifier in particular is quite useless; because the interesting exceptions are usually wrapped inside other RuntimeExceptions and whatnot.

How

Replicate the behaviour of the ConnectorExceptionHandler from the legacy CDK.

Review guide

User Impact

None as of yet.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 9:25pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Sep 4, 2024
@postamar postamar marked this pull request as ready for review September 4, 2024 21:05
@postamar postamar requested review from a team as code owners September 4, 2024 21:05
unwound = unwound.cause
}
return connectorErrorException
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I generalized the unwinding logic, see below

TransientError("barbaz"),
classifier.classify(RuntimeException("quux", RuntimeException("barbaz"))),
)
}
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 is a regression test

@postamar postamar enabled auto-merge (squash) September 4, 2024 21:25
@postamar postamar merged commit 1a9728d into master Sep 4, 2024
28 checks passed
@postamar postamar deleted the postamar/rules-recursive branch September 4, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants