-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Shortio: Migrate Python CDK to Low-code CDK #28950
Changes from 4 commits
a31245f
bdcaf3a
157725c
3df9f6c
5d3f6ac
29d5caa
10c136e
43b9ba7
0a03816
d280cd5
3dbcb24
ea2461b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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_shortio ./source_shortio | ||
|
||
# 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_shortio ./source_shortio | ||
|
||
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" | ||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] | ||
|
||
LABEL io.airbyte.version=0.1.3 | ||
LABEL io.airbyte.version=0.2.0 | ||
LABEL io.airbyte.name=airbyte/source-shortio |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
# 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-shortio:dev | ||
tests: | ||
acceptance_tests: | ||
spec: | ||
- spec_path: "source_shortio/spec.json" | ||
tests: | ||
- spec_path: "source_shortio/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" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
basic_read: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
empty_streams: ["clicks"] | ||
# TODO: uncomment when any of incremental streams has records | ||
# 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: clicks | ||
bypass_reason: "Sandbox account cannot seed the stream" | ||
# TODO uncomment this block to specify that the tests should assert the connector outputs the records provided in the input file a file | ||
# expect_records: | ||
# path: "integration_tests/expected_records.jsonl" | ||
# extra_fields: no | ||
# exact_order: no | ||
# extra_records: yes | ||
incremental: | ||
bypass_reason: "This connector does not implement incremental sync" | ||
# TODO uncomment this block this block if your connector implements incremental sync: | ||
# 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" |
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" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
{ | ||
"clicks": { | ||
"dt": "2052-07-17 14:03:43.449925" | ||
[ | ||
{ | ||
"type": "STREAM", | ||
"stream": { | ||
"stream_state": { "createdAt": "2023-07-31T03:43:59.244Z" }, | ||
"stream_descriptor": { "name": "links" } | ||
} | ||
}, | ||
{ | ||
"type": "STREAM", | ||
"stream": { | ||
"stream_state": { "dt": "2019-09-10T12:44:55.000Z" }, | ||
"stream_descriptor": { "name": "clicks" } | ||
} | ||
} | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"secret_key": "RANDOMKEY", | ||
"domain_id": "123456", | ||
"start_date": "2021-07-01" | ||
"domain_id": "99999999", | ||
"start_date": "2099-07-01" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"secret_key": "KEY", | ||
"domain_id": "123456", | ||
"start_date": "2023-07-30T03:43:59.244Z" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
data: | ||
allowedHosts: | ||
hosts: | ||
- https://api.short.io | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the manifest file it looks you have 2 endpoints you must allow here.
|
||
registries: | ||
oss: | ||
enabled: false | ||
cloud: | ||
enabled: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you changing this from the previous version? |
||
connectorSubtype: api | ||
connectorType: source | ||
definitionId: 2fed2292-5586-480c-af92-9944e39fe12d | ||
dockerImageTag: 0.1.3 | ||
definitionId: 1cdcd5ef-a90a-4b91-a215-9db9fd769048 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can keep the same |
||
dockerImageTag: 0.2.0 | ||
dockerRepository: airbyte/source-shortio | ||
githubIssueLabel: source-shortio | ||
icon: short.svg | ||
icon: shortio.svg | ||
license: MIT | ||
name: Short.io | ||
registries: | ||
cloud: | ||
enabled: true | ||
oss: | ||
enabled: true | ||
name: Shortio | ||
releaseDate: TODO | ||
releaseStage: alpha | ||
documentationUrl: https://docs.airbyte.com/integrations/sources/shortio | ||
tags: | ||
- language:python | ||
- language:lowcode | ||
metadataSpecVersion: "1.0" |
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.
Can we bump to
1.0.0
?