Skip to content

Commit c6e27a0

Browse files
committed
Merge branch 'master' into ddavydov/#2344-source-google-ads-refactor-date-slicing
2 parents cc504d3 + 62198ed commit c6e27a0

File tree

60 files changed

+609
-913
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+609
-913
lines changed

.github/workflows/connectors_tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
default: "--modified"
1212
runner:
1313
description: "The runner to use for this job"
14-
default: "conn-prod-xlarge-runner"
14+
default: "dev-large-runner"
1515
pull_request:
1616
types:
1717
- opened
@@ -21,7 +21,7 @@ jobs:
2121
connectors_ci:
2222
name: Connectors CI
2323
timeout-minutes: 1440 # 24 hours
24-
runs-on: ${{ inputs.runner || 'conn-prod-xlarge-runner'}}
24+
runs-on: ${{ inputs.runner || 'dev-large-runner'}}
2525
steps:
2626
- name: Checkout Airbyte
2727
uses: actions/checkout@v3

.github/workflows/publish_connectors.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
publish_connectors:
1919
name: Publish connectors
20-
runs-on: conn-prod-xlarge-runner
20+
runs-on: large-runner
2121
steps:
2222
- name: Checkout Airbyte
2323
uses: actions/checkout@v3

.github/workflows/report-connectors-dependency.yml

-54
This file was deleted.

airbyte-cdk/python/.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.43.1
2+
current_version = 0.43.2
33
commit = False
44

55
[bumpversion:file:setup.py]

airbyte-cdk/python/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.43.2
4+
Connector builder module: serialize request body as string
5+
36
## 0.43.1
47
Fix availability check to handle HttpErrors which happen during slice extraction
58

airbyte-cdk/python/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apk --no-cache upgrade \
1010
&& apk --no-cache add tzdata build-base
1111

1212
# install airbyte-cdk
13-
RUN pip install --prefix=/install airbyte-cdk==0.43.1
13+
RUN pip install --prefix=/install airbyte-cdk==0.43.2
1414

1515
# build a clean environment
1616
FROM base
@@ -32,5 +32,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
3232
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3333

3434
# needs to be the same as CDK
35-
LABEL io.airbyte.version=0.43.1
35+
LABEL io.airbyte.version=0.43.2
3636
LABEL io.airbyte.name=airbyte/source-declarative-manifest

airbyte-cdk/python/airbyte_cdk/connector_builder/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class HttpResponse:
1717
class HttpRequest:
1818
url: str
1919
parameters: Optional[Dict[str, Any]]
20-
body: Optional[Dict[str, Any]]
2120
headers: Optional[Dict[str, Any]]
2221
http_method: str
22+
body: Optional[str] = None
2323

2424

2525
@dataclass

airbyte-cdk/python/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py

+3-12
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import json
66
from dataclasses import InitVar, dataclass, field
77
from itertools import islice
8-
from json import JSONDecodeError
98
from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Union
109

1110
import requests
@@ -496,22 +495,14 @@ def _prepared_request_to_airbyte_message(request: requests.PreparedRequest) -> A
496495
"url": request.url,
497496
"http_method": request.method,
498497
"headers": dict(request.headers),
499-
"body": _body_binary_string_to_dict(request.body),
498+
"body": _normalize_body_string(request.body),
500499
}
501500
log_message = filter_secrets(f"request:{json.dumps(request_dict)}")
502501
return AirbyteMessage(type=MessageType.LOG, log=AirbyteLogMessage(level=Level.INFO, message=log_message))
503502

504503

505-
def _body_binary_string_to_dict(body_str: str) -> Optional[Mapping[str, str]]:
506-
if body_str:
507-
if isinstance(body_str, (bytes, bytearray)):
508-
body_str = body_str.decode()
509-
try:
510-
return json.loads(body_str)
511-
except JSONDecodeError:
512-
return {k: v for k, v in [s.split("=") for s in body_str.split("&")]}
513-
else:
514-
return None
504+
def _normalize_body_string(body_str: Optional[Union[str, bytes]]) -> Optional[str]:
505+
return body_str.decode() if isinstance(body_str, (bytes, bytearray)) else body_str
515506

516507

517508
def _response_to_airbyte_message(response: requests.Response) -> AirbyteMessage:

airbyte-cdk/python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
name="airbyte-cdk",
1818
# The version of the airbyte-cdk package is used at runtime to validate manifests. That validation must be
1919
# updated if our semver format changes such as using release candidate versions.
20-
version="0.43.1",
20+
version="0.43.2",
2121
description="A framework for writing Airbyte Connectors.",
2222
long_description=README,
2323
long_description_content_type="text/markdown",

