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

not throwing config error #36577

Merged
merged 9 commits into from
Apr 5, 2024
Merged

not throwing config error #36577

merged 9 commits into from
Apr 5, 2024

Conversation

xiaohansong
Copy link
Contributor

@xiaohansong xiaohansong commented Mar 27, 2024

https://github.com/airbytehq/oncall/issues/4710

When we throw an exception in the source connector, it will go to IntegrationRunner.kt, in which it will generate an error trace message, where error type is dependent on the type of the exception, and then rethrow it, which is then to be caught in AirbyteExceptionHandler. In the handler it will then re-generate a trace message with system_error.

Thus if a configException goes into a source connector, we currently will generate 1 config_error trace message and 1 system_error trace message.

The fix is to not throw system_error in AirbyteExceptionHandler if the root cause of exception is config error.

Tested on postgres, behavior change now is that we will start retrying those syncs, which is not ideal but it aligns with the description from https://docs.google.com/document/d/1ywZazxJ5DO41V1afaHY_0UfKuMHeiqRqn8wborwTSkY/edit I'm not sure why we were not retrying before?

Screenshot 2024-04-01 at 11 05 28 AM

Copy link

vercel bot commented Mar 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 Apr 5, 2024 8:51pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Mar 27, 2024
@xiaohansong xiaohansong marked this pull request as ready for review April 1, 2024 20:37
@xiaohansong xiaohansong requested review from a team as code owners April 1, 2024 20:37
val rootThrowable = ConnectorExceptionUtil.getRootConfigError(Exception(throwable))

if (ConnectorExceptionUtil.isConfigError(rootThrowable)) {
terminate()
Copy link
Contributor

Choose a reason for hiding this comment

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

will this exit 1 or exit 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -28,6 +29,12 @@ class AirbyteExceptionHandler : Thread.UncaughtExceptionHandler {
// https://docs.google.com/document/d/1ctrj3Yh_GjtQ93aND-WH3ocqGxsmxyC3jfiarrF6NY0/edit#
LOGGER.error(logMessage, throwable)

val rootThrowable = ConnectorExceptionUtil.getRootConfigError(Exception(throwable))

if (ConnectorExceptionUtil.isConfigError(rootThrowable)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since destinations also use this handler. Is the expected behavior shared by them as well?
cc: @jbfbell

Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense to me, so essentially if it's a config error, don't throw two errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exactly - it will still exit 1, but we are not sending a system_error trace message anymore to platform if it's a config error.

Copy link
Contributor

@akashkulk akashkulk left a comment

Choose a reason for hiding this comment

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

Makes sense.

Can you file a follow-up with the platform to determine whether config errors should be retried? I think its ok for now

@xiaohansong
Copy link
Contributor Author

xiaohansong commented Apr 5, 2024

/publish-java-cdk

🕑 https://github.com/airbytehq/airbyte/actions/runs/8574924390
❌ Publish Java CDK version=0.29.5 failed!

@xiaohansong
Copy link
Contributor Author

xiaohansong commented Apr 5, 2024

/publish-java-cdk

🕑 https://github.com/airbytehq/airbyte/actions/runs/8575441137
✅ Successfully published Java CDK version=0.29.6!

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/mysql labels Apr 5, 2024
@xiaohansong xiaohansong enabled auto-merge (squash) April 5, 2024 20:51
@xiaohansong xiaohansong merged commit 9d53013 into master Apr 5, 2024
32 checks passed
@xiaohansong xiaohansong deleted the xiaohan/config-error branch April 5, 2024 20:58
markcusack pushed a commit to markcusack/airbyte that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation CDK Connector Development Kit connectors/source/mysql
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants