diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json index de9f92d0a5737..e3da940795156 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json @@ -2,7 +2,7 @@ "sourceDefinitionId": "e7778cfc-e97c-4458-9ecb-b4f2bba8946c", "name": "Facebook Marketing", "dockerRepository": "airbyte/source-facebook-marketing", - "dockerImageTag": "0.2.9", + "dockerImageTag": "0.2.10", "documentationUrl": "https://hub.docker.com/r/airbyte/source-facebook-marketing", "icon": "facebook.svg" } 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 c280f647bbbec..b0cb529f98414 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -106,7 +106,7 @@ - sourceDefinitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c name: Facebook Marketing dockerRepository: airbyte/source-facebook-marketing - dockerImageTag: 0.2.9 + dockerImageTag: 0.2.10 documentationUrl: https://hub.docker.com/r/airbyte/source-facebook-marketing icon: facebook.svg - sourceDefinitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c diff --git a/airbyte-integrations/connectors/source-facebook-marketing/CHANGELOG.md b/airbyte-integrations/connectors/source-facebook-marketing/CHANGELOG.md index c1770b5ecf995..30f64051aceea 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/CHANGELOG.md +++ b/airbyte-integrations/connectors/source-facebook-marketing/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.2.10 +Update version of facebook_bussiness to 11.0 + ## 0.2.9 Add 80000 as a rate-limiting error code (#3996) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile b/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile index ef47a832b08c9..1e01fd5dfa57a 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile +++ b/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile @@ -12,5 +12,5 @@ RUN pip install . ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.2.9 +LABEL io.airbyte.version=0.2.10 LABEL io.airbyte.name=airbyte/source-facebook-marketing diff --git a/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json index fd3b23daac2f7..d471e878e1205 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json +++ b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json @@ -669,9 +669,6 @@ "cost_per_outbound_click": { "$ref": "ads_action_stats.json" }, - "cost_per_store_visit_action": { - "$ref": "ads_action_stats.json" - }, "cost_per_thruplay": { "$ref": "ads_action_stats.json" }, @@ -807,9 +804,6 @@ "spend": { "type": ["null", "number"] }, - "store_visit_actions": { - "$ref": "ads_action_stats.json" - }, "unique_actions": { "$ref": "ads_action_stats.json" }, diff --git a/airbyte-integrations/connectors/source-facebook-marketing/setup.py b/airbyte-integrations/connectors/source-facebook-marketing/setup.py index e849048325ebc..7ac150f20ecb1 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/setup.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/setup.py @@ -28,7 +28,7 @@ MAIN_REQUIREMENTS = [ "airbyte-cdk~=0.1", "cached_property~=1.5", - "facebook_business~=10.0", + "facebook_business~=11.0", "pendulum~=1.2", ] diff --git a/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_client.py b/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_client.py index e13b260d8560d..a12732a9243e2 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_client.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_client.py @@ -31,6 +31,7 @@ from facebook_business.exceptions import FacebookRequestError from source_facebook_marketing.client import Client +FB_API_VERSION = "11.0" @pytest.fixture(scope="session", name="account_id") def account_id_fixture(): @@ -50,7 +51,7 @@ def mock_default_sleep_interval(mocker): @pytest.fixture(name="client") def client_fixture(some_config, requests_mock, fb_account_response): client = Client(**some_config) - requests_mock.register_uri("GET", FacebookSession.GRAPH + "/v10.0/me/adaccounts", [fb_account_response]) + requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v{FB_API_VERSION}/me/adaccounts", [fb_account_response]) return client @@ -102,9 +103,9 @@ def test_limit_reached(self, requests_mock, client, fb_call_rate_response, accou }, ] - requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v10.0/act_{account_id}/campaigns", campaign_responses) - requests_mock.register_uri("GET", FacebookSession.GRAPH + "/v10.0/1/", [{"status_code": 200}]) - requests_mock.register_uri("GET", FacebookSession.GRAPH + "/v10.0/2/", [{"status_code": 200}]) + requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v{FB_API_VERSION}/act_{account_id}/campaigns", campaign_responses) + requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v{FB_API_VERSION}/1/", [{"status_code": 200}]) + requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v{FB_API_VERSION}/2/", [{"status_code": 200}]) records = list(client.read_stream(AirbyteStream(name="campaigns", json_schema={}))) @@ -149,8 +150,8 @@ def test_batch_limit_reached(self, requests_mock, client, fb_call_rate_response, }, ] - requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v10.0/act_{account_id}/adcreatives", responses) - requests_mock.register_uri("POST", FacebookSession.GRAPH + "/v10.0/", batch_responses) + requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v{FB_API_VERSION}/act_{account_id}/adcreatives", responses) + requests_mock.register_uri("POST", FacebookSession.GRAPH + f"/v{FB_API_VERSION}/", batch_responses) records = list(client.read_stream(AirbyteStream(name="adcreatives", json_schema={}))) @@ -166,7 +167,7 @@ def test_server_error(self, requests_mock, client, account_id): }, ] - requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v10.0/act_{account_id}/campaigns", responses) + requests_mock.register_uri("GET", FacebookSession.GRAPH + f"/v{FB_API_VERSION}/act_{account_id}/campaigns", responses) with pytest.raises(FacebookRequestError): list(client.read_stream(AirbyteStream(name="campaigns", json_schema={})))