Skip to content

Commit

Permalink
✨ Source Google Analytics (Universal Analytics): disable connectors (#…
Browse files Browse the repository at this point in the history
…40244)

Co-authored-by: Alexandre Girard <[email protected]>
  • Loading branch information
maxi297 and girarda authored Jun 30, 2024
1 parent dc0e4f8 commit 58f67cb
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 20 additions & 2 deletions airbyte-integrations/connectors/source-google-analytics-v4/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ This connector supports Universal Analytics properties through the [Reporting AP

</HideInUI>

:::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.**
Expand Down Expand Up @@ -267,7 +273,8 @@ The Google Analytics connector should not run into the "requests per 100 seconds
<summary>Expand to review</summary>

| 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 |

Expand Down
13 changes: 10 additions & 3 deletions docs/integrations/sources/google-analytics-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ This connector supports Universal Analytics properties through the [Reporting AP

</HideInUI>

:::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.**
Expand Down Expand Up @@ -269,9 +275,10 @@ The Google Analytics connector should not run into the "requests per 100 seconds
<summary>Expand to review</summary>

| 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. |
Expand Down

0 comments on commit 58f67cb

Please sign in to comment.