diff --git a/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/main.py b/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/main.py index b91a0b49b694e..4d84f48a074b2 100644 --- a/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/main.py +++ b/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/main.py @@ -2,12 +2,25 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # - import sys -from airbyte_cdk.entrypoint import launch -from source_google_analytics_v4_service_account_only import SourceGoogleAnalyticsV4ServiceAccountOnly +from airbyte_cdk.entrypoint import AirbyteEntrypoint +from airbyte_cdk.exception_handler import init_uncaught_exception_handler +from airbyte_cdk.logger import init_logger +from airbyte_cdk.models import AirbyteMessage, ConnectorSpecification, FailureType, Type +from airbyte_cdk.utils import AirbyteTracedException if __name__ == "__main__": - source = SourceGoogleAnalyticsV4ServiceAccountOnly() - launch(source, sys.argv[1:]) + logger = init_logger("airbyte") + init_uncaught_exception_handler(logger) + + if AirbyteEntrypoint.parse_args(sys.argv[1:]).command == "spec": + message = AirbyteMessage(type=Type.SPEC, spec=ConnectorSpecification.parse_obj({"connectionSpecification": {}})) + print(message.json(exclude_unset=True)) + else: + error_message = "Google Analytics Universal Analytics Source Connector will be deprecated due to the deprecation of the Google Analytics Universal Analytics API by Google. This deprecation is scheduled by Google on July 1, 2024 (see Google’s Documentation for more details). Transition to the Google Analytics 4 (GA4) Source Connector by July 1, 2024, to continue accessing your analytics data." + raise AirbyteTracedException( + message=error_message, + internal_message=error_message, + failure_type=FailureType.config_error, + ) diff --git a/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/metadata.yaml b/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/metadata.yaml index ad5328784295a..ec9b5fd257b49 100644 --- a/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/metadata.yaml +++ b/airbyte-integrations/connectors/source-google-analytics-v4-service-account-only/metadata.yaml @@ -13,7 +13,7 @@ data: connectorSubtype: api connectorType: source definitionId: 9e28a926-8f3c-4911-982d-a2e1c378b59c - dockerImageTag: 0.0.2 + dockerImageTag: 0.1.0 dockerRepository: airbyte/source-google-analytics-v4-service-account-only documentationUrl: https://docs.airbyte.com/integrations/sources/google-analytics-v4-service-account-only githubIssueLabel: source-google-analytics-v4-service-account-only @@ -22,11 +22,11 @@ data: name: Google Analytics (Universal Analytics) registries: cloud: - enabled: true + enabled: false oss: - enabled: true + enabled: false releaseStage: generally_available - supportLevel: community + supportLevel: archived tags: - language:python - cdk:python diff --git a/airbyte-integrations/connectors/source-google-analytics-v4/main.py b/airbyte-integrations/connectors/source-google-analytics-v4/main.py index 3fd58bc1d5f62..4d84f48a074b2 100644 --- a/airbyte-integrations/connectors/source-google-analytics-v4/main.py +++ b/airbyte-integrations/connectors/source-google-analytics-v4/main.py @@ -2,7 +2,25 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from source_google_analytics_v4.run import run +import sys + +from airbyte_cdk.entrypoint import AirbyteEntrypoint +from airbyte_cdk.exception_handler import init_uncaught_exception_handler +from airbyte_cdk.logger import init_logger +from airbyte_cdk.models import AirbyteMessage, ConnectorSpecification, FailureType, Type +from airbyte_cdk.utils import AirbyteTracedException if __name__ == "__main__": - run() + logger = init_logger("airbyte") + init_uncaught_exception_handler(logger) + + if AirbyteEntrypoint.parse_args(sys.argv[1:]).command == "spec": + message = AirbyteMessage(type=Type.SPEC, spec=ConnectorSpecification.parse_obj({"connectionSpecification": {}})) + print(message.json(exclude_unset=True)) + else: + error_message = "Google Analytics Universal Analytics Source Connector will be deprecated due to the deprecation of the Google Analytics Universal Analytics API by Google. This deprecation is scheduled by Google on July 1, 2024 (see Google’s Documentation for more details). Transition to the Google Analytics 4 (GA4) Source Connector by July 1, 2024, to continue accessing your analytics data." + raise AirbyteTracedException( + message=error_message, + internal_message=error_message, + failure_type=FailureType.config_error, + ) diff --git a/airbyte-integrations/connectors/source-google-analytics-v4/metadata.yaml b/airbyte-integrations/connectors/source-google-analytics-v4/metadata.yaml index 5dd28fc7f0947..536718c7bcfc5 100644 --- a/airbyte-integrations/connectors/source-google-analytics-v4/metadata.yaml +++ b/airbyte-integrations/connectors/source-google-analytics-v4/metadata.yaml @@ -13,7 +13,7 @@ data: connectorSubtype: api connectorType: source definitionId: eff3616a-f9c3-11eb-9a03-0242ac130003 - dockerImageTag: 0.3.3 + dockerImageTag: 0.4.0 dockerRepository: airbyte/source-google-analytics-v4 documentationUrl: https://docs.airbyte.com/integrations/sources/google-analytics-v4 githubIssueLabel: source-google-analytics-v4 @@ -29,9 +29,9 @@ data: cloud: enabled: false oss: - enabled: true + enabled: false releaseStage: generally_available - supportLevel: certified + supportLevel: archived tags: - language:python - cdk:python diff --git a/airbyte-integrations/connectors/source-google-analytics-v4/pyproject.toml b/airbyte-integrations/connectors/source-google-analytics-v4/pyproject.toml index 8738fb256f468..aef1cec59286a 100644 --- a/airbyte-integrations/connectors/source-google-analytics-v4/pyproject.toml +++ b/airbyte-integrations/connectors/source-google-analytics-v4/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "0.3.3" +version = "0.4.0" name = "source-google-analytics-v4" description = "Source implementation for Google Analytics V4." authors = [ "Airbyte ",] diff --git a/docs/integrations/sources/google-analytics-v4-service-account-only.md b/docs/integrations/sources/google-analytics-v4-service-account-only.md index a4bbee4cf74d4..3d164dfe6d253 100644 --- a/docs/integrations/sources/google-analytics-v4-service-account-only.md +++ b/docs/integrations/sources/google-analytics-v4-service-account-only.md @@ -8,6 +8,12 @@ This connector supports Universal Analytics properties through the [Reporting AP +:::danger + +Google Analytics Universal Analytics Source Connector will be deprecated due to the deprecation of the Google Analytics Universal Analytics API by Google. This deprecation is scheduled by Google on July 1, 2024 (see Google's Documentation for more details). Transition to the Google Analytics 4 (GA4) Source Connector by July 1, 2024, to continue accessing your analytics data. + +::: + :::caution **The Google Analytics (Universal Analytics) connector will be deprecated soon.** @@ -267,7 +273,8 @@ The Google Analytics connector should not run into the "requests per 100 seconds Expand to review | Version | Date | Pull Request | Subject | -| :------ | :--------- | :------------------------------------------------------- | :--------------------------------------- | +|:--------|:-----------| :------------------------------------------------------- |:-----------------------------------------| +| 0.1.0 | 2024-07-01 | [40244](https://github.com/airbytehq/airbyte/pull/40244) | Deprecate the connector | | 0.0.2 | 2024-04-19 | [37432](https://github.com/airbytehq/airbyte/pull/36267) | Fix empty response error for test stream | | 0.0.1 | 2024-01-29 | [34323](https://github.com/airbytehq/airbyte/pull/34323) | Initial Release | diff --git a/docs/integrations/sources/google-analytics-v4.md b/docs/integrations/sources/google-analytics-v4.md index 7e001d02d02e4..08a60d0e27471 100644 --- a/docs/integrations/sources/google-analytics-v4.md +++ b/docs/integrations/sources/google-analytics-v4.md @@ -8,6 +8,12 @@ This connector supports Universal Analytics properties through the [Reporting AP +:::danger + +Google Analytics Universal Analytics Source Connector will be deprecated due to the deprecation of the Google Analytics Universal Analytics API by Google. This deprecation is scheduled by Google on July 1, 2024 (see Google's Documentation for more details). Transition to the Google Analytics 4 (GA4) Source Connector by July 1, 2024, to continue accessing your analytics data. + +::: + :::caution **The Google Analytics (Universal Analytics) connector will be deprecated soon.** @@ -269,9 +275,10 @@ The Google Analytics connector should not run into the "requests per 100 seconds Expand to review | Version | Date | Pull Request | Subject | -| :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------- | -| 0.3.3 | 2024-06-21 | [39940](https://github.com/airbytehq/airbyte/pull/39940) | Update dependencies | -| 0.3.2 | 2024-06-04 | [38934](https://github.com/airbytehq/airbyte/pull/38934) | [autopull] Upgrade base image to v1.2.1 | +|:--------| :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------- | +| 0.4.0 | 2024-07-01 | [40244](https://github.com/airbytehq/airbyte/pull/40244) | Deprecate the connector | +| 0.3.3 | 2024-06-21 | [39940](https://github.com/airbytehq/airbyte/pull/39940) | Update dependencies | +| 0.3.2 | 2024-06-04 | [38934](https://github.com/airbytehq/airbyte/pull/38934) | [autopull] Upgrade base image to v1.2.1 | | 0.3.1 | 2024-04-19 | [37432](https://github.com/airbytehq/airbyte/pull/36267) | Fix empty response error for test stream | | 0.3.0 | 2024-03-19 | [36267](https://github.com/airbytehq/airbyte/pull/36267) | Pin airbyte-cdk version to `^0` | | 0.2.5 | 2024-02-09 | [35101](https://github.com/airbytehq/airbyte/pull/35101) | Manage dependencies with Poetry. |