-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Source Azure Blob Storage: migrate to File-based CDK (#31336)
Co-authored-by: davydov-d <[email protected]>
- Loading branch information
Showing
57 changed files
with
1,391 additions
and
1,125 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
airbyte-integrations/connectors/source-azure-blob-storage/.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
* | ||
!Dockerfile | ||
!main.py | ||
!source_azure_blob_storage | ||
!setup.py | ||
!secrets |
30 changes: 30 additions & 0 deletions
30
airbyte-integrations/connectors/source-azure-blob-storage/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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM python:3.9-slim as base | ||
|
||
# build and load all requirements | ||
FROM base as builder | ||
RUN apt-get update | ||
WORKDIR /airbyte/integration_code | ||
|
||
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 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 | ||
|
||
# copy payload code only | ||
COPY main.py ./ | ||
COPY source_azure_blob_storage ./source_azure_blob_storage | ||
|
||
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" | ||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] | ||
|
||
LABEL io.airbyte.version=0.2.0 | ||
LABEL io.airbyte.name=airbyte/source-azure-blob-storage |
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
140 changes: 135 additions & 5 deletions
140
airbyte-integrations/connectors/source-azure-blob-storage/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,7 +1,137 @@ | ||
# See [Source Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/source-acceptance-tests-reference) | ||
# for more information about how to configure these tests | ||
connector_image: airbyte/source-azure-blob-storage:dev | ||
acceptance-tests: | ||
acceptance_tests: | ||
basic_read: | ||
tests: | ||
- config_path: secrets/config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_custom_encoding_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_custom_encoding.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_custom_format_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_custom_format.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_user_schema_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_user_schema.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_no_header_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_no_header.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_skip_rows_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_skip_rows.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_skip_rows_no_header_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_skip_rows_no_header.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_with_nulls_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_with_nulls.jsonl | ||
exact_order: true | ||
- config_path: secrets/csv_with_null_bools_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/csv_with_null_bools.jsonl | ||
exact_order: true | ||
- config_path: secrets/parquet_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/parquet.jsonl | ||
exact_order: true | ||
- config_path: secrets/avro_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/avro.jsonl | ||
exact_order: true | ||
- config_path: secrets/jsonl_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/jsonl.jsonl | ||
exact_order: true | ||
- config_path: secrets/jsonl_newlines_config.json | ||
expect_records: | ||
path: integration_tests/expected_records/jsonl_newlines.jsonl | ||
exact_order: true | ||
connection: | ||
tests: | ||
- config_path: secrets/config.json | ||
status: succeed | ||
- config_path: secrets/csv_custom_encoding_config.json | ||
status: succeed | ||
- config_path: secrets/csv_custom_format_config.json | ||
status: succeed | ||
- config_path: secrets/csv_user_schema_config.json | ||
status: succeed | ||
- config_path: secrets/csv_no_header_config.json | ||
status: succeed | ||
- config_path: secrets/csv_skip_rows_config.json | ||
status: succeed | ||
- config_path: secrets/csv_skip_rows_no_header_config.json | ||
status: succeed | ||
- config_path: secrets/csv_with_nulls_config.json | ||
status: succeed | ||
- config_path: secrets/csv_with_null_bools_config.json | ||
status: succeed | ||
- config_path: secrets/parquet_config.json | ||
status: succeed | ||
- config_path: secrets/avro_config.json | ||
status: succeed | ||
- config_path: secrets/jsonl_config.json | ||
status: succeed | ||
- config_path: secrets/jsonl_newlines_config.json | ||
status: succeed | ||
discovery: | ||
tests: | ||
- config_path: secrets/config.json | ||
- config_path: secrets/csv_custom_encoding_config.json | ||
- config_path: secrets/csv_custom_format_config.json | ||
- config_path: secrets/csv_user_schema_config.json | ||
- config_path: secrets/csv_no_header_config.json | ||
- config_path: secrets/csv_skip_rows_config.json | ||
- config_path: secrets/csv_skip_rows_no_header_config.json | ||
- config_path: secrets/csv_with_nulls_config.json | ||
- config_path: secrets/csv_with_null_bools_config.json | ||
- config_path: secrets/parquet_config.json | ||
- config_path: secrets/avro_config.json | ||
- config_path: secrets/jsonl_config.json | ||
- config_path: secrets/jsonl_newlines_config.json | ||
full_refresh: | ||
tests: | ||
- config_path: secrets/config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/csv.json | ||
- config_path: secrets/parquet_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/parquet.json | ||
- config_path: secrets/avro_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/avro.json | ||
- config_path: secrets/jsonl_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/jsonl.json | ||
- config_path: secrets/jsonl_newlines_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/jsonl.json | ||
incremental: | ||
tests: | ||
- config_path: secrets/config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/csv.json | ||
future_state: | ||
future_state_path: integration_tests/abnormal_states/csv.json | ||
- config_path: secrets/parquet_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/parquet.json | ||
future_state: | ||
future_state_path: integration_tests/abnormal_states/parquet.json | ||
- config_path: secrets/avro_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/avro.json | ||
future_state: | ||
future_state_path: integration_tests/abnormal_states/avro.json | ||
- config_path: secrets/jsonl_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/jsonl.json | ||
future_state: | ||
future_state_path: integration_tests/abnormal_states/jsonl.json | ||
- config_path: secrets/jsonl_newlines_config.json | ||
configured_catalog_path: integration_tests/configured_catalogs/jsonl.json | ||
future_state: | ||
future_state_path: integration_tests/abnormal_states/jsonl_newlines.json | ||
spec: | ||
tests: | ||
- spec_path: "main/resources/spec.json" | ||
- spec_path: integration_tests/spec.json | ||
connector_image: airbyte/source-azure-blob-storage:dev | ||
test_strictness_level: low |
1 change: 1 addition & 0 deletions
1
airbyte-integrations/connectors/source-azure-blob-storage/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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh" |
28 changes: 0 additions & 28 deletions
28
airbyte-integrations/connectors/source-azure-blob-storage/build.gradle
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
airbyte-integrations/connectors/source-azure-blob-storage/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) 2023 Airbyte, Inc., all rights reserved. | ||
# |
12 changes: 12 additions & 0 deletions
12
...grations/connectors/source-azure-blob-storage/integration_tests/abnormal_states/avro.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,12 @@ | ||
[ | ||
{ | ||
"type": "STREAM", | ||
"stream": { | ||
"stream_state": { | ||
"_ab_source_file_last_modified": "2999-01-01T00:00:00.000000Z_test_sample.avro", | ||
"history": { "test_sample.avro": "2999-01-01T00:00:00.000000Z" } | ||
}, | ||
"stream_descriptor": { "name": "airbyte-source-azure-blob-storage-test" } | ||
} | ||
} | ||
] |
12 changes: 12 additions & 0 deletions
12
...egrations/connectors/source-azure-blob-storage/integration_tests/abnormal_states/csv.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,12 @@ | ||
[ | ||
{ | ||
"type": "STREAM", | ||
"stream": { | ||
"stream_state": { | ||
"_ab_source_file_last_modified": "2999-01-01T00:00:00.000000Z_simple_test.csv", | ||
"history": { "simple_test.csv": "2999-01-01T00:00:00.000000Z" } | ||
}, | ||
"stream_descriptor": { "name": "airbyte-source-azure-blob-storage-test" } | ||
} | ||
} | ||
] |
12 changes: 12 additions & 0 deletions
12
...rations/connectors/source-azure-blob-storage/integration_tests/abnormal_states/jsonl.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,12 @@ | ||
[ | ||
{ | ||
"type": "STREAM", | ||
"stream": { | ||
"stream_state": { | ||
"_ab_source_file_last_modified": "2999-01-01T00:00:00.000000Z_simple_test.jsonl", | ||
"history": { "simple_test.jsonl": "2999-01-01T00:00:00.000000Z" } | ||
}, | ||
"stream_descriptor": { "name": "airbyte-source-azure-blob-storage-test" } | ||
} | ||
} | ||
] |
Oops, something went wrong.