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: Fix the logging of unhandled exceptions to show stacktrace #8704

Merged
merged 9 commits into from
Dec 13, 2021

Conversation

keu
Copy link
Contributor

@keu keu commented Dec 10, 2021

What

After #8211 was merged all unhandled exceptions logs via logging as a critical error. We also need to stack trace as it was before.

How

add exc_info=exception_value to logger.critical call
add tests to cover this case and prevent future breaks

Recommended reading order

  1. logger.py
  2. test_logger.py

🚨 User Impact 🚨

the output will include stacktrace now:

'{"type": "LOG", "log": {"level": "FATAL", "message": "exceptions must derive from BaseException\\nTraceback (most recent call last):\\n  File \\"<string>\\", line 1, in <module>\\nTypeError: exceptions must derive from BaseException"}}'

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the CDK Connector Development Kit label Dec 10, 2021
@keu keu changed the title CDK: Fix the logging of unhandled exceptions to show stacktrace 🐛 CDK: Fix the logging of unhandled exceptions to show stacktrace Dec 10, 2021
@keu keu temporarily deployed to more-secrets December 10, 2021 16:35 Inactive
@keu keu self-assigned this Dec 10, 2021
@keu keu temporarily deployed to more-secrets December 10, 2021 23:02 Inactive
@keu keu temporarily deployed to more-secrets December 10, 2021 23:15 Inactive
@keu keu temporarily deployed to more-secrets December 11, 2021 00:06 Inactive
@keu keu temporarily deployed to more-secrets December 11, 2021 21:30 Inactive
@keu keu temporarily deployed to more-secrets December 13, 2021 14:36 Inactive
@keu
Copy link
Contributor Author

keu commented Dec 13, 2021

/publish-cdk dry-run=false

🕑 https://github.com/airbytehq/airbyte/actions/runs/1573612495
https://github.com/airbytehq/airbyte/actions/runs/1573612495

@keu keu temporarily deployed to more-secrets December 13, 2021 15:32 Inactive
@keu keu merged commit d50ae47 into master Dec 13, 2021
@keu keu deleted the keu/cdk-unhandled-exception-show-stacktrace branch December 13, 2021 22:04
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…rbytehq#8704)

* print stacktrace for unhandled exceptions

Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
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.

4 participants