Skip to content

Commit c3edfb7

Browse files
Merge branch 'master' into leti/experiment-add-source-in-signup
* master: (69 commits) 🪟 🐛 Fix wrong geography dropdown type #19021 SAT: basic read on full catalog when `test_strictness_level == high` (#18937) Unhide DynamoDB destination (#18994) Fixed tests for destination connectors (#19007) 🐛 Source Facebook Marketing: handle FacebookBadObjectError (#18971) Edit multi-cloud docs (#18972) 🪟 🎉 Load credits consumption separate (#18986) Bmoric/extract source api (#18944) Migrating InvalidCursorException -> ConfigErrorException (#18995) 🪟 🎨 Fix banner link color (#18978) Handling configuration exceptions in IntegrationRunner (#18989) Add new workspace api endpoint (#18983) Add normalization to destination definition and actor definition table (#18300) Fix oauth controller (#18981) Fix migration dev center schema dump by run db-specific initialization script (#18984) fix master build failure (#18982) cleanup: delete debezium 1-4-2 module (#18733) Remove unused job persistence methods. (#18952) Hash filenames of extracted CSS (#18976) Fix typo in source code comment DataDaog ==> Datadog (#18911) ...
2 parents 163c411 + 7164e1c commit c3edfb7

File tree

498 files changed

+11731
-5741
lines changed

Some content is hidden

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

498 files changed

+11731
-5741
lines changed

