-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Issue 19733 cdk clarify config error message for config files #20019
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
Issue 19733 cdk clarify config error message for config files #20019
Conversation
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.
changes look good! just a reminder to bump the version after pulling the latest master and there a formatting error in the CI run since /sources/source.py
no longer uses the json.loads() method so we don't need to import it anymore
ab1df04
to
3c16721
Compare
/test connector=connectors/source-s3
Build FailedTest summary info:
|
…ge-for-config-files
/publish-cdk dry-run=false
|
/test connector=connectors/source-s3
Build FailedTest summary info:
|
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.
approving again! good work on the second iteration that makes it non-breaking but still let's us reuse the try/catch
/publish-cdk dry-run=false
|
/test connector=connectors/source-s3
Build PassedTest summary info:
|
What
This is a duplicate of #19931 but since it was opened from a fork, here is the correct pull request from the branch directly on airbyte repository. Some very relevant comments have already been added to #19931 and should be fixed in this pull request.
This change address #19733 which would cause the error message from reading config files to be unclear.
How
As #19733 states,
We should rename BaseConnector.read_config() to read_json_file() to accurately reflect what it is doing. The existing usages of read_config() should be updated.
andThe Source.read_state() method should start using this newly renamed read_json_file() to read the state JSON file instead of duplicating all the same file reading logic.
🚨 User Impact 🚨
Previous error message: Expecting value: line 1 column 1 (char 0)
New error message: Could not read json file secrets/config.json:
Expecting value: line 1 column 1 (char 0)
The solution proposed in #19733 is a breaking change since the public methodWe have decided to avoid this breaking change since source-s3 re-implements this method and we therefore can't reuse it for parsing the state.read_config
is changed toread_json_file
.Pre-merge Checklist
Community member or Airbyter
Tests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.
Other Notes
Running
mypy airbyte_cdk
(as mentioned in the README.md) before creating changes to the repository gave me the following outputFound 134 errors in 60 files (checked 140 source files)
. Is this expected?