-
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
Source Zenloop: add new stream properties #15843
Conversation
/test connector=connectors/source-zenloop
Build FailedTest summary info:
|
assigned to @monai |
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.
After you make the requested changes, run ./gradlew --no-daemon :airbyte-integrations:connectors:source-zenloop:airbytePythonFormat
in the Airbyte root directory to fix the remaining code formatting issues.
@@ -1124,7 +1124,7 @@ | |||
- name: Zenloop | |||
sourceDefinitionId: f1e4c7f6-db5c-4035-981f-d35ab4998794 | |||
dockerRepository: airbyte/source-zenloop | |||
dockerImageTag: 0.1.1 | |||
dockerImageTag: 0.1.2 |
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.
Revert property dockerImageTag
. The version should only be bumped in Dockerfile
, as you did. The publish script will automatically update version in all the required files, including this one.
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.
reverted
@@ -5,7 +5,7 @@ | |||
"title": "Zenloop Spec", | |||
"type": "object", | |||
"required": ["api_token"], | |||
"additionalProperties": false, | |||
"additionalProperties": true, |
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.
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.
removed
@@ -11017,7 +11017,7 @@ | |||
supportsDBT: false | |||
supported_destination_sync_modes: | |||
- "append" | |||
- dockerImage: "airbyte/source-zenloop:0.1.1" | |||
- dockerImage: "airbyte/source-zenloop:0.1.2" |
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.
Revert airbyte-config/init/src/main/resources/seed/source_specs.yaml
. This file is autogenerated by publishing script.
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.
reverted
@@ -0,0 +1,14 @@ | |||
{ | |||
"type": ["null", "object"], |
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.
Add $schema: http://json-schema.org/draft-07/schema#
as it's mainly used version across all connectors. The schema version, as far as I know, is not used for processing and validation, but it's good practice to include it.
Excerpt from the JSON Schema reference states:
If
$schema
is not used, an implementation might allow you to specify a value externally or it might make assumptions about which specification version should be used to evaluate the schema. It’s recommended that all JSON Schemas have a$schema
keyword to communicate to readers and tooling which specification version is intended.
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.
added
{ | ||
"stream": { | ||
"name": "properties", | ||
"json_schema": {}, |
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.
Set value of property json_schema
to contents of airbyte-integrations/connectors/source-zenloop/source_zenloop/schemas/properties.json
. Without it, integration tests may report success when there's an actual failure. All other configured catalogs lack it too, but they're a bad example and should be fixed eventually in other PRs.
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.
set. could it be done with $ref
?
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.
The short answer is no.
Airbyte partially supports $ref
s only in the schema directory to reference other files in the shared
subdirectory. For more information, you can check #7966 and related PRs. For example, see https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-flexport/source_flexport/schemas.
Files in the integration_tests
directory are solely for tests and examples. Their implementation should not depend on connectors code; hence referencing schema files, even if that were possible technically, still isn't a good design.
"name": "properties", | ||
"supported_sync_modes": ["full_refresh"], | ||
"source_defined_cursor": true, | ||
"json_schema": {} |
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.
Set value of property json_schema
to contents of airbyte-integrations/connectors/source-zenloop/source_zenloop/schemas/properties.json
.
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.
set
I have a suggestion for future improvement of this connector. It's out of the scope of this PR, but I highly recommend implementing it before transitioning the connector from Alpha to Beta. This connector implements the class |
…, remove additionalProperties: true
It looks like your development environment doesn't have Java compiler. Airbyte works well with OpenJDK, a free, open-source Java implementation. For macOS easiest way to install it is using Homebrew: brew install openjdk
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk For Linux, I suggest using the system package manager. And for Windows, I think this SO thread might help you. Make sure that command |
/test connector=connectors/source-zenloop |
The code looks good now. However, integration tests on CI servers are failing due to account issues. We're looking into it. Can you please share a screenshot of passing integration tests? First, build a Docker container with the latest code changes and then run the test suite: docker build . -t airbyte/source-zenloop:dev
python -m pytest -p integration_tests.acceptance |
Please paste the complete log, including the command line you used to run tests. It's hard to tell what's the cause from the trimmed screenshot. |
thanks for your reply. I ran the commands suggested by you
|
The reading test exceeds a timeout of 300 seconds. The problem can be solved in two ways. First, update The other, more reliable solution would be to split configured catalog for each stream. This would help to spot the particular stream that causes a such issue. See |
I added additional |
Yes, that's an inherent issue of I experienced this issue with other connectors that extract lots of data using real production accounts. A good example is the Amazon Ads connector, in which report generation may take up to half an hour while test timeout is only 300 seconds. Therefore the test almost always fails with a production account and actual data. |
…properties json schema
I limited the number of the data points and now all the test have passed. thank you @monai for your help. |
@@ -35,6 +35,29 @@ | |||
}, | |||
"sync_mode": "full_refresh", | |||
"destination_sync_mode": "overwrite" | |||
}, |
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.
One big configured_catalog.json
is no longer needed since you split it to separate files. Remove it and a reference from acceptance-test-config.yml
.
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.
deleted
{ | ||
"stream": { | ||
"name": "answers", | ||
"json_schema": {}, |
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.
Add streams JSON Schema.
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.
added
{ | ||
"stream": { | ||
"name": "answers_survey_group", | ||
"json_schema": {}, |
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.
Add streams JSON Schema.
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.
added
{ | ||
"stream": { | ||
"name": "survey_groups", | ||
"json_schema": {}, |
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.
Add streams JSON Schema.
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.
added
{ | ||
"stream": { | ||
"name": "surveys", | ||
"json_schema": {}, |
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.
Add streams JSON Schema.
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.
added
@@ -25,6 +25,26 @@ | |||
"source_defined_cursor": true, | |||
"default_cursor_field": "test", | |||
"json_schema": {} |
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.
Since you're entirely refactoring integration tests, fill in the json_schema
properties for all streams in catalog.json
to be completely consistent.
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.
added
/test connector=connectors/source-zenloop
Build PassedTest summary info:
|
/publish connector=connectors/source-zenloop
if you have connectors that successfully published but failed definition generation, follow step 4 here |
* add new stream properties * add PR number * change additionalProperties to true * revert bumoed version of an image, add json schema in the tests files, remove additionalProperties: true * gradle build completed * improve test acceptance quality, adjust the order of objects for the properties json schema * delete reduntant configured_catalog, add json schema for all streams * auto-bump connector version [ci skip] Co-authored-by: Sajarin <sajarindider@gmail.com> Co-authored-by: Marie Amelie Sandrock <marieamelie94@gmail.com> Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
* add new stream properties * add PR number * change additionalProperties to true * revert bumoed version of an image, add json schema in the tests files, remove additionalProperties: true * gradle build completed * improve test acceptance quality, adjust the order of objects for the properties json schema * delete reduntant configured_catalog, add json schema for all streams * auto-bump connector version [ci skip] Co-authored-by: Sajarin <sajarindider@gmail.com> Co-authored-by: Marie Amelie Sandrock <marieamelie94@gmail.com> Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
What
Include the stream 'Properties' in the connector
How
Pull out all properties using a survey_id
Pre-merge Checklist
Expand the relevant checklist and delete the others.
Updating a 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 exampleAirbyter
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.