Skip to content

Commit 5a06aa3

Browse files
committed
Merge branch 'master' of github.com:airbytehq/airbyte
2 parents 7c4973c + d0d906c commit 5a06aa3

File tree

41 files changed

+451
-458
lines changed

Some content is hidden

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

41 files changed

+451
-458
lines changed

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-hubspot/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ COPY source_hubspot ./source_hubspot
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.8.4
37+
LABEL io.airbyte.version=0.9.0
3838
LABEL io.airbyte.name=airbyte/source-hubspot

airbyte-integrations/connectors/source-hubspot/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: 36c891d9-4bd9-43ac-bad2-10e12756272c
8-
dockerImageTag: 0.8.4
8+
dockerImageTag: 0.9.0
99
dockerRepository: airbyte/source-hubspot
1010
githubIssueLabel: source-hubspot
1111
icon: hubspot.svg
12-
license: MIT
12+
license: ELv2
1313
name: HubSpot
1414
registries:
1515
cloud:

airbyte-integrations/connectors/source-marketo/Dockerfile

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

37-
LABEL io.airbyte.version=1.1.0
37+
LABEL io.airbyte.version=1.2.0
3838
LABEL io.airbyte.name=airbyte/source-marketo

airbyte-integrations/connectors/source-marketo/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: 9e0556f4-69df-4522-a3fb-03264d36b348
8-
dockerImageTag: 1.1.0
8+
dockerImageTag: 1.2.0
99
dockerRepository: airbyte/source-marketo
1010
githubIssueLabel: source-marketo
1111
icon: marketo.svg
12-
license: MIT
12+
license: ELv2
1313
name: Marketo
1414
registries:
1515
cloud:

airbyte-integrations/connectors/source-s3/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ COPY source_s3 ./source_s3
1717
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1818
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1919

20-
LABEL io.airbyte.version=3.0.3
20+
LABEL io.airbyte.version=3.1.0
2121
LABEL io.airbyte.name=airbyte/source-s3

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ data:
55
connectorSubtype: file
66
connectorType: source
77
definitionId: 69589781-7828-43c5-9f63-8925b1c1ccc2
8-
dockerImageTag: 3.0.3
8+
dockerImageTag: 3.1.0
99
dockerRepository: airbyte/source-s3
1010
githubIssueLabel: source-s3
1111
icon: s3.svg
12-
license: MIT
12+
license: ELv2
1313
name: S3
1414
registries:
1515
cloud:

airbyte-integrations/connectors/source-salesforce/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=2.0.14
16+
LABEL io.airbyte.version=2.1.0
1717
LABEL io.airbyte.name=airbyte/source-salesforce

airbyte-integrations/connectors/source-salesforce/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: b117307c-14b6-41aa-9422-947e34922962
8-
dockerImageTag: 2.0.14
8+
dockerImageTag: 2.1.0
99
dockerRepository: airbyte/source-salesforce
1010
githubIssueLabel: source-salesforce
1111
icon: salesforce.svg
12-
license: MIT
12+
license: ELv2
1313
name: Salesforce
1414
registries:
1515
cloud:

airbyte-integrations/connectors/source-zendesk-support/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ COPY source_zendesk_support ./source_zendesk_support
2525
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
2626
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
2727

28-
LABEL io.airbyte.version=0.4.0
28+
LABEL io.airbyte.version=0.5.0
2929
LABEL io.airbyte.name=airbyte/source-zendesk-support

airbyte-integrations/connectors/source-zendesk-support/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ data:
77
connectorType: source
88
maxSecondsBetweenMessages: 10800
99
definitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
10-
dockerImageTag: 0.4.0
10+
dockerImageTag: 0.5.0
1111
dockerRepository: airbyte/source-zendesk-support
1212
githubIssueLabel: source-zendesk-support
1313
icon: zendesk-support.svg
14-
license: MIT
14+
license: ELv2
1515
name: Zendesk Support
1616
registries:
1717
cloud:
-108 KB
Binary file not shown.

0 commit comments

Comments
 (0)