Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: airbytehq/airbyte-python-cdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c5cd67da533965cae831b9491afd7c4bbfc7c94b
Choose a base ref
..
head repository: airbytehq/airbyte-python-cdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8a0e2a6c25395b61edfcf528d373c6a62af9968e
Choose a head ref
Showing 408 changed files with 20,982 additions and 7,173 deletions.
26 changes: 21 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -5,13 +5,29 @@

version: 2
updates:
- package-ecosystem: "pip"
- package-ecosystem: pip
directory: "/" # Location of package manifests
commit-message:
prefix: "chore(deps): "
schedule:
interval: "weekly"
interval: daily
labels:
- chore
open-pull-requests-limit: 8 # default is 5

- package-ecosystem: "github-actions"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
- package-ecosystem: github-actions
open-pull-requests-limit: 5 # default is 5
directory: "/"
commit-message:
prefix: "ci(deps): "
schedule:
interval: "weekly"
interval: daily
labels:
- ci
groups:
# allow combining github-actions updates into a single PR
minor-and-patch:
applies-to: version-updates
update-types:
- patch
- minor
60 changes: 37 additions & 23 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,63 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: 'New Features ✨'
- title: "New Features ✨"
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes 🐛'
- "feature"
- "enhancement"
- title: "Bug Fixes 🐛"
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: 'Under the Hood ⚙️'
- "fix"
- "bugfix"
- "bug"
- title: "Under the Hood ⚙️"
labels:
- 'chore'
- 'ci'
- 'refactor'
- title: 'Documentation 📖'
label: 'docs'
change-template: '- $SUBJECT (#$NUMBER) - **_Thanks, @$AUTHOR_**!'
- "chore"
- "ci"
- "refactor"
- title: "Documentation 📖"
label: "docs"
change-template: "- $TITLE (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
- "major"
minor:
labels:
- 'minor'
- "minor"
patch:
labels:
- 'patch'
- "patch"
default: patch
template: |
## Changes
$CHANGES
autolabeler:
- label: 'chore'
- label: "chore"
title:
- '/^chore(\(.*\))?\:/i'
- label: 'ci'
- label: "ci"
title:
- '/^ci(\(.*\))?\:/i'
- label: 'bug'
- label: "bug"
title:
- '/^fix(\(.*\))?\:/i'
- label: 'enhancement'
- label: "enhancement"
title:
- '/^feat(\(.*\))?/i'
- label: "docs"
title:
- '/^docs(\(.*\))?\:/i'
- label: "security"
title:
- '/^security(\(.*\))?\:/i'
- '/^fix(\(security\))?\:/i'
- label: "dependencies"
title:
- '/^chore\(deps\)\:/i'
- '/^build\(deps\)\:/i'
- label: "breaking"
title:
- '/!:\s*$/i'
166 changes: 166 additions & 0 deletions .github/workflows/autofix-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: On-Demand AutoFix

on:
workflow_dispatch:
inputs:
pr:
description: "PR Number"
type: string
required: true
comment-id:
description: "Comment ID (Optional)"
type: string
required: false

jobs:
# This is copied from the `python_pytest.yml` file.
# Only the first two steps of the job are different, and they check out the PR's branch.
pr-fix-on-demand:
name: On-Demand PR Fix
# Don't run on forks. Run on pushes to main, and on PRs that are not from forks.
strategy:
matrix:
python-version: ["3.10"]
os: [Ubuntu]
fail-fast: false

runs-on: "${{ matrix.os }}-latest"
steps:
# Custom steps to fetch the PR and checkout the code:
- name: Checkout Airbyte
uses: actions/checkout@v4
with:
# Important that this is set so that CI checks are triggered again
# Without this we would be forever waiting on required checks to pass
token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}

- name: Checkout PR (${{ github.event.inputs.pr }})
uses: dawidd6/action-checkout-pr@v1
with:
pr: ${{ github.event.inputs.pr }}

- name: Get PR info
id: pr-info
run: |
PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr }})
echo "repo=$(echo "$PR_JSON" | jq -r .head.repo.full_name)" >> $GITHUB_OUTPUT
echo "branch=$(echo "$PR_JSON" | jq -r .head.ref)" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash

- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT

- name: Append comment with job run link
id: first-comment-action
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ github.event.inputs.comment-id }}
issue-number: ${{ github.event.inputs.pr }}
body: |
> **Auto-Fix Job Info**
>
> This job attempts to auto-fix any linting or formating issues. If any fixes are made,
> those changes will be automatically committed and pushed back to the PR.
>
> Note: This job can only be run by maintainers. On PRs from forks, this command requires
> that the PR author has enabled the `Allow edits from maintainers` option.
> PR auto-fix job started... [Check job output.][1]
[1]: ${{ steps.vars.outputs.run-url }}
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: poetry install --all-extras

# Fix any lint or format issues

- name: Auto-Fix Ruff Lint Issues
run: poetry run ruff check --fix . || true
- name: Auto-Fix Ruff Format Issues
run: poetry run ruff format . || true

# Check for changes in git

- name: Check for changes
id: git-diff
run: |
git diff --quiet && echo "No changes to commit" || echo "changes=true" >> $GITHUB_OUTPUT
shell: bash

# Commit changes (if any)

- name: Commit changes
if: steps.git-diff.outputs.changes == 'true'
run: |
git config --global user.name "octavia-squidington-iii"
git config --global user.email "contact@airbyte.com"
git add .
git commit -m "Auto-fix lint and format issues"
# Fix any further 'unsafe' lint issues in a separate commit

- name: Auto-Fix Ruff Lint Issues (Unsafe)
run: poetry run ruff check --fix --unsafe-fixes . || true
- name: Auto-Fix Ruff Format Issues
run: poetry run ruff format . || true

# Check for changes in git (2nd time, for 'unsafe' lint fixes)

- name: Check for changes ('unsafe' fixes)
id: git-diff-2
run: |
git diff --quiet && echo "No changes to commit" || echo "changes=true" >> $GITHUB_OUTPUT
shell: bash

- name: Commit 'unsafe' lint fixes
if: steps.git-diff-2.outputs.changes == 'true'
run: |
git config --global user.name "octavia-squidington-iii"
git config --global user.email "contact@airbyte.com"
git add .
git commit -m "Auto-fix lint issues (unsafe)"
- name: Push changes to '(${{ steps.pr-info.outputs.repo }})'
if: steps.git-diff.outputs.changes == 'true' || steps.git-diff-2.outputs.changes == 'true'
run: |
git remote add contributor https://github.com/${{ steps.pr-info.outputs.repo }}.git
git push contributor HEAD:${{ steps.pr-info.outputs.branch }}
- name: Append success comment
uses: peter-evans/create-or-update-comment@v4
if: steps.git-diff.outputs.changes == 'true' || steps.git-diff-2.outputs.changes == 'true'
with:
comment-id: ${{ steps.first-comment-action.outputs.comment-id }}
reactions: hooray
body: |
> ✅ Changes applied successfully.
- name: Append success comment (no-op)
uses: peter-evans/create-or-update-comment@v4
if: steps.git-diff.outputs.changes != 'true' && steps.git-diff-2.outputs.changes != 'true'
with:
comment-id: ${{ steps.first-comment-action.outputs.comment-id }}
reactions: "+1"
body: |
> 🟦 Job completed successfully (no changes).
- name: Append failure comment
uses: peter-evans/create-or-update-comment@v4
if: failure()
with:
comment-id: ${{ steps.first-comment-action.outputs.comment-id }}
reactions: confused
body: |
> ❌ Job failed.
Loading