-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
🎉 New Source: Whisky Hunter API [low-code CDK] #17918
🎉 New Source: Whisky Hunter API [low-code CDK] #17918
Conversation
Since there is no config required, for testing you can use |
@@ -360,7 +360,8 @@ def _validate_records_structure(records: List[AirbyteRecordMessage], configured_ | |||
continue | |||
record_fields = set(get_object_structure(record.data)) | |||
common_fields = set.intersection(record_fields, schema_pathes) | |||
assert common_fields, f" Record from {record.stream} stream should have some fields mentioned by json schema, {schema_pathes}" | |||
|
|||
assert common_fields, f" Record {record} from {record.stream} stream with fields {record_fields} should have some fields mentioned by json schema: {schema_pathes}" |
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.
Updating this because it's hard to debug without being able to compare both schemas and the contents of the record.
@@ -39,7 +39,8 @@ def _prepare_volumes(self, config: Optional[Mapping], state: Optional[Mapping], | |||
self.input_folder.mkdir(parents=True) | |||
self.output_folder.mkdir(parents=True) | |||
|
|||
if config: | |||
# using "is not None" to allow falsey config objects like {} to still write |
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.
This was a bug in the testing code that prohibited the user of empty or falsey config objects (does this count as related to the Low-Code CDK? 💸 ).
The connector works in the UI and from the CLI regardless, this only hurts testing.
@@ -149,7 +150,7 @@ def read(cls, container: Container, command: str = None, with_ext: bool = True) | |||
raise | |||
if exit_status["StatusCode"]: | |||
error = exit_status["Error"] or exception or line | |||
logging.error(f"Docker container was failed, " f'code {exit_status["StatusCode"]}, error:\n{error}') | |||
logging.error(f"Docker container failed, " f'code {exit_status["StatusCode"]}, error:\n{error}') |
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.
Reads better this way.
I have some usability feedback for my experience writing this: (LOW) Failing endpoints give confusing messagesIf an endpoint is getting a 404 error (like if you specified the wrong url like I did initially), if you're following the tutorial steps, the first error you reach is:
This is because the connection status doesn't check for return codes and instead first fails with the parsing error for the response. Since the wrong URL wasn't JSON-friendly, I get this message, when it could just say that it was a 404. (LOW) Guide on inferring JSON Schema from endpointsFor something that doesn't publish an OpenAPI spec, it would be useful to point the user at a tool like https://json-schema-inferrer.herokuapp.com/ to quickly summarize the endpoints. I did this and then had to unwrap the top level due to extractors, and it saves a lot of time. (I'm not sure if something like this is in the other docs, but it would probably make sense to show that as part of the exchangerates nocode tutorial). (HIGH - but fixed in this PR) No such file or directory errors for '/data/tap_config.json' were hard to debugI fixed this in my current PR (it turned out to be a testing harness bug around empty/falsey dictionaries for connector configs. It's weird to get something like this for the easiest to implement connectors without settings or auth:
When searching for this it looks like #15880 ran into a problem with similar outputs (I'm not sure if it's 100% the same underlying problem). (MEDIUM - but fixed in this PR) schema error messages are hard to readWhen debugging schema errors, it would be really helpful if there was some output to compare. "this schema" failed against "this record". Instead of just getting
and then having to find the problem yourself. After adding the comments in the PR it has output like this instead:
which is much more helpful. (MEDIUM) Easy to forget that you need to rebuild the docker image for some operationsWhen most of the testing you're doing is using (LOW) Some logged error messages are confusingFor example:
This shows an error, but the test itself passes and the actual connector appears to function correctly in the UI. Should this error message be hidden? Similarly, I get messages like:
when running the acceptance tests. Why is it trying to pull (LOW) lack of generationWhy don't the doc pages automatically get generated with TODOs? Why don't the indices / build pages have entries automatically added? Why are some instructions for doc generations like the link in "Connector's bootstrap.md. See description and examples" broken? It feels like the checklist could be decreased significantly or at least easier to look for TODOs in the PR to resolve. Hope this is helpful. |
Thanks for the contribution @jrhizor! 💯 the connector implementation looks good I'll test and release later. I also asked someone to take a look in your feedback. |
Hey @sajarin I'm not internal💰 |
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.
Sorry the delay @jrhizor I'll test/publish this connector tomorrow. Thanks for the contribution. Also I'll split your feedback into issues.
/test connector=connectors/source-whisky-hunter
Build FailedTest summary info:
|
/test connector=bases/source-acceptance-test
Build PassedTest summary info:
|
2ea48fb
to
42c8d49
Compare
/test connector=connectors/source-whisky-hunter
Build PassedTest summary info:
|
/publish connector=connectors/source-whisky-hunter
if you have connectors that successfully published but failed definition generation, follow step 4 here |
@RealChrisSean a new hacktober contribution |
WOOOO! |
* initial commit for source-whisky-hunter * better logs * finish up connector * fix catalog * fix bug in connector_runner.py that doesn't allow falsey configs * add bootstrap.md * add docs * fix typo * fix source-accept test * auto-bump connector version Co-authored-by: marcosmarxm <marcosmarxm@gmail.com> Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
What
Creates a source for airbytehq/connector-contest#140 (part of the connector contest)
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereTests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.