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: add more exception classifier implementations, add extra checks #44824

Merged
merged 5 commits into from
Aug 27, 2024

Conversation

postamar
Copy link
Contributor

What

This PR adds:

  • vendor-code-based exception classification in JdbcExceptionClassifier, the vendor code rules are read from application.yml;
  • regex-based exception classification in a newly-added RegexExceptionClassifier which replicates most of the functionality in the legacy CDK, except that here again the rule definitions are read from application.yml instead of being defined programmatically;
  • an extra set of checks in CheckOperation which for JDBC sources are implemented by JdbcCheckQueries which execute a sequence of SQL queries (also defined in application.yml) and if any of them return anything, that's thrown as a ConfigErrorException.

This is required for airbyte-enterprise connector certification.

Informs https://github.com/airbytehq/airbyte-internal-issues/issues/9457
Informs https://github.com/airbytehq/airbyte-internal-issues/issues/9373

How

Micronaut makes it easy to defined strongly-typed object instances in a yaml file. Thanks, Micronaut!

Review guide

Commit by commit.

User Impact

None

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@postamar postamar requested review from a team as code owners August 27, 2024 17:14
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 6:04pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Aug 27, 2024
check:
jdbc:
queries:
- SELECT DATABASE_PATH() FROM DUAL
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 returns NULL For in-memory H2 database instances, which is what we use in our tests

@postamar postamar requested a review from xiaohansong August 27, 2024 17:16
}
}
/** Convenience val for [getOrder]. */
val orderValue: Int
Copy link
Contributor

Choose a reason for hiding this comment

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

nice I like this - enables us to override some specific errors.

@postamar postamar enabled auto-merge (squash) August 27, 2024 17:55
@postamar postamar merged commit 70732ca into master Aug 27, 2024
30 checks passed
@postamar postamar deleted the postamar/exception-classifiers branch August 27, 2024 18:13
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