-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(python-cdk): add user friendly message for encoding errors #44438
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
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
71819bb
Add user friendly message for encoding errors
674a643
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek d9919d6
Fix mypy warning incompatible types in curried function _cast_types
7659e8a
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek c855178
fix formatting
992a413
Bump source-gcs patch version
deff1d7
Raise EncodingError with clean context
891140c
Make exception throwing chain not broken
721afb7
Ignore mypy error, reduce filename size in error messages
9f58cb0
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek 43cbd61
Raise AirbyteTracedException in get_json_schema
ccc8cce
Raise Trace message for good UI display
c4436e3
Revert source-gcs patch bump
c82739c
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek 8871f0c
Tell configured encoding in error message
9e8f80f
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek d16eda4
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek 4a1ef93
Raise AirbyteTracedException and summarize at the end
86f5518
Use ATE instead of EncodingError, add test encoding exception test case
8262c04
Removed unused code
03f19c8
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek 6da1d7a
Delete airbyte-integrations/connectors/source-gcs/unit_tests/test_sou…
strosek 84a34bb
Make mypy ignore hint clearer
98d91fb
Fix index error when traceback not saved
63409c5
Fix index only reason available
404959b
Fix broken tests, fix dead code block in verify_check()
4c653d9
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
strosek 7555981
Merge branch 'master' into strosek/gcs_decode_error_issue_8952
girarda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,12 +182,11 @@ def verify_check(capsys: CaptureFixture[str], tmp_path: PosixPath, scenario: Tes | |
expected_exc, expected_msg = scenario.expected_check_error | ||
|
||
if expected_exc: | ||
with pytest.raises(expected_exc): | ||
output = check(capsys, tmp_path, scenario) | ||
if expected_msg: | ||
# expected_msg is a string. what's the expected value field? | ||
assert expected_msg in output["message"] # type: ignore | ||
assert output["status"] == scenario.expected_check_status | ||
with pytest.raises(expected_exc) as exc: | ||
check(capsys, tmp_path, scenario) | ||
|
||
if expected_msg: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block was never executed because previous block exited with the exception. Also, output was None, since the code never returned. Tests should be more thorough now. |
||
assert expected_msg in exc.value.message | ||
|
||
else: | ||
output = check(capsys, tmp_path, scenario) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test ATE raised.