From 9604cc9d4bf256189019802407e2228b719e3cee Mon Sep 17 00:00:00 2001 From: Denys Davydov Date: Thu, 29 Sep 2022 21:26:51 +0300 Subject: [PATCH 1/3] Source Google Ads: install latest CDK version --- .../connectors/source-google-ads/Dockerfile | 2 +- .../source-google-ads/integration_tests/test_incremental.py | 6 +----- airbyte-integrations/connectors/source-google-ads/setup.py | 2 +- docs/integrations/sources/google-ads.md | 3 ++- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-ads/Dockerfile b/airbyte-integrations/connectors/source-google-ads/Dockerfile index 50b797af4f23..ccb8d79694f3 100644 --- a/airbyte-integrations/connectors/source-google-ads/Dockerfile +++ b/airbyte-integrations/connectors/source-google-ads/Dockerfile @@ -13,5 +13,5 @@ COPY main.py ./ ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.2.0 +LABEL io.airbyte.version=0.2.1 LABEL io.airbyte.name=airbyte/source-google-ads diff --git a/airbyte-integrations/connectors/source-google-ads/integration_tests/test_incremental.py b/airbyte-integrations/connectors/source-google-ads/integration_tests/test_incremental.py index a5e9b8f655af..c510eb402160 100644 --- a/airbyte-integrations/connectors/source-google-ads/integration_tests/test_incremental.py +++ b/airbyte-integrations/connectors/source-google-ads/integration_tests/test_incremental.py @@ -34,10 +34,6 @@ def configured_catalog(): def test_incremental_sync(config, configured_catalog): - today = pendulum.now().date() - start_date = today.subtract(months=3) - config["start_date"] = start_date.to_date_string() - config.pop("end_date", "") google_ads_client = SourceGoogleAds() records = list(google_ads_client.read(logging.getLogger("airbyte"), config, ConfiguredAirbyteCatalog.parse_obj(configured_catalog))) latest_state = None @@ -51,7 +47,7 @@ def test_incremental_sync(config, configured_catalog): continue cursor_value = message.record.data["segments.date"] assert cursor_value <= latest_state - assert cursor_value >= start_date.subtract(days=GAP_DAYS).to_date_string() + assert cursor_value >= pendulum.parse(config["start_date"]).subtract(days=GAP_DAYS).to_date_string() # next sync records = list( diff --git a/airbyte-integrations/connectors/source-google-ads/setup.py b/airbyte-integrations/connectors/source-google-ads/setup.py index 59237952ce38..5d271ee09994 100644 --- a/airbyte-integrations/connectors/source-google-ads/setup.py +++ b/airbyte-integrations/connectors/source-google-ads/setup.py @@ -7,7 +7,7 @@ # pin protobuf==3.20.0 as other versions may cause problems on different architectures # (see https://github.com/airbytehq/airbyte/issues/13580) -MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "google-ads==17.0.0", "protobuf==3.20.0", "pendulum"] +MAIN_REQUIREMENTS = ["airbyte-cdk", "google-ads==17.0.0", "protobuf==3.20.0", "pendulum"] TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock", "freezegun", "requests-mock"] diff --git a/docs/integrations/sources/google-ads.md b/docs/integrations/sources/google-ads.md index 55f6baab4ceb..d277c93a65b5 100644 --- a/docs/integrations/sources/google-ads.md +++ b/docs/integrations/sources/google-ads.md @@ -123,7 +123,8 @@ Due to a limitation in the Google Ads API which does not allow getting performan ## Changelog | Version | Date | Pull Request | Subject | -| :------- | :--------- | :------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- | +|:---------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------| +| `0.2.1` | 2022-09-29 | [00000](https://github.com/airbytehq/airbyte/pull/00000) | Always use latest CDK version | | `0.2.0` | 2022-08-23 | [15858](https://github.com/airbytehq/airbyte/pull/15858) | Mark the `query` and `table_name` fields in `custom_queries` as required | | `0.1.44` | 2022-07-27 | [15084](https://github.com/airbytehq/airbyte/pull/15084) | Fix data type `ad_group_criterion.topic.path` in `display_topics_performance_report` and shifted `campaigns` to non-managers streams | | `0.1.43` | 2022-07-12 | [14614](https://github.com/airbytehq/airbyte/pull/14614) | Update API version to `v11`, update `google-ads` to 17.0.0 | From 4aac1c00a01af541f09cfb941c9e04109dc953ee Mon Sep 17 00:00:00 2001 From: Denys Davydov Date: Thu, 29 Sep 2022 21:28:16 +0300 Subject: [PATCH 2/3] source google ads: upd changelog --- docs/integrations/sources/google-ads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/sources/google-ads.md b/docs/integrations/sources/google-ads.md index d277c93a65b5..6acaa39a3d69 100644 --- a/docs/integrations/sources/google-ads.md +++ b/docs/integrations/sources/google-ads.md @@ -124,7 +124,7 @@ Due to a limitation in the Google Ads API which does not allow getting performan | Version | Date | Pull Request | Subject | |:---------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------| -| `0.2.1` | 2022-09-29 | [00000](https://github.com/airbytehq/airbyte/pull/00000) | Always use latest CDK version | +| `0.2.1` | 2022-09-29 | [17412](https://github.com/airbytehq/airbyte/pull/17412) | Always use latest CDK version | | `0.2.0` | 2022-08-23 | [15858](https://github.com/airbytehq/airbyte/pull/15858) | Mark the `query` and `table_name` fields in `custom_queries` as required | | `0.1.44` | 2022-07-27 | [15084](https://github.com/airbytehq/airbyte/pull/15084) | Fix data type `ad_group_criterion.topic.path` in `display_topics_performance_report` and shifted `campaigns` to non-managers streams | | `0.1.43` | 2022-07-12 | [14614](https://github.com/airbytehq/airbyte/pull/14614) | Update API version to `v11`, update `google-ads` to 17.0.0 | From 81e0affa68c7bcc94bf6a4df3f278bcf6fbf9b73 Mon Sep 17 00:00:00 2001 From: Octavia Squidington III Date: Thu, 29 Sep 2022 19:23:24 +0000 Subject: [PATCH 3/3] auto-bump connector version [ci skip] --- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- airbyte-config/init/src/main/resources/seed/source_specs.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 2aecc56717a7..ad65963c936a 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -378,7 +378,7 @@ - name: Google Ads sourceDefinitionId: 253487c0-2246-43ba-a21f-5116b20a2c50 dockerRepository: airbyte/source-google-ads - dockerImageTag: 0.2.0 + dockerImageTag: 0.2.1 documentationUrl: https://docs.airbyte.io/integrations/sources/google-ads icon: google-adwords.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index cbd3be27634a..1c856bc610bf 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -3706,7 +3706,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-google-ads:0.2.0" +- dockerImage: "airbyte/source-google-ads:0.2.1" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/google-ads" connectionSpecification: