-
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 Amplitude: migrate to YAML #22362
Merged
artem1205
merged 28 commits into
master
from
artem1205/source-amplitude-migrate-to-YAML-22142
Apr 13, 2023
Merged
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
4e5a7b4
Source Amplitude: migrate to YAML
artem1205 2372f21
Source Amplitude: enable high strictness level
artem1205 4b92708
Source Amplitude: update docs
artem1205 31d2f51
Source Amplitude: update cursor field + expected records
artem1205 1e64c83
Source Amplitude: logging refactor
artem1205 3cd1dd3
Source Amplitude: refactor extractors
artem1205 0b849fb
Source Amplitude: refactor extractors
artem1205 6013303
Merge branch 'master' into artem1205/source-amplitude-migrate-to-YAML…
artem1205 1328b18
Source Amplitude: migrate to beta low-code
artem1205 597c6d5
Source Amplitude: add docstring
artem1205 5e6f42e
Source Amplitude: fix unit tests
artem1205 3304d17
Source Amplitude: update expected records
artem1205 170a6ff
Merge branch 'master' into artem1205/source-amplitude-migrate-to-YAML…
artem1205 381c9b2
Source Amplitude: fix response filter action
artem1205 0a9a2ab
Source Amplitude: rename typo
artem1205 7b2114f
Merge branch 'master' into artem1205/source-amplitude-migrate-to-YAML…
artem1205 7f77a69
Source Amplitude: fix migration
artem1205 5370a24
Source Amplitude: update docs
artem1205 91404c8
Source Amplitude: fix migration
artem1205 d58385b
Source Amplitude: update expected recrods
artem1205 5efca3a
Merge branch 'master' into artem1205/source-amplitude-migrate-to-YAML…
artem1205 b10ea98
Merge branch 'master' into artem1205/source-amplitude-migrate-to-YAML…
artem1205 dff40a6
Source Amplitude: bump manifest version
artem1205 ce9147f
Merge branch 'master' into artem1205/source-amplitude-migrate-to-YAML…
artem1205 919218d
Automated Change
artem1205 9a0f38f
Source Amplitude: Update http -> https
artem1205 044cbac
Source Amplitude: tests fix + pin cdk version
artem1205 83c4b3f
auto-bump connector version
octavia-squidington-iii 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
36 changes: 29 additions & 7 deletions
36
airbyte-integrations/connectors/source-amplitude/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_amplitude ./source_amplitude | ||
|
||
# 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_amplitude ./source_amplitude | ||
|
||
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" | ||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] | ||
|
||
LABEL io.airbyte.version=0.1.22 | ||
LABEL io.airbyte.version=0.2.0 | ||
LABEL io.airbyte.name=airbyte/source-amplitude |
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
4 changes: 0 additions & 4 deletions
4
...rid/integration_tests/integration_test.py → ...s/connectors/source-amplitude/__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,7 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
|
||
def test_example(): | ||
assert True |
31 changes: 19 additions & 12 deletions
31
airbyte-integrations/connectors/source-amplitude/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,35 +1,42 @@ | ||
# See [Connector Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/connector-acceptance-tests-reference) | ||
# for more information about how to configure these tests | ||
connector_image: airbyte/source-amplitude:dev | ||
test_strictness_level: high | ||
acceptance_tests: | ||
spec: | ||
tests: | ||
- spec_path: "source_amplitude/spec.json" | ||
- spec_path: "source_amplitude/spec.yaml" | ||
connection: | ||
tests: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
discovery: | ||
tests: | ||
- config_path: "secrets/config.json" | ||
- config_path: "secrets/config.json" | ||
backward_compatibility_tests_config: | ||
disable_for_version: 0.1.22 # cursor field for stream events has been changed | ||
basic_read: | ||
tests: | ||
- config_path: "secrets/config.json" | ||
expect_records: | ||
path: "integration_tests/expected_records.jsonl" | ||
empty_streams: | ||
- name: "cohorts" | ||
bypass_reason: "This stream is empty due to free subscription plan for the sandbox." | ||
- name: "annotations" | ||
bypass_reason: "This stream is empty due to free subscription plan for the sandbox." | ||
full_refresh: | ||
tests: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
expect_records: | ||
path: "integration_tests/expected_records.jsonl" | ||
extra_fields: no | ||
exact_order: no | ||
extra_records: yes | ||
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: | ||
tests: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" |
4 changes: 2 additions & 2 deletions
4
airbyte-integrations/connectors/source-amplitude/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
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
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.
nit: Can we either not make this change or apply it to all connectors (in a separate PR) for the sake of consistency?