-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 Zendesk Talk: migrate to CDK #7173
Merged
Merged
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7ad0cc8
Upd pagination edge case
gaart 8024d7f
Merge branch 'master' into gaart/6599-zendesk-pagination
gaart ce990b3
migrate to CDK and connect SAT
eugene-kulak 112186b
clean-up
eugene-kulak c6dcfb7
format
eugene-kulak 3dc0f59
fix dockerfile
eugene-kulak 525b8f7
Merge remote-tracking branch 'origin/master' into gaart/6599-zendesk-…
eugene-kulak 004aa14
fix tests
eugene-kulak 8d78298
fix stream names
eugene-kulak 8f55125
fix SAT and connector to pass everything
eugene-kulak 16e73b3
fix latest SAT test
eugene-kulak c288f75
update docs
eugene-kulak 88ff888
fix spec test
eugene-kulak 91957f6
address comments from @sherifnada
eugene-kulak c806553
Merge remote-tracking branch 'origin/master' into gaart/6599-zendesk-…
eugene-kulak 3b9dfda
fix tests
eugene-kulak 903c9bb
format
eugene-kulak 8ef5ae8
fix schema and update spec.json
eugene-kulak d909f8a
fix tests
eugene-kulak e3ac241
Merge remote-tracking branch 'origin/master' into gaart/6599-zendesk-…
eugene-kulak 4fa7e39
revert bumping
eugene-kulak 6e195f3
delete obsolete unittest
eugene-kulak d31d6b2
bumping
eugene-kulak 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 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 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
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-zendesk-talk/.dockerignore
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
* | ||
!Dockerfile | ||
!Dockerfile.test | ||
!main.py | ||
!source_zendesk_talk | ||
!setup.py | ||
!secrets |
14 changes: 6 additions & 8 deletions
14
airbyte-integrations/connectors/source-zendesk-talk/Dockerfile
This file contains 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 |
---|---|---|
@@ -1,18 +1,16 @@ | ||
FROM airbyte/integration-base-python:0.1.1 | ||
FROM python:3.7-slim | ||
|
||
# Bash is installed for more convenient debugging. | ||
RUN apt-get update && apt-get install -y bash && rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CODE_PATH="source_zendesk_talk" | ||
ENV AIRBYTE_IMPL_MODULE="source_zendesk_talk" | ||
ENV AIRBYTE_IMPL_PATH="SourceZendeskTalk" | ||
|
||
WORKDIR /airbyte/integration_code | ||
COPY $CODE_PATH ./$CODE_PATH | ||
COPY source_zendesk_talk ./source_zendesk_talk | ||
COPY main.py ./ | ||
COPY setup.py ./ | ||
RUN pip install . | ||
|
||
ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh" | ||
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" | ||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] | ||
|
||
LABEL io.airbyte.version=0.1.2 | ||
LABEL io.airbyte.version=0.1.3 | ||
LABEL io.airbyte.name=airbyte/source-zendesk-talk |
This file contains 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
21 changes: 21 additions & 0 deletions
21
airbyte-integrations/connectors/source-zendesk-talk/acceptance-test-config.yml
This file contains 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference) | ||
# for more information about how to configure these tests | ||
# intentionally left out explicit configured_catalog.json to test all streams from discovery | ||
connector_image: airbyte/source-zendesk-talk:dev | ||
tests: | ||
spec: | ||
- spec_path: "integration_tests/spec.json" | ||
connection: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
discovery: | ||
- config_path: "secrets/config.json" | ||
basic_read: | ||
- config_path: "secrets/config.json" | ||
incremental: | ||
- config_path: "secrets/config.json" | ||
future_state_path: "integration_tests/abnormal_state.json" | ||
full_refresh: | ||
- config_path: "secrets/config.json" |
16 changes: 16 additions & 0 deletions
16
airbyte-integrations/connectors/source-zendesk-talk/acceptance-test-docker.sh
This file contains 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Build latest connector image | ||
docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2) | ||
|
||
# Pull latest acctest image | ||
docker pull airbyte/source-acceptance-test:latest | ||
|
||
# Run | ||
docker run --rm -it \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v /tmp:/tmp \ | ||
-v $(pwd):/test_input \ | ||
airbyte/source-acceptance-test \ | ||
--acceptance-test-config /test_input | ||
|
18 changes: 2 additions & 16 deletions
18
airbyte-integrations/connectors/source-zendesk-talk/build.gradle
This file contains 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 |
---|---|---|
@@ -1,27 +1,13 @@ | ||
plugins { | ||
id 'airbyte-python' | ||
id 'airbyte-docker' | ||
id 'airbyte-standard-source-test-file' | ||
id 'airbyte-source-acceptance-test' | ||
} | ||
|
||
airbytePython { | ||
moduleDirectory 'source_zendesk_talk' | ||
} | ||
|
||
airbyteStandardSourceTestFile { | ||
specPath = "source_zendesk_talk/spec.json" | ||
configPath = "secrets/config.json" | ||
configuredCatalogPath = "sample_files/configured_catalog.json" | ||
} | ||
|
||
task("pythonIntegrationTests", type: PythonTask, dependsOn: installTestReqs) { | ||
module = "pytest" | ||
command = "-s integration_tests" | ||
} | ||
|
||
integrationTest.dependsOn("pythonIntegrationTests") | ||
|
||
dependencies { | ||
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs) | ||
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs) | ||
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs) | ||
} |
3 changes: 3 additions & 0 deletions
3
airbyte-integrations/connectors/source-zendesk-talk/integration_tests/__init__.py
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
# Copyright (c) 2021 Airbyte, Inc., all rights reserved. | ||
# |
8 changes: 8 additions & 0 deletions
8
airbyte-integrations/connectors/source-zendesk-talk/integration_tests/abnormal_state.json
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"calls": { | ||
"updated_at": "2121-01-01T00:00:00Z" | ||
}, | ||
"call_legs": { | ||
"updated_at": "2121-01-01T00:00:00Z" | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
airbyte-integrations/connectors/source-zendesk-talk/integration_tests/acceptance.py
This file contains 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# Copyright (c) 2021 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
|
||
import pytest | ||
|
||
pytest_plugins = ("source_acceptance_test.plugin",) | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def connector_setup(): | ||
"""This fixture is a placeholder for external resources that acceptance test might require.""" | ||
yield |
39 changes: 0 additions & 39 deletions
39
airbyte-integrations/connectors/source-zendesk-talk/integration_tests/integration_test.py
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
airbyte-integrations/connectors/source-zendesk-talk/integration_tests/invalid_config.json
This file contains 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"email": "integration-test@airbyte.io", | ||
"access_token": "some_token", | ||
"subdomain": "domain", | ||
"start_date": "2021-04-01T00:00:00Z" | ||
} |
40 changes: 40 additions & 0 deletions
40
airbyte-integrations/connectors/source-zendesk-talk/integration_tests/spec.json
This file contains 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"documentationUrl": "https://docs.airbyte.io/integrations/sources/zendesk-talk", | ||
"changelogUrl": "https://docs.airbyte.io/integrations/sources/zendesk-talk", | ||
"connectionSpecification": { | ||
"title": "Zendesk Talk Spec", | ||
"type": "object", | ||
"properties": { | ||
"subdomain": { | ||
"title": "Subdomain", | ||
"description": "The subdomain for your Zendesk Talk.", | ||
"type": "string" | ||
}, | ||
"access_token": { | ||
"title": "Access Token", | ||
"description": "The value of the API token generated. See the <a href=\"https://docs.airbyte.io/integrations/sources/zendesk-talk\">docs</a> for more information.", | ||
"airbyte_secret": true, | ||
"type": "string" | ||
}, | ||
"email": { | ||
"title": "Email", | ||
"description": "The user email for your Zendesk account.", | ||
"type": "string" | ||
}, | ||
"start_date": { | ||
"title": "Replication Start Date", | ||
"description": "The date from which you'd like to replicate data for Zendesk Talk API, in the format YYYY-MM-DDT00:00:00Z.", | ||
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$", | ||
"examples": ["2017-01-25T00:00:00Z"], | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
"required": ["subdomain", "access_token", "email", "start_date"] | ||
}, | ||
"supportsIncremental": true, | ||
"supportsNormalization": false, | ||
"supportsDBT": false, | ||
"supported_destination_sync_modes": ["append"], | ||
"authSpecification": null | ||
} |
This file contains 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
3 changes: 1 addition & 2 deletions
3
airbyte-integrations/connectors/source-zendesk-talk/requirements.txt
This file contains 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# This file is autogenerated -- only edit if you know what you are doing. Use setup.py for declaring dependencies. | ||
-e ../../bases/airbyte-protocol | ||
-e ../../bases/base-python | ||
-e ../../bases/source-acceptance-test | ||
-e . |
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.
we can probably omit this for now if it is null
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 is how it is stored in
ConnectorSpecification
, don't think this has any effect on behavior since this file is just for SAT