Skip to content

Commit 5cb47f8

Browse files
authored
Merge branch 'master' into alex/support_3.8
2 parents 4058fce + aec222f commit 5cb47f8

File tree

201 files changed

+4749
-4640
lines changed

Some content is hidden

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

201 files changed

+4749
-4640
lines changed

.editorconfig

-10
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,3 @@ ij_yaml_sequence_on_new_line = false
137137
ij_yaml_space_before_colon = false
138138
ij_yaml_spaces_within_braces = true
139139
ij_yaml_spaces_within_brackets = true
140-
141-
# don't interfere with prettier default formatting for webapp
142-
# see https://prettier.io/docs/en/api.html#prettierresolveconfigfilepath--options
143-
# for options that we're disabling
144-
[/airbyte-webapp/**]
145-
end_of_line = unset
146-
indent_style = unset
147-
indent_size = unset
148-
tab_width = unset
149-
max_line_length = unset

.github/labeler.yml

-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ area/platform:
1313
- charts/*
1414
- charts/**/*
1515

16-
area/frontend:
17-
- airbyte-webapp/*
18-
- airbyte-webapp/**/*
19-
- airbyte-webapp-e2e-tests/*
20-
- airbyte-webapp-e2e-tests/**/*
21-
2216
area/api:
2317
- airbyte-api/*
2418
- airbyte-api/**/*

.github/workflows/gradle.yml

+64-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
runs-on: ubuntu-latest
5151
outputs:
5252
build: ${{ steps.filter.outputs.build }}
53+
cdk: ${{ steps.filter.outputs.cdk }}
5354
cli: ${{ steps.filter.outputs.cli }}
5455
connectors: ${{ steps.filter.outputs.connectors }}
5556
db: ${{ steps.filter.outputs.db }}
@@ -69,11 +70,12 @@ jobs:
6970
- '*.gradle'
7071
- 'deps.toml'
7172
- 'airbyte-config/**'
73+
cdk:
74+
- 'airbyte-cdk/**'
7275
cli:
7376
- 'airbyte-api/**'
7477
- 'octavia-cli/**'
7578
connectors:
76-
- 'airbyte-cdk/**'
7779
- 'airbyte-integrations/**'
7880
- 'airbyte-connector-test-harnesses/acceptance-test-harness/**'
7981
db:
@@ -156,6 +158,67 @@ jobs:
156158
attempt_limit: 3
157159
attempt_delay: 5000 # in ms
158160

161+
cdk-build:
162+
needs: changes
163+
runs-on: ubuntu-latest
164+
# Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master.
165+
if: needs.changes.outputs.cdk == 'true' || needs.changes.outputs.build == 'true' || (always() && github.ref == 'refs/heads/master')
166+
name: "Airbyte CDK: Build"
167+
timeout-minutes: 90
168+
steps:
169+
- name: Checkout Airbyte
170+
uses: actions/checkout@v3
171+
172+
- name: Cache Build Artifacts
173+
uses: ./.github/actions/cache-build-artifacts
174+
with:
175+
cache-key: ${{ secrets.CACHE_VERSION }}
176+
177+
- uses: actions/setup-java@v3
178+
with:
179+
distribution: "zulu"
180+
java-version: "17"
181+
182+
- uses: actions/setup-python@v4
183+
with:
184+
python-version: "3.9"
185+
186+
- name: Set up CI Gradle Properties
187+
run: |
188+
mkdir -p ~/.gradle/
189+
cat > ~/.gradle/gradle.properties <<EOF
190+
org.gradle.jvmargs=-Xmx8g -Xss4m \
191+
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
192+
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
193+
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
194+
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
195+
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
196+
org.gradle.workers.max=8
197+
org.gradle.vfs.watch=false
198+
EOF
199+
200+
- name: Format
201+
uses: Wandalen/wretry.action@master
202+
with:
203+
command: SUB_BUILD=CDK ./gradlew format --scan --info --stacktrace
204+
attempt_limit: 3
205+
attempt_delay: 5000 # in ms
206+
207+
- name: Commit Formatting Changes
208+
uses: stefanzweifel/git-auto-commit-action@v4
209+
with:
210+
commit_message: Automated Commit - Formatting Changes
211+
commit_user_name: Octavia Squidington III
212+
commit_user_email: [email protected]
213+
214+
- name: Build
215+
uses: Wandalen/wretry.action@master
216+
with:
217+
command: SUB_BUILD=CDK ./gradlew build --scan
218+
attempt_limit: 3
219+
attempt_delay: 5000 # in ms
220+
221+
159222
# Connectors Base
160223
# In case of self-hosted EC2 errors, remove this block.
161224
start-connectors-base-build-runner:

.github/workflows/publish-cdk-command-manually.yml

+126-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,35 @@ concurrency:
3131
cancel-in-progress: false
3232

3333
jobs:
34+
# We are using these runners because they are the same as the one for `publish-command.yml`
35+
# One problem we had using `ubuntu-latest` for example is that the user is not root and some commands would fail in
36+
# `manage.sh` (specifically `apt-get`)
37+
start-publish-docker-image-runner-0:
38+
name: Start Build EC2 Runner 0
39+
runs-on: ubuntu-latest
40+
outputs:
41+
label: ${{ steps.start-ec2-runner.outputs.label }}
42+
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
43+
steps:
44+
- name: Checkout Airbyte
45+
uses: actions/checkout@v3
46+
with:
47+
repository: airbytehq/airbyte
48+
ref: master
49+
- name: Check PAT rate limits
50+
run: |
51+
./tools/bin/find_non_rate_limited_PAT \
52+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
53+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
54+
- name: Start AWS Runner
55+
id: start-ec2-runner
56+
uses: ./.github/actions/start-aws-runner
57+
with:
58+
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
59+
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
60+
github-token: ${{ env.PAT }}
61+
label: ${{ github.run_id }}-publisher
62+
3463
bump-version:
3564
if: github.event.inputs.release-type != 'none'
3665
runs-on: ubuntu-latest
@@ -54,7 +83,7 @@ jobs:
5483
- name: Commit and Push Changes
5584
uses: stefanzweifel/git-auto-commit-action@v4
5685
with:
57-
file_pattern: airbyte-cdk/python/setup.py airbyte-cdk/python/.bumpversion.cfg airbyte-cdk/python/CHANGELOG.md
86+
file_pattern: airbyte-cdk/python/setup.py airbyte-cdk/python/.bumpversion.cfg airbyte-cdk/python/CHANGELOG.md airbyte-cdk/python/Dockerfile
5887
commit_message: 🤖 Bump ${{ github.event.inputs.release-type }} version of Airbyte CDK
5988
commit_user_name: Octavia Squidington III
6089
commit_user_email: [email protected]
@@ -104,7 +133,7 @@ jobs:
104133
repository: ${{ github.event.inputs.repo }}
105134
ref: ${{ github.event.inputs.gitref }}
106135
- name: Build CDK Package
107-
run: SUB_BUILD=CONNECTORS_BASE ./gradlew --no-daemon --no-build-cache :airbyte-cdk:python:build
136+
run: SUB_BUILD=CDK ./gradlew --no-daemon --no-build-cache :airbyte-cdk:python:build
108137
- name: Post failure to Slack channel dev-connectors-extensibility
109138
if: ${{ failure() }}
110139
uses: slackapi/[email protected]
@@ -165,6 +194,71 @@ jobs:
165194
env:
166195
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
167196
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
197+
- name: Post failure to Slack channel dev-connectors-extensibility
198+
if: ${{ failure() }}
199+
uses: slackapi/[email protected]
200+
continue-on-error: true
201+
with:
202+
channel-id: C04J1M66D8B
203+
payload: |
204+
{
205+
"text": "Error during `publish-cdk` while publishing Airbyte CDK!",
206+
"blocks": [
207+
{
208+
"type": "section",
209+
"text": {
210+
"type": "mrkdwn",
211+
"text": "Error while publishing Airbyte CDK!"
212+
}
213+
},
214+
{
215+
"type": "section",
216+
"text": {
217+
"type": "mrkdwn",
218+
"text": "See details on <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|GitHub>\n"
219+
}
220+
}
221+
]
222+
}
223+
env:
224+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
225+
226+
227+
publish-docker-image:
228+
timeout-minutes: 240
229+
needs:
230+
- start-publish-docker-image-runner-0
231+
- publish-cdk
232+
runs-on: runner-pool-${{ github.run_id }}
233+
steps:
234+
- name: Checkout Airbyte
235+
uses: actions/checkout@v3
236+
with:
237+
repository: airbytehq/airbyte
238+
ref: master
239+
- name: Install Java
240+
uses: actions/setup-java@v3
241+
with:
242+
distribution: "zulu"
243+
java-version: "17"
244+
- name: Install Python
245+
uses: actions/setup-python@v4
246+
with:
247+
python-version: "3.9"
248+
- name: Publish source-declarative-manifest
249+
id: publish
250+
env:
251+
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
252+
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
253+
# Oracle expects this variable to be set. Although usually present, this is not set by default on Github virtual runners.
254+
TZ: UTC
255+
uses: Wandalen/wretry.action@master
256+
with:
257+
command: |
258+
docker login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD}
259+
./tools/integrations/manage.sh publish airbyte-cdk/python false
260+
attempt_limit: 3
261+
attempt_delay: 5000 in # ms
168262
- name: Post success to Slack channel dev-connectors-extensibility
169263
uses: slackapi/[email protected]
170264
continue-on-error: true
@@ -220,3 +314,33 @@ jobs:
220314
}
221315
env:
222316
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
317+
318+
# In case of self-hosted EC2 errors, remove this block.
319+
stop-publish-docker-image-runner-0:
320+
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
321+
name: Stop Build EC2 Runner
322+
needs:
323+
- start-publish-docker-image-runner-0 # required to get output from the start-runner job
324+
- publish-docker-image # required to wait when the main job is done
325+
runs-on: ubuntu-latest
326+
steps:
327+
- name: Configure AWS credentials
328+
uses: aws-actions/configure-aws-credentials@v1
329+
with:
330+
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
331+
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
332+
aws-region: us-east-2
333+
- name: Checkout Airbyte
334+
uses: actions/checkout@v3
335+
- name: Check PAT rate limits
336+
run: |
337+
./tools/bin/find_non_rate_limited_PAT \
338+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
339+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
340+
- name: Stop EC2 runner
341+
uses: airbytehq/[email protected]
342+
with:
343+
mode: stop
344+
github-token: ${{ env.PAT }}
345+
label: ${{ needs.start-publish-docker-image-runner-0.outputs.label }}
346+
ec2-instance-id: ${{ needs.start-publish-docker-image-runner-0.outputs.ec2-instance-id }}

