forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨Source FreshServices : Migrate Python CDK to Low-code CDK (airbytehq…
…#29126) Co-authored-by: Mal Hancock <mhancock@archangelic.space>
- Loading branch information
Showing
33 changed files
with
924 additions
and
1,728 deletions.
There are no files selected for viewing
36 changes: 29 additions & 7 deletions
36
airbyte-integrations/connectors/source-freshservice/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,16 +1,38 @@ | ||
FROM python:3.9-slim | ||
FROM python:3.9.11-alpine3.15 as base | ||
|
||
# build and load all requirements | ||
FROM base as builder | ||
WORKDIR /airbyte/integration_code | ||
|
||
# upgrade pip to the latest version | ||
RUN apk --no-cache upgrade \ | ||
&& pip install --upgrade pip \ | ||
&& apk --no-cache add tzdata build-base | ||
|
||
# Bash is installed for more convenient debugging. | ||
RUN apt-get update && apt-get install -y bash && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY setup.py ./ | ||
# install necessary packages to a temporary folder | ||
RUN pip install --prefix=/install . | ||
|
||
# build a clean environment | ||
FROM base | ||
WORKDIR /airbyte/integration_code | ||
COPY source_freshservice ./source_freshservice | ||
|
||
# copy all loaded and built libraries to a pure basic image | ||
COPY --from=builder /install /usr/local | ||
# add default timezone settings | ||
COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
RUN echo "Etc/UTC" > /etc/timezone | ||
|
||
# bash is installed for more convenient debugging. | ||
RUN apk --no-cache add bash | ||
|
||
# copy payload code only | ||
COPY main.py ./ | ||
COPY setup.py ./ | ||
RUN pip install . | ||
COPY source_freshservice ./source_freshservice | ||
|
||
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" | ||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] | ||
|
||
LABEL io.airbyte.version=1.1.0 | ||
LABEL io.airbyte.version=1.2.0 | ||
LABEL io.airbyte.name=airbyte/source-freshservice |
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: 3 additions & 0 deletions
3
airbyte-integrations/connectors/source-freshservice/__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) 2023 Airbyte, Inc., all rights reserved. | ||
# |
72 changes: 43 additions & 29 deletions
72
airbyte-integrations/connectors/source-freshservice/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 |
---|---|---|
@@ -1,37 +1,51 @@ | ||
# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) | ||
# for more information about how to configure these tests | ||
connector_image: airbyte/source-freshservice:dev | ||
tests: | ||
acceptance_tests: | ||
spec: | ||
- spec_path: "source_freshservice/spec.json" | ||
tests: | ||
- spec_path: "source_freshservice/spec.yaml" | ||
connection: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
discovery: | ||
- config_path: "secrets/config.json" | ||
backward_compatibility_tests_config: | ||
disable_for_version: "0.1.1" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
backward_compatibility_tests_config: | ||
disable_for_version: "1.1.0" | ||
basic_read: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
empty_streams: | ||
[ | ||
"assets", | ||
"releases", | ||
"problems", | ||
"software", | ||
"products", | ||
"changes", | ||
"vendors", | ||
"purchase_orders", | ||
"satisfaction_survey_responses", | ||
] | ||
incremental: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
future_state_path: "integration_tests/abnormal_state.json" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
empty_streams: | ||
- name: satisfaction_survey_responses | ||
bypass_reason: Test account does not have permissions | ||
- name: releases | ||
bypass_reason: Test account does not have permissions | ||
- name: assets | ||
bypass_reason: Test account does not have permissions | ||
- name: problems | ||
bypass_reason: Test account does not have permissions | ||
- name: software | ||
bypass_reason: Test account does not have permissions | ||
- name: products | ||
bypass_reason: Test account does not have permissions | ||
- name: changes | ||
bypass_reason: Test account does not have permissions | ||
- name: vendors | ||
bypass_reason: Test account does not have permissions | ||
- name: purchase_orders | ||
bypass_reason: Test account does not have permissions | ||
incremental: | ||
tests: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
future_state: | ||
future_state_path: "integration_tests/abnormal_state.json" | ||
full_refresh: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" |
1 change: 1 addition & 0 deletions
1
airbyte-integrations/connectors/source-freshservice/acceptance-test-docker.sh
100644 → 100755
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,2 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh" |
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-freshservice/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# | ||
# Copyright (c) 2021 Airbyte, Inc., all rights reserved. | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
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
6 changes: 3 additions & 3 deletions
6
airbyte-integrations/connectors/source-freshservice/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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"domain_name": "mydomain.freshservice.com", | ||
"api_key": "<wrong_api_key>", | ||
"start_date": "2123-09-01T00:00:00Z" | ||
"domain_name":"domain.freshservice.com", | ||
"api_key": "invalid_api_key", | ||
"start_date":"2020-10-01T00:00:00Z" | ||
} |
6 changes: 3 additions & 3 deletions
6
airbyte-integrations/connectors/source-freshservice/integration_tests/sample_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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"domain_name": "mydomain.freshservice.com", | ||
"api_key": "12345", | ||
"start_date": "2021-09-01T00:00:00Z" | ||
"domain_name":"domain.freshservice.com", | ||
"api_key": "api_key", | ||
"start_date":"2020-10-01T00:00:00Z" | ||
} |
23 changes: 12 additions & 11 deletions
23
airbyte-integrations/connectors/source-freshservice/metadata.yaml
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,24 +1,25 @@ | ||
data: | ||
allowedHosts: | ||
hosts: | ||
- TODO # Please change to the hostname of the source. | ||
registries: | ||
oss: | ||
enabled: false | ||
cloud: | ||
enabled: false | ||
connectorSubtype: api | ||
connectorType: source | ||
definitionId: 9bb85338-ea95-4c93-b267-6be89125b267 | ||
dockerImageTag: 1.1.0 | ||
dockerImageTag: 1.2.0 | ||
dockerRepository: airbyte/source-freshservice | ||
githubIssueLabel: source-freshservice | ||
icon: freshservice.svg | ||
license: MIT | ||
name: Freshservice | ||
registries: | ||
cloud: | ||
enabled: true | ||
oss: | ||
enabled: true | ||
releaseDate: "2021-10-29" | ||
releaseStage: alpha | ||
supportLevel: community | ||
documentationUrl: https://docs.airbyte.com/integrations/sources/freshservice | ||
tags: | ||
- language:python | ||
ab_internal: | ||
sl: 100 | ||
ql: 100 | ||
supportLevel: community | ||
- language:lowcode | ||
metadataSpecVersion: "1.0" |
3 changes: 2 additions & 1 deletion
3
airbyte-integrations/connectors/source-freshservice/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 +1,2 @@ | ||
-e . | ||
-e ../../bases/connector-acceptance-test | ||
-e . |
Oops, something went wrong.