.github/actions/build-branch/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
# if the *branch_version_tag* input param is not specified, then generate it as 'dev-<commit_hash>`
1919
#
2020
[[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "branch_version_tag=${{ inputs.branch_version_tag }}" >> $GITHUB_OUTPUT \
21-
|| { short_hash=$(git rev-parse --short HEAD); echo "branch_version_tag=dev-$short_hash" >> $GITHUB_OUTPUT ; }
21+
|| { short_hash=$(git rev-parse --short=7 HEAD); echo "branch_version_tag=dev-$short_hash" >> $GITHUB_OUTPUT ; }
2222
2323
- uses: actions/setup-java@v1
2424
with:

.github/comment_templates/connector_dependency_template.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<!--- this comment is for `report-connectors-dependency.yml` identification, do not remove -->
22

3+
## Affected Connector Report
4+
35
NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do the following as needed:
46
- Run integration tests
57
- Bump connector version
@@ -17,6 +19,8 @@ NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do
1719
| --- | :---: | :---: | :---: |
1820
{source_rows}
1921

22+
* See "Actionable Items" below for how to resolve warnings and errors.
23+
2024
</details>
2125

2226
<details {destination_open}>
@@ -30,6 +34,8 @@ NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do
3034
| --- | :---: | :---: | :---: |
3135
{destination_rows}
3236

37+
* See "Actionable Items" below for how to resolve warnings and errors.
38+
3339
</details>
3440

3541
{others}
@@ -38,7 +44,9 @@ NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do
3844

3945
<summary>
4046

41-
### Notes
47+
### Actionable Items
48+
49+
(click to expand)
4250

4351
</summary>
4452

.github/teams.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
team/growth:
2+
- "@letiescanciano"
3+
- "@arnaudjnn"

.github/workflows/deploy-oss-catalog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
paths:
8-
- airbyte-config/init/src/main/resources/seed
8+
- airbyte-config/init/src/main/resources/seed/**
99

1010
workflow_dispatch:
1111

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "Add labels to github PRs based on team"
2+
on: pull_request
3+
jobs:
4+
team-labeler:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: JulienKode/[email protected]
8+
with:
9+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/platform-workflow-labels.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,31 @@ jobs:
1111
permissions:
1212
issues: write
1313
steps:
14-
- name: Label Platform Workflow Issue
14+
- name: Label Issue
1515
uses: andymckay/[email protected]
1616
with:
1717
add-labels: "platform-workflow/requires-grooming"
1818
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Add Issue To Project
20+
uses: actions/[email protected]
21+
with:
22+
project-url: https://github.com/orgs/airbytehq/projects/25
23+
github-token: ${{ secrets.PLATFORM_WORKFLOW_PROJECT_AUTOMATION }}
1924
unlabel_issues:
2025
if: ${{ github.event.action == 'unlabeled' && github.event.label.name == 'team/platform-workflow' }}
2126
runs-on: ubuntu-latest
2227
permissions:
2328
issues: write
2429
steps:
25-
- name: Unlabel Platform Workflow Issue
30+
- name: Unlabel Issue
2631
uses: andymckay/[email protected]
2732
with:
2833
remove-labels: "platform-workflow/requires-grooming"
2934
repo-token: ${{ secrets.GITHUB_TOKEN }}
35+
- name: Remove Issue From Project
36+
uses: monry/[email protected]
37+
with:
38+
github-token: ${{ secrets.PLATFORM_WORKFLOW_PROJECT_AUTOMATION }}
39+
project-owner: airbytehq
40+
project-number: 25
41+
issue-id: ${{ github.event.issue.node_id }}

.github/workflows/publish-oss-for-cloud.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: |-
6363
set -x
6464
65-
commit_sha=$(git rev-parse --short HEAD)
65+
commit_sha=$(git rev-parse --short=7 HEAD)
6666
6767
# set dev_tag
6868
# AirbyteVersion.java allows versions that have a prefix of 'dev'
@@ -72,6 +72,7 @@ jobs:
7272
if $(git merge-base --is-ancestor "${commit_sha}" master); then
7373
echo "master_tag=${commit_sha}" >> $GITHUB_OUTPUT
7474
fi
75+
cat $GITHUB_OUTPUT || true # for the sake of investigation
7576
7677
oss-branch-build:
7778
name: "Gradle Build and Publish"

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
echo "comment=true" >> $GITHUB_OUTPUT
2626
fi
2727
- name: Find existing comment for connector dependencies
28-
if: steps.dependency_report.outputs.comment == 'true'
28+
# Always run this step because the action may need to
29+
# remove a comment created from a previous commit.
2930
uses: peter-evans/find-comment@v2
3031
id: find_comment
3132
with:
@@ -40,3 +41,14 @@ jobs:
4041
comment-id: ${{ steps.find_comment.outputs.comment-id }}
4142
edit-mode: "replace"
4243
body-file: "comment_body.md"
44+
- name: Remove deprecated report in PR
45+
if: steps.dependency_report.outputs.comment != 'true' && steps.find_comment.outputs.comment-id != ''
46+
uses: peter-evans/create-or-update-comment@v2
47+
with:
48+
issue-number: ${{ github.event.pull_request.number }}
49+
comment-id: ${{ steps.find_comment.outputs.comment-id }}
50+
edit-mode: "replace"
51+
body: |
52+
<!--- this comment is for `report-connectors-dependency.yml` identification, do not remove -->
53+
## Affected Connector Report
54+
The latest commit has removed all connector-related changes. There are no more dependent connectors for this PR.

airbyte-api/src/main/openapi/config.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,29 @@ paths:
168168
$ref: "#/components/responses/NotFoundResponse"
169169
"422":
170170
$ref: "#/components/responses/InvalidInputResponse"
171+
/v1/workspaces/get_by_connection_id:
172+
post:
173+
tags:
174+
- workspace
175+
summary: Find workspace by connection id
176+
operationId: getWorkspaceByConnectionId
177+
requestBody:
178+
content:
179+
application/json:
180+
schema:
181+
$ref: "#/components/schemas/ConnectionIdRequestBody"
182+
required: true
183+
responses:
184+
"200":
185+
description: Successful operation
186+
content:
187+
application/json:
188+
schema:
189+
$ref: "#/components/schemas/WorkspaceRead"
190+
"404":
191+
$ref: "#/components/responses/NotFoundResponse"
192+
"422":
193+
$ref: "#/components/responses/InvalidInputResponse"
171194
/v1/workspaces/update:
172195
post:
173196
tags:
@@ -2266,6 +2289,26 @@ paths:
22662289
application/json:
22672290
schema:
22682291
$ref: "#/components/schemas/InternalOperationResult"
2292+
/v1/attempt/save_stats:
2293+
post:
2294+
tags:
2295+
- attempt
2296+
- internal
2297+
summary: For worker to set sync stats of a running attempt.
2298+
operationId: saveStats
2299+
requestBody:
2300+
content:
2301+
application/json:
2302+
schema:
2303+
$ref: "#/components/schemas/SaveStatsRequestBody"
2304+
required: true
2305+
responses:
2306+
"200":
2307+
description: Successful Operation
2308+
content:
2309+
application/json:
2310+
schema:
2311+
$ref: "#/components/schemas/InternalOperationResult"
22692312

22702313
components:
22712314
securitySchemes:
@@ -4049,6 +4092,12 @@ components:
40494092
recordsCommitted:
40504093
type: integer
40514094
format: int64
4095+
estimatedRecords:
4096+
type: integer
4097+
format: int64
4098+
estimatedBytes:
4099+
type: integer
4100+
format: int64
40524101
AttemptStreamStats:
40534102
type: object
40544103
required:
@@ -4892,6 +4941,23 @@ components:
48924941
processingTaskQueue:
48934942
type: string
48944943
default: ""
4944+
SaveStatsRequestBody:
4945+
type: object
4946+
required:
4947+
- jobId
4948+
- attemptNumber
4949+
- stats
4950+
properties:
4951+
jobId:
4952+
$ref: "#/components/schemas/JobId"
4953+
attemptNumber:
4954+
$ref: "#/components/schemas/AttemptNumber"
4955+
stats:
4956+
$ref: "#/components/schemas/AttemptStats"
4957+
streamStats:
4958+
type: array
4959+
items:
4960+
$ref: "#/components/schemas/AttemptStreamStats"
48954961
InternalOperationResult:
48964962
type: object
48974963
required:

airbyte-base-java-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKDIR /app
66

77
RUN yum install -y tar
88

9-
# Add the DataDaog Java APM agent
9+
# Add the Datadog Java APM agent
1010
ADD https://dtdg.co/latest-java-tracer dd-java-agent.jar
1111

1212
# Add the OpenTelemetry Java APM agent

airbyte-bootloader/src/main/java/io/airbyte/bootloader/BootloaderApp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ public BootloaderApp(final Configs configs,
148148
public void load() throws Exception {
149149
LOGGER.info("Initializing databases...");
150150
DatabaseCheckFactory.createConfigsDatabaseInitializer(configsDslContext,
151-
configs.getConfigsDatabaseInitializationTimeoutMs(), MoreResources.readResource(DatabaseConstants.CONFIGS_SCHEMA_PATH)).initialize();
151+
configs.getConfigsDatabaseInitializationTimeoutMs(), MoreResources.readResource(DatabaseConstants.CONFIGS_INITIAL_SCHEMA_PATH)).initialize();
152152

153153
DatabaseCheckFactory.createJobsDatabaseInitializer(jobsDslContext,
154-
configs.getJobsDatabaseInitializationTimeoutMs(), MoreResources.readResource(DatabaseConstants.JOBS_SCHEMA_PATH)).initialize();
154+
configs.getJobsDatabaseInitializationTimeoutMs(), MoreResources.readResource(DatabaseConstants.JOBS_INITIAL_SCHEMA_PATH)).initialize();
155155
LOGGER.info("Databases initialized.");
156156

157157
LOGGER.info("Setting up config database and default workspace...");

airbyte-bootloader/src/test/java/io/airbyte/bootloader/BootloaderAppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void testBootloaderAppBlankDb() throws Exception {
141141
val configsMigrator = new ConfigsDatabaseMigrator(configDatabase, configsFlyway);
142142
// this line should change with every new migration
143143
// to show that you meant to make a new migration to the prod database
144-
assertEquals("0.40.18.001", configsMigrator.getLatestMigration().getVersion().getVersion());
144+
assertEquals("0.40.18.002", configsMigrator.getLatestMigration().getVersion().getVersion());
145145

146146
val jobsPersistence = new DefaultJobPersistence(jobDatabase);
147147
assertEquals(VERSION_0330_ALPHA, jobsPersistence.getVersion().get());

airbyte-cdk/python/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 0.5.4
4+
Low-code: Get response.json in a safe way
5+
6+
## 0.5.3
7+
Low-code: Replace EmptySchemaLoader with DefaultSchemaLoader to retain backwards compatibility
8+
Low-code: Evaluate backoff strategies at runtime
9+
10+
## 0.5.2
11+
Low-code: Allow for read even when schemas are not defined for a connector yet
12+
313
## 0.4.2
414
Low-code: Fix off by one error with the stream slicers
515

airbyte-cdk/python/airbyte_cdk/sources/declarative/declarative_stream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from airbyte_cdk.models import SyncMode
99
from airbyte_cdk.sources.declarative.retrievers.retriever import Retriever
10-
from airbyte_cdk.sources.declarative.schema.json_schema import JsonSchema
10+
from airbyte_cdk.sources.declarative.schema import DefaultSchemaLoader
1111
from airbyte_cdk.sources.declarative.schema.schema_loader import SchemaLoader
1212
from airbyte_cdk.sources.declarative.transformations import RecordTransformation
1313
from airbyte_cdk.sources.declarative.types import Config, StreamSlice
@@ -48,7 +48,7 @@ class DeclarativeStream(Stream, JsonSchemaMixin):
4848
def __post_init__(self, options: Mapping[str, Any]):
4949
self.stream_cursor_field = self.stream_cursor_field or []
5050
self.transformations = self.transformations or []
51-
self._schema_loader = self.schema_loader if self.schema_loader else JsonSchema(config=self.config, options=options)
51+
self._schema_loader = self.schema_loader if self.schema_loader else DefaultSchemaLoader(config=self.config, options=options)
5252

5353
@property
5454
def primary_key(self) -> Optional[Union[str, List[str], List[List[str]]]]:

airbyte-cdk/python/airbyte_cdk/sources/declarative/decoders/json_decoder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ class JsonDecoder(Decoder, JsonSchemaMixin):
1919
options: InitVar[Mapping[str, Any]]
2020

2121
def decode(self, response: requests.Response) -> Union[Mapping[str, Any], List]:
22-
return response.json() or {}
22+
try:
23+
return response.json()
24+
except requests.exceptions.JSONDecodeError:
25+
return {}

airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.offset_increment import OffsetIncrement
3333
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.page_increment import PageIncrement
3434
from airbyte_cdk.sources.declarative.retrievers.simple_retriever import SimpleRetriever
35-
from airbyte_cdk.sources.declarative.schema.json_schema import JsonSchema
35+
from airbyte_cdk.sources.declarative.schema.json_file_schema_loader import JsonFileSchemaLoader
3636
from airbyte_cdk.sources.declarative.stream_slicers.cartesian_product_stream_slicer import CartesianProductStreamSlicer
3737
from airbyte_cdk.sources.declarative.stream_slicers.datetime_stream_slicer import DatetimeStreamSlicer
3838
from airbyte_cdk.sources.declarative.stream_slicers.list_stream_slicer import ListStreamSlicer
@@ -62,7 +62,8 @@
6262
"HttpRequester": HttpRequester,
6363
"InterpolatedBoolean": InterpolatedBoolean,
6464
"InterpolatedString": InterpolatedString,
65-
"JsonSchema": JsonSchema,
65+
"JsonSchema": JsonFileSchemaLoader, # todo remove after hacktoberfest and update connectors to use JsonFileSchemaLoader
66+
"JsonFileSchemaLoader": JsonFileSchemaLoader,
6667
"ListStreamSlicer": ListStreamSlicer,
6768
"MinMaxDatetime": MinMaxDatetime,
6869
"NoAuth": NoAuth,

airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/default_implementation_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from airbyte_cdk.sources.declarative.requesters.requester import Requester
3131
from airbyte_cdk.sources.declarative.retrievers.retriever import Retriever
3232
from airbyte_cdk.sources.declarative.retrievers.simple_retriever import SimpleRetriever
33-
from airbyte_cdk.sources.declarative.schema.json_schema import JsonSchema
33+
from airbyte_cdk.sources.declarative.schema import DefaultSchemaLoader
3434
from airbyte_cdk.sources.declarative.schema.schema_loader import SchemaLoader
3535
from airbyte_cdk.sources.declarative.stream_slicers.single_slice import SingleSlice
3636
from airbyte_cdk.sources.declarative.stream_slicers.stream_slicer import StreamSlicer
@@ -58,7 +58,7 @@
5858
RequestOptionsProvider: InterpolatedRequestOptionsProvider,
5959
Requester: HttpRequester,
6060
Retriever: SimpleRetriever,
61-
SchemaLoader: JsonSchema,
61+
SchemaLoader: DefaultSchemaLoader,
6262
Stream: DeclarativeStream,
6363
StreamSlicer: SingleSlice,
6464
}

airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/factory.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,17 @@ def _create_subcomponent(self, key, definition, kwargs, config, parent_class, in
229229
options = kwargs.get(OPTIONS_STR, {})
230230
try:
231231
# enums can't accept options
232-
if issubclass(expected_type, enum.Enum):
232+
if issubclass(expected_type, enum.Enum) or self.is_primitive(definition):
233233
return expected_type(definition)
234234
else:
235235
return expected_type(definition, options=options)
236236
except Exception as e:
237237
raise Exception(f"failed to instantiate type {expected_type}. {e}")
238238
return definition
239239

240+
def is_primitive(self, obj):
241+
return isinstance(obj, (int, float, bool))
242+
240243
@staticmethod
241244
def is_object_definition_with_class_name(definition):
242245
return isinstance(definition, dict) and "class_name" in definition

0 commit comments

Comments
 (0)