.github/workflows/test-command.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ on:
2323
description: "Set a specific connector acceptance test version to use. Enter 'dev' to test, build and use a local version of Connector Acceptance Test."
2424
required: false
2525
default: "latest"
26+
local_cdk:
27+
description: "Run Connector Acceptance Tests against the CDK version on the current branch."
28+
required: false
2629
jobs:
2730
uuid:
2831
name: "Custom UUID of workflow run"
@@ -119,7 +122,7 @@ jobs:
119122
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
120123
uses: Wandalen/wretry.action@master
121124
with:
122-
command: ./tools/bin/ci_integration_test.sh ${{ github.event.inputs.connector }}
125+
command: ./tools/bin/ci_integration_test.sh ${{ github.event.inputs.connector }} ${{ github.event.inputs.local_cdk }}
123126
attempt_limit: 3
124127
attempt_delay: 10000 # in ms
125128
- name: Update Integration Test Credentials after test run for ${{ github.event.inputs.connector }}

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ crash.log
6363
resources/examples/airflow/logs/*
6464
!resources/examples/airflow/logs/.gitkeep
6565

66-
# Cloud Demo
67-
!airbyte-webapp/src/packages/cloud/data
68-
6966
# Summary.md keeps getting added and we just don't like it
7067
docs/SUMMARY.md
7168

.vscode/frontend.code-workspace

-71
This file was deleted.

0 commit comments

Comments
 (0)