Skip to content

Commit 943ea41

Browse files
committed
Merge remote-tracking branch 'origin/main' into aj/feat/unprivileged-discover-for-declarative-static-schemas
2 parents 4066c75 + d458e8f commit 943ea41

File tree

216 files changed

+14044
-1532
lines changed

Some content is hidden

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

216 files changed

+14044
-1532
lines changed

.coveragerc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ omit =
99

1010
# omit as unimplemented
1111
airbyte_cdk/base_python/cdk/streams/auth/jwt.py
12+
13+
# omit temporary files and test files
14+
/tmp/tmp*.py
15+
unit_tests/*
16+
17+
[paths]
18+
# Reconcile file paths
19+
source =
20+
./
21+
/tmp/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# When a PR is has the auto-merge feature enabled or disabled, this workflow adds or updates
2+
# warning text at the bottom of the PR description.
3+
4+
name: "Add Auto-Merge Notification Text"
5+
on:
6+
pull_request:
7+
types: [auto_merge_enabled, auto_merge_disabled]
8+
9+
jobs:
10+
update-description:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
steps:
15+
- name: Add Auto-Merge Notice
16+
if: github.event.action == 'auto_merge_enabled'
17+
uses: bcgov/[email protected]
18+
with:
19+
add_markdown: |
20+
> [!IMPORTANT]
21+
> **Auto-merge enabled.**
22+
>
23+
> _This PR is set to merge automatically when all requirements are met._
24+
25+
- name: Remove Auto-Merge Notice
26+
if: github.event.action == 'auto_merge_disabled'
27+
uses: bcgov/[email protected]
28+
with:
29+
add_markdown: |
30+
> [!NOTE]
31+
> **Auto-merge may have been disabled. Please check the PR status to confirm.**

.github/workflows/connector-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ concurrency:
2525
jobs:
2626
cdk_changes:
2727
name: Get Changes
28-
runs-on: ubuntu-22.04
28+
runs-on: ubuntu-24.04
2929
permissions:
3030
statuses: write
3131
pull-requests: read
@@ -62,7 +62,7 @@ jobs:
6262
# Forked PRs are handled by the community_ci.yml workflow
6363
# If the condition is not met the job will be skipped (it will not fail)
6464
# runs-on: connector-test-large
65-
runs-on: ubuntu-22.04
65+
runs-on: ubuntu-24.04
6666
timeout-minutes: 360 # 6 hours
6767
strategy:
6868
fail-fast: false
@@ -75,11 +75,11 @@ jobs:
7575
# Chargebee is being flaky:
7676
# - connector: source-chargebee
7777
# cdk_extra: n/a
78-
# These two are behind in CDK updates and can't be used as tests until they are updated:
79-
# - connector: source-s3
80-
# cdk_extra: file-based
78+
# This one is behind in CDK updates and can't be used as tests until it is updated:
8179
# - connector: destination-pinecone
8280
# cdk_extra: vector-db-based
81+
- connector: source-google-drive
82+
cdk_extra: file-based
8383
- connector: destination-motherduck
8484
cdk_extra: sql
8585
# ZenDesk currently failing (as of 2024-12-02)
@@ -96,7 +96,7 @@ jobs:
9696
name: "Check: '${{matrix.connector}}' (skip=${{needs.cdk_changes.outputs['src'] == 'false' || needs.cdk_changes.outputs[matrix.cdk_extra] == 'false'}})"
9797
permissions:
9898
checks: write
99-
contents: write # Required for creating commit statuses
99+
contents: write # Required for creating commit statuses
100100
pull-requests: read
101101
steps:
102102
- name: Abort if extra not changed (${{matrix.cdk_extra}})
@@ -153,7 +153,7 @@ jobs:
153153
POETRY_DYNAMIC_VERSIONING_BYPASS: "0.0.0"
154154
run: |
155155
cd airbyte
156-
make tools.airbyte-ci-dev.install
156+
make tools.airbyte-ci.install
157157
airbyte-ci \
158158
--ci-report-bucket-name=airbyte-ci-reports-multi \
159159
connectors \

.github/workflows/docker-build-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
docker-build-check:
10-
name: SDM Docker Image Build # Renamed job to be more descriptive
10+
name: SDM Docker Image Build # Renamed job to be more descriptive
1111
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout code

.github/workflows/poe-command.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: On-Demand Poe Task
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
comment-id:
7+
description: "Optional comment-id of the slash command. Ignore if not applicable."
8+
required: false
9+
pr:
10+
description: "PR Number"
11+
required: false
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
run-poe-command:
19+
env:
20+
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Run Poe Slash Command Processor
24+
uses: aaronsteers/poe-command-processor@v1
25+
with:
26+
pr: ${{ github.event.inputs.pr }}
27+
comment-id: ${{ github.event.inputs.comment-id }}
28+
github-token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}

.github/workflows/pypi_publish.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Note: We may want to rename this file at some point. However, if we rename the workflow file name,
66
# we have to also update the Trusted Publisher settings on PyPI.
77

8-
name: Packaging and Publishing
8+
name: CDK Publish
99

1010
on:
1111
push:
@@ -14,7 +14,12 @@ on:
1414
workflow_dispatch:
1515
inputs:
1616
version:
17-
description: "Note that this workflow is intended for prereleases. For public-facing stable releases, please use the GitHub Releases workflow instead: https://github.com/airbytehq/airbyte-python-cdk/blob/main/docs/RELEASES.md. If running this workflow from main or from a dev branch, please enter the desired version number here, for instance 1.2.3dev0 or 1.2.3rc1."
17+
description: >
18+
Note that this workflow is intended for prereleases. For public-facing stable releases,
19+
please use the GitHub Releases workflow instead:
20+
https://github.com/airbytehq/airbyte-python-cdk/blob/main/docs/RELEASES.md.
21+
For prereleases, please leave the version blank to use the detected version. Alternatively,
22+
you can override the dynamic versioning for special use cases.
1823
required: false
1924
publish_to_pypi:
2025
description: "Publish to PyPI. If true, the workflow will publish to PyPI."
@@ -37,17 +42,29 @@ jobs:
3742
name: Build Python Package
3843
runs-on: ubuntu-24.04
3944
steps:
40-
- name: Detect Release Tag Version
45+
- name: Checkout CDK Repo
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
50+
- name: Detect Prerelease Version using Dunamai
51+
uses: mtkennerly/dunamai-action@v1
52+
with:
53+
args: --format "{base}.post{distance}.dev${{ github.run_id }}"
54+
env-var: DETECTED_VERSION
55+
56+
- name: Detect Release Tag Version from git ref ('${{ github.ref_name }}')
4157
if: startsWith(github.ref, 'refs/tags/v')
4258
run: |
59+
echo "Overriding Dunamai detected version: '${{ env.DETECTED_VERSION || 'none' }}'"
60+
# Extract the version from the git ref
4361
DETECTED_VERSION=${{ github.ref_name }}
44-
echo "Version ref set to '${DETECTED_VERSION}'"
4562
# Remove the 'v' prefix if it exists
4663
DETECTED_VERSION="${DETECTED_VERSION#v}"
47-
echo "Setting version to '$DETECTED_VERSION'"
64+
echo "Setting detected version to '$DETECTED_VERSION'"
4865
echo "DETECTED_VERSION=${DETECTED_VERSION}" >> $GITHUB_ENV
4966
50-
- name: Validate and set VERSION from git ref ('${{ github.ref_name }}') and input (${{ github.event.inputs.version || 'none' }})
67+
- name: Validate and set VERSION (detected='${{ env.DETECTED_VERSION }}', input='${{ github.event.inputs.version || 'none' }}')
5168
id: set_version
5269
run: |
5370
INPUT_VERSION=${{ github.event.inputs.version }}
@@ -62,8 +79,8 @@ jobs:
6279
INPUT_VERSION="${INPUT_VERSION#v}"
6380
# Fail if detected version is non-empty and different from the input version
6481
if [ -n "${DETECTED_VERSION:-}" ] && [ -n "${INPUT_VERSION:-}" ] && [ "${DETECTED_VERSION}" != "${INPUT_VERSION}" ]; then
65-
echo "Error: Version input '${INPUT_VERSION}' does not match detected version '${DETECTED_VERSION}'."
66-
exit 1
82+
echo "Warning: Version input '${INPUT_VERSION}' does not match detected version '${DETECTED_VERSION}'."
83+
echo "Using input version '${INPUT_VERSION}' instead."
6784
fi
6885
# Set the version to the input version if non-empty, otherwise the detected version
6986
VERSION="${INPUT_VERSION:-$DETECTED_VERSION}"
@@ -84,10 +101,6 @@ jobs:
84101
echo "IS_PRERELEASE=true" >> $GITHUB_OUTPUT
85102
fi
86103
87-
- uses: actions/checkout@v4
88-
with:
89-
fetch-depth: 0
90-
91104
- uses: hynek/build-and-inspect-python-package@v2
92105
env:
93106
# Pass in the evaluated version from the previous step

.github/workflows/python_dependency_analysis.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ jobs:
1919
name: Dependency Analysis with Deptry
2020
runs-on: ubuntu-24.04
2121
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
- name: Set up Python
25-
uses: actions/setup-python@v5
26-
with:
27-
python-version: '3.10'
28-
- name: Set up Poetry
29-
uses: Gr1N/setup-poetry@v9
30-
with:
31-
poetry-version: "2.0.1"
32-
- name: Install dependencies
33-
run: poetry install --all-extras
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.10"
28+
- name: Set up Poetry
29+
uses: Gr1N/setup-poetry@v9
30+
with:
31+
poetry-version: "2.0.1"
32+
- name: Install dependencies
33+
run: poetry install --all-extras
3434

35-
# Job-specific step(s):
36-
- name: Run Deptry
37-
run: |
38-
poetry run deptry .
35+
# Job-specific step(s):
36+
- name: Run Deptry
37+
run: |
38+
poetry run deptry .

.github/workflows/semantic_pr_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
Build
4040
tests
4141
Tests
42-
42+
4343
- name: Check for "do not merge" in PR title
4444
if: ${{ github.event.pull_request.draft == false }}
4545
uses: actions/github-script@v6

.github/workflows/slash_command_dispatch.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66

77
jobs:
88
slashCommandDispatch:
9-
# Only allow slash commands on pull request (not on issues)
10-
if: ${{ github.event.issue.pull_request }}
119
runs-on: ubuntu-24.04
1210
steps:
1311
- name: Slash Command Dispatch
@@ -19,17 +17,25 @@ jobs:
1917
repository: ${{ github.repository }}
2018
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
2119
dispatch-type: workflow
22-
issue-type: pull-request
20+
issue-type: both
21+
22+
# Only run for users with 'write' permission on the main repository
23+
permission: write
24+
2325
commands: |
2426
autofix
2527
test
2628
poetry-lock
29+
poe
30+
31+
# Notes regarding static-args:
32+
# - Slash commands can be invoked from both issues and comments.
33+
# - If the slash command is invoked from an issue, we intentionally pass 'null' as the PR number.
34+
# - Comment ID will always be sent, and this is sufficient to post back status updates to the originating comment.
2735
static-args: |
28-
pr=${{ github.event.issue.number }}
36+
pr=${{ github.event.issue.pull_request != null && github.event.issue.number || '' }}
2937
comment-id=${{ github.event.comment.id }}
3038
31-
# Only run for users with 'write' permission on the main repository
32-
permission: write
3339
3440
- name: Edit comment with error message
3541
if: steps.dispatch.outputs.error-message
@@ -51,7 +57,7 @@ jobs:
5157
- \`/test\` - Runs the test suite
5258
- \`/poetry-lock\` - Re-locks dependencies and updates the poetry.lock file
5359
- \`/help\` - Shows this help message"
54-
60+
5561
if [[ "${{ github.event.comment.body }}" == "/help" ]]; then
5662
echo "body=$HELP_TEXT" >> $GITHUB_OUTPUT
5763
else

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ dist
1515
.idea
1616
.vscode
1717
**/__pycache__
18+
.tmp

0 commit comments

Comments
 (0)