Skip to content

Concurrent CDK: if exception is AirbyteTracedException, raise this an… #37443

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

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

maxi297
Copy link
Contributor

@maxi297 maxi297 commented Apr 19, 2024

…d not StreamThreadException

What

Following this change we've seen that blindly creating a traced exception using the StreamThreadException leads to trace message that are system_errors instead of the underlying error type.

How

Checking the type of the exception and if it is already AirbyteTracedException, emit it as-is

User Impact

Syncs failing like with config_errors will not be flagged as system_error (see this for more information).

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@maxi297 maxi297 requested a review from a team April 19, 2024 19:31
Copy link

vercel bot commented Apr 19, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Apr 19, 2024 8:25pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Apr 19, 2024

stream_descriptor = StreamDescriptor(name=exception.stream_name)
if isinstance(exception.exception, AirbyteTracedException):
yield exception.exception.as_airbyte_message(stream_descriptor=stream_descriptor)
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'm not sure about how I feel by passing stream_descriptor as part of as_airbyte_message. On one hand, we mentioned it was probably better to deprecate. On the other, I'm not sure all AirbyteTracedException have the context of the stream and hence might benefit from the added information

Copy link
Contributor

Choose a reason for hiding this comment

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

I can live w/ it still being there. I agree that the stream descriptor isn't applicable for failures outside of the specific stream being processed. But for the purposes of this current ticket, we can move forward with using the signature as it's already declared. We're not changing things in a negative way

@maxi297 maxi297 requested a review from brianjlai April 19, 2024 19:34
@maxi297 maxi297 requested a review from girarda April 19, 2024 19:58
Copy link
Contributor

@brianjlai brianjlai left a comment

Choose a reason for hiding this comment

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

👍 , fair concern, but as mentioned in the comment I don't think it needs to block the more critical fix going out now


stream_descriptor = StreamDescriptor(name=exception.stream_name)
if isinstance(exception.exception, AirbyteTracedException):
yield exception.exception.as_airbyte_message(stream_descriptor=stream_descriptor)
Copy link
Contributor

Choose a reason for hiding this comment

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

I can live w/ it still being there. I agree that the stream descriptor isn't applicable for failures outside of the specific stream being processed. But for the purposes of this current ticket, we can move forward with using the signature as it's already declared. We're not changing things in a negative way

@maxi297 maxi297 enabled auto-merge (squash) April 19, 2024 20:26
@maxi297 maxi297 merged commit 48af92a into master Apr 19, 2024
@maxi297 maxi297 deleted the maxi297/ccdk-ensure-traced-exception-are-honored branch April 19, 2024 20:32
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