airbyte-cdk/python/unit_tests/sources/declarative/retrievers/test_simple_retriever.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def test_path(test_name, requester_path, paginator_path, expected_path):
574574
type=Type.LOG,
575575
log=AirbyteLogMessage(
576576
level=Level.INFO,
577-
message='request:{"url": "https://airbyte.io/", "http_method": "GET", "headers": {"Content-Type": "application/json", "Content-Length": "24"}, "body": {"b1": "v1", "b2": "v2"}}',
577+
message='request:{"url": "https://airbyte.io/", "http_method": "GET", "headers": {"Content-Type": "application/json", "Content-Length": "24"}, "body": "{\\"b1\\": \\"v1\\", \\"b2\\": \\"v2\\"}"}',
578578
),
579579
),
580580
),
@@ -590,23 +590,23 @@ def test_path(test_name, requester_path, paginator_path, expected_path):
590590
type=Type.LOG,
591591
log=AirbyteLogMessage(
592592
level=Level.INFO,
593-
message='request:{"url": "https://airbyte.io/?p1=v1&p2=v2", "http_method": "GET", "headers": {"Content-Type": "application/json", "h1": "v1", "Content-Length": "24"}, "body": {"b1": "v1", "b2": "v2"}}',
593+
message='request:{"url": "https://airbyte.io/?p1=v1&p2=v2", "http_method": "GET", "headers": {"Content-Type": "application/json", "h1": "v1", "Content-Length": "24"}, "body": "{\\"b1\\": \\"v1\\", \\"b2\\": \\"v2\\"}"}',
594594
),
595595
),
596596
),
597597
(
598598
"test_get_request_with_request_body_data",
599599
HttpMethod.GET,
600600
"https://airbyte.io",
601-
{"Content-Type": "application/json"},
601+
{"Content-Type": "application/x-www-form-urlencoded"},
602602
{},
603603
{},
604604
{"b1": "v1", "b2": "v2"},
605605
AirbyteMessage(
606606
type=Type.LOG,
607607
log=AirbyteLogMessage(
608608
level=Level.INFO,
609-
message='request:{"url": "https://airbyte.io/", "http_method": "GET", "headers": {"Content-Type": "application/json", "Content-Length": "11"}, "body": {"b1": "v1", "b2": "v2"}}',
609+
message='request:{"url": "https://airbyte.io/", "http_method": "GET", "headers": {"Content-Type": "application/x-www-form-urlencoded", "Content-Length": "11"}, "body": "b1=v1&b2=v2"}',
610610
),
611611
),
612612
),

airbyte-integrations/connectors/destination-gcs/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ ENV APPLICATION destination-gcs
2424

2525
COPY --from=build /airbyte /airbyte
2626

27-
LABEL io.airbyte.version=0.3.0
27+
LABEL io.airbyte.version=0.4.0
2828
LABEL io.airbyte.name=airbyte/destination-gcs

airbyte-integrations/connectors/destination-gcs/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ data:
22
connectorSubtype: file
33
connectorType: destination
44
definitionId: ca8f6566-e555-4b40-943a-545bf123117a
5-
dockerImageTag: 0.3.0
5+
dockerImageTag: 0.4.0
66
dockerRepository: airbyte/destination-gcs
77
githubIssueLabel: destination-gcs
88
icon: googlecloudstorage.svg
9-
license: MIT
9+
license: ELv2
1010
name: Google Cloud Storage (GCS)
1111
registries:
1212
cloud:

airbyte-integrations/connectors/destination-s3/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ RUN /bin/bash -c 'set -e && \
4949
fi'
5050

5151
RUN yum clean all
52-
LABEL io.airbyte.version=0.4.2
52+
LABEL io.airbyte.version=0.5.0
5353
LABEL io.airbyte.name=airbyte/destination-s3

airbyte-integrations/connectors/destination-s3/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ data:
22
connectorSubtype: file
33
connectorType: destination
44
definitionId: 4816b78f-1489-44c1-9060-4b19d5fa9362
5-
dockerImageTag: 0.4.2
5+
dockerImageTag: 0.5.0
66
dockerRepository: airbyte/destination-s3
77
githubIssueLabel: destination-s3
88
icon: s3.svg
9-
license: MIT
9+
license: ELv2
1010
name: S3
1111
registries:
1212
cloud:

airbyte-integrations/connectors/source-facebook-marketing/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

1515

16-
LABEL io.airbyte.version=0.4.3
16+
LABEL io.airbyte.version=0.5.0
1717
LABEL io.airbyte.name=airbyte/source-facebook-marketing

airbyte-integrations/connectors/source-facebook-marketing/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ data:
55
connectorSubtype: api
66
connectorType: source
77
definitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c
8-
dockerImageTag: 0.4.3
8+
dockerImageTag: 0.5.0
99
dockerRepository: airbyte/source-facebook-marketing
1010
githubIssueLabel: source-facebook-marketing
1111
icon: facebook.svg
12-
license: MIT
12+
license: ELv2
1313
name: Facebook Marketing
1414
registries:
1515
cloud:

airbyte-integrations/connectors/source-facebook-pages/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ COPY source_facebook_pages ./source_facebook_pages
3434
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
3535
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3636

37-
LABEL io.airbyte.version=0.2.5
37+
LABEL io.airbyte.version=0.3.0
3838
LABEL io.airbyte.name=airbyte/source-facebook-pages

airbyte-integrations/connectors/source-facebook-pages/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ data:
55
connectorSubtype: api
66
connectorType: source
77
definitionId: 010eb12f-837b-4685-892d-0a39f76a98f5
8-
dockerImageTag: 0.2.5
8+
dockerImageTag: 0.3.0
99
dockerRepository: airbyte/source-facebook-pages
1010
githubIssueLabel: source-facebook-pages
1111
icon: facebook.svg
12-
license: MIT
12+
license: ELv2
1313
name: Facebook Pages
1414
registries:
1515
cloud:

airbyte-integrations/connectors/source-gcs/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ RUN pip install .
1313

1414
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1515

16-
LABEL io.airbyte.version=0.1.0
16+
LABEL io.airbyte.version=0.2.0
1717
LABEL io.airbyte.name=airbyte/source-gcs

airbyte-integrations/connectors/source-gcs/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ data:
22
connectorSubtype: file
33
connectorType: source
44
definitionId: 2a8c41ae-8c23-4be0-a73f-2ab10ca1a820
5-
dockerImageTag: 0.1.0
5+
dockerImageTag: 0.2.0
66
dockerRepository: airbyte/source-gcs
77
githubIssueLabel: source-gcs
88
icon: gcs.svg
9-
license: MIT
9+
license: ELv2
1010
name: GCS
1111
releaseStage: alpha
1212
registries:

airbyte-integrations/connectors/source-google-ads/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ COPY main.py ./
1313

1414
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1515

16-
LABEL io.airbyte.version=0.2.25
16+
LABEL io.airbyte.version=0.3.1
1717
LABEL io.airbyte.name=airbyte/source-google-ads

airbyte-integrations/connectors/source-google-ads/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ data:
66
connectorSubtype: api
77
connectorType: source
88
definitionId: 253487c0-2246-43ba-a21f-5116b20a2c50
9-
dockerImageTag: 0.2.25
9+
dockerImageTag: 0.3.1
1010
dockerRepository: airbyte/source-google-ads
1111
githubIssueLabel: source-google-ads
1212
icon: google-adwords.svg
13-
license: MIT
13+
license: Elv2
1414
name: Google Ads
1515
registries:
1616
cloud:

airbyte-integrations/connectors/source-google-analytics-data-api/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ COPY source_google_analytics_data_api ./source_google_analytics_data_api
2828
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
2929
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3030

31-
LABEL io.airbyte.version=1.0.0
31+
LABEL io.airbyte.version=1.1.0
3232
LABEL io.airbyte.name=airbyte/source-google-analytics-data-api

airbyte-integrations/connectors/source-google-analytics-data-api/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ data:
77
connectorSubtype: api
88
connectorType: source
99
definitionId: 3cc2eafd-84aa-4dca-93af-322d9dfeec1a
10-
dockerImageTag: 1.0.0
10+
dockerImageTag: 1.1.0
1111
dockerRepository: airbyte/source-google-analytics-data-api
1212
githubIssueLabel: source-google-analytics-data-api
1313
icon: google-analytics.svg
14-
license: MIT
14+
license: Elv2
1515
name: Google Analytics 4 (GA4)
1616
registries:
1717
cloud:

airbyte-integrations/connectors/source-google-analytics-v4/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ RUN pip install .
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

15-
LABEL io.airbyte.version=0.1.36
15+
LABEL io.airbyte.version=0.2.0
1616
LABEL io.airbyte.name=airbyte/source-google-analytics-v4

airbyte-integrations/connectors/source-google-analytics-v4/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ data:
88
connectorSubtype: api
99
connectorType: source
1010
definitionId: eff3616a-f9c3-11eb-9a03-0242ac130003
11-
dockerImageTag: 0.1.36
11+
dockerImageTag: 0.2.0
1212
dockerRepository: airbyte/source-google-analytics-v4
1313
githubIssueLabel: source-google-analytics-v4
1414
icon: google-analytics.svg
15-
license: MIT
15+
license: Elv2
1616
name: Google Analytics (Universal Analytics)
1717
registries:
1818
cloud:

airbyte-integrations/connectors/source-google-search-console/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ RUN pip install .
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

15-
LABEL io.airbyte.version=1.0.2
15+
LABEL io.airbyte.version=1.1.0
1616
LABEL io.airbyte.name=airbyte/source-google-search-console

airbyte-integrations/connectors/source-google-search-console/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ data:
55
connectorSubtype: api
66
connectorType: source
77
definitionId: eb4c9e00-db83-4d63-a386-39cfa91012a8
8-
dockerImageTag: 1.0.2
8+
dockerImageTag: 1.1.0
99
dockerRepository: airbyte/source-google-search-console
1010
githubIssueLabel: source-google-search-console
1111
icon: googlesearchconsole.svg
12-
license: MIT
12+
license: Elv2
1313
name: Google Search Console
1414
registries:
1515
cloud:

airbyte-integrations/connectors/source-google-sheets/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ COPY source_google_sheets ./source_google_sheets
3434
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
3535
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3636

37-
LABEL io.airbyte.version=0.2.39
37+
LABEL io.airbyte.version=0.3.0
3838
LABEL io.airbyte.name=airbyte/source-google-sheets

0 commit comments

Comments
 (0)