Skip to content

Commit

Permalink
Merge branch 'apache:main' into financial-services
Browse files Browse the repository at this point in the history
  • Loading branch information
claw89 authored Nov 11, 2024
2 parents cc783fe + 564139d commit 984fa74
Show file tree
Hide file tree
Showing 464 changed files with 22,854 additions and 9,434 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/airflow_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body:
the latest release or main to see if the issue is fixed before reporting it.
multiple: false
options:
- "2.10.2"
- "2.10.3"
- "main (development)"
- "Other Airflow 2 version (please specify below)"
validations:
Expand Down
50 changes: 50 additions & 0 deletions .github/actions/install-pre-commit/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: 'Install pre-commit'
description: 'Installs pre-commit and related packages'
inputs:
python-version:
description: 'Python version to use'
default: 3.9
uv-version:
description: 'uv version to use'
default: 0.4.30
pre-commit-version:
description: 'pre-commit version to use'
default: 4.0.1
pre-commit-uv-version:
description: 'pre-commit-uv version to use'
default: 4.1.4
runs:
using: "composite"
steps:
- name: Install pre-commit, uv, and pre-commit-uv
shell: bash
run: >
pip install
pre-commit==${{inputs.pre-commit-version}}
uv==${{inputs.uv-version}}
pre-commit-uv==${{inputs.pre-commit-uv-version}}
- name: Cache pre-commit envs
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: "pre-commit-${{inputs.python-version}}-${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
pre-commit-${{inputs.python-version}}-
18 changes: 6 additions & 12 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,8 @@ jobs:
working-directory: ./airflow-client-python
- name: Install hatch
run: |
python -m pip install --upgrade pipx
pipx ensurepath
pipx install hatch --force
python -m pip install --upgrade uv
uv tool install hatch
- name: Run tests
run: hatch run run-coverage
env:
Expand Down Expand Up @@ -285,16 +284,11 @@ jobs:
- name: "Install Breeze"
uses: ./.github/actions/breeze
id: breeze
- name: Cache pre-commit envs
uses: actions/cache@v4
- name: "Install pre-commit"
uses: ./.github/actions/install-pre-commit
id: pre-commit
with:
path: ~/.cache/pre-commit
# yamllint disable-line rule:line-length
key: "pre-commit-${{steps.breeze.outputs.host-python-version}}-${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: "\
pre-commit-${{steps.breeze.outputs.host-python-version}}-\
${{ hashFiles('.pre-commit-config.yaml') }}\n
pre-commit-${{steps.breeze.outputs.host-python-version}}-"
python-version: ${{steps.breeze.outputs.host-python-version}}
- name: Fetch incoming commit ${{ github.sha }} with its parent
uses: actions/checkout@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
pull-request-target: "true"
is-committer-build: ${{ needs.build-info.outputs.is-committer-build }}
push-image: "true"
use-uv: ${{ needs.build-info.outputs.force-pip && 'false' || 'true' }}
use-uv: ${{ needs.build-info.outputs.force-pip == 'true' && 'false' || 'true' }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
platform: "linux/amd64"
python-versions: ${{ needs.build-info.outputs.python-versions }}
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
pull-request-target: "true"
is-committer-build: ${{ needs.build-info.outputs.is-committer-build }}
push-image: "true"
use-uv: ${{ needs.build-info.outputs.force-pip && 'false' || 'true' }}
use-uv: ${{ needs.build-info.outputs.force-pip == 'true' && 'false' || 'true' }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
platform: linux/amd64
python-versions: ${{ needs.build-info.outputs.python-versions }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ jobs:
run: breeze release-management prepare-airflow-package --version-suffix-for-pypi dev0
- name: "Verify wheel packages with twine"
run: |
pipx uninstall twine || true
pipx install twine && twine check dist/*.whl
uv tool uninstall twine || true
uv tool install twine && twine check dist/*.whl
- name: "Test providers issue generation automatically"
run: >
breeze release-management generate-issue-content-providers
Expand Down Expand Up @@ -170,8 +170,8 @@ jobs:
--version-suffix-for-pypi dev0 --package-format sdist
- name: "Verify sdist packages with twine"
run: |
pipx uninstall twine || true
pipx install twine && twine check dist/*.tar.gz
uv tool uninstall twine || true
uv tool install twine && twine check dist/*.tar.gz
- name: "Generate source constraints from CI image"
shell: bash
run: >
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
platform: "linux/amd64"
python-versions: ${{ needs.build-info.outputs.python-versions }}
branch: ${{ needs.build-info.outputs.default-branch }}
use-uv: ${{ needs.build-info.outputs.force-pip && 'false' || 'true' }}
use-uv: ${{ needs.build-info.outputs.force-pip == 'true' && 'false' || 'true' }}
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
constraints-branch: ${{ needs.build-info.outputs.default-constraints-branch }}
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
latest-versions-only: ${{ needs.build-info.outputs.latest-versions-only }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
use-uv: ${{ needs.build-info.outputs.force-pip && 'false' || 'true' }}
use-uv: ${{ needs.build-info.outputs.force-pip == 'true' && 'false' || 'true' }}


generate-constraints:
Expand Down Expand Up @@ -559,7 +559,7 @@ jobs:
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
branch: ${{ needs.build-info.outputs.default-branch }}
push-image: "true"
use-uv: ${{ needs.build-info.outputs.force-pip && 'false' || 'true' }}
use-uv: ${{ needs.build-info.outputs.force-pip == 'true' && 'false' || 'true' }}
build-provider-packages: ${{ needs.build-info.outputs.default-branch == 'main' }}
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
Expand Down Expand Up @@ -642,7 +642,7 @@ jobs:
kubernetes-versions-list-as-string: ${{ needs.build-info.outputs.kubernetes-versions-list-as-string }}
kubernetes-combos-list-as-string: ${{ needs.build-info.outputs.kubernetes-combos-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
use-uv: ${{ needs.build-info.outputs.force-pip && 'false' || 'true' }}
use-uv: ${{ needs.build-info.outputs.force-pip == 'true' && 'false' || 'true' }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
if: >
( needs.build-info.outputs.run-kubernetes-tests == 'true' ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/finalize-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
python-versions: ${{ inputs.python-versions }}
branch: ${{ inputs.branch }}
constraints-branch: ${{ inputs.constraints-branch }}
use-uv: ${{ needs.build-info.outputs.force-pip && 'false' || 'true' }}
use-uv: ${{ needs.build-info.outputs.force-pip == 'true' && 'false' || 'true' }}
include-success-outputs: ${{ inputs.include-success-outputs }}
docker-cache: ${{ inputs.docker-cache }}
disable-airflow-repo-cache: ${{ inputs.disable-airflow-repo-cache }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ on: # yamllint disable-line rule:truthy
jobs:
tests-integration:
timeout-minutes: 130
if: inputs.testable-integrations != '[]'
name: "Integration Tests: ${{ matrix.integration }}"
runs-on: ${{ fromJSON(inputs.runs-on-as-json-public) }}
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/k8s-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
k8s-env-${{ steps.breeze.outputs.host-python-version }}-\
${{ hashFiles('scripts/ci/kubernetes/k8s_requirements.txt','hatch_build.py') }}"
- name: "Switch breeze to use uv"
run: breeze setup-config --use-uv
run: breeze setup config --use-uv
if: inputs.use-uv == 'true'
- name: Run complete K8S tests ${{ inputs.kubernetes-combos-list-as-string }}
run: breeze k8s run-complete-tests --run-in-parallel --upgrade --no-copy-local-sources
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/news-fragment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:

- name: Check news fragment
run: >
pipx run towncrier check
python -m pip install --upgrade uv &&
uv tool run towncrier check
--dir .
--config newsfragments/config.toml
--compare-with origin/${{ github.base_ref }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/static-checks-mypy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,11 @@ jobs:
- name: "Prepare breeze & CI image: ${{ inputs.default-python-version}}:${{ inputs.image-tag }}"
uses: ./.github/actions/prepare_breeze_and_image
id: breeze
- name: Cache pre-commit envs
uses: actions/cache@v4
- name: "Install pre-commit"
uses: ./.github/actions/install-pre-commit
id: pre-commit
with:
path: ~/.cache/pre-commit
# yamllint disable-line rule:line-length
key: "pre-commit-${{steps.breeze.outputs.host-python-version}}-${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
pre-commit-${{steps.breeze.outputs.host-python-version}}-
python-version: ${{steps.breeze.outputs.host-python-version}}
- name: "Static checks"
run: breeze static-checks --all-files --show-diff-on-failure --color always --initialize-environment
env:
Expand Down Expand Up @@ -170,10 +167,13 @@ jobs:
- name: "Prepare breeze & CI image: ${{ inputs.default-python-version }}:${{ inputs.image-tag }}"
uses: ./.github/actions/prepare_breeze_and_image
id: breeze
- name: "Install pre-commit"
uses: ./.github/actions/install-pre-commit
id: pre-commit
with:
python-version: ${{steps.breeze.outputs.host-python-version}}
- name: "MyPy checks for ${{ matrix.mypy-check }}"
run: |
pip install pre-commit
pre-commit run --color always --verbose --hook-stage manual ${{matrix.mypy-check}} --all-files
run: pre-commit run --color always --verbose --hook-stage manual ${{matrix.mypy-check}} --all-files
env:
VERBOSE: "false"
COLUMNS: "250"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/task-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ jobs:
breeze release-management prepare-task-sdk-package --package-format wheel
- name: "Verify wheel packages with twine"
run: |
pipx uninstall twine || true
pipx install twine && twine check dist/*.whl
uv tool uninstall twine || true
uv tool install twine && twine check dist/*.whl
- name: >
Run unit tests for Airflow Task SDK:Python ${{ matrix.python-version }}
run: >
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,6 @@ licenses/LICENSES-ui.txt

# airflow-build-dockerfile and correconding ignore file
airflow-build-dockerfile*

# Temporary ignore uv.lock until we integrate it fully in our constraint preparation mechanism
/uv.lock
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ repos:
types_or: [python, pyi]
args: [--fix]
require_serial: true
additional_dependencies: ["ruff==0.7.1"]
additional_dependencies: ["ruff==0.7.2"]
exclude: ^.*/.*_vendor/|^tests/dags/test_imports.py|^performance/tests/test_.*.py
- id: ruff-format
name: Run 'ruff format'
Expand All @@ -370,7 +370,7 @@ repos:
types_or: [python, pyi]
args: []
require_serial: true
additional_dependencies: ["ruff==0.7.1"]
additional_dependencies: ["ruff==0.7.2"]
exclude: ^.*/.*_vendor/|^tests/dags/test_imports.py$
- id: replace-bad-characters
name: Replace bad characters
Expand Down Expand Up @@ -477,21 +477,21 @@ repos:
files: ^docs/apache-airflow/extra-packages-ref\.rst$|^hatch_build.py
pass_filenames: false
entry: ./scripts/ci/pre_commit/check_extra_packages_ref.py
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.25.0', 'tabulate']
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.26.1', 'tabulate']
- id: check-hatch-build-order
name: Check order of dependencies in hatch_build.py
language: python
files: ^hatch_build.py$
pass_filenames: false
entry: ./scripts/ci/pre_commit/check_order_hatch_build.py
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.25.0']
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.26.1']
- id: update-extras
name: Update extras in documentation
entry: ./scripts/ci/pre_commit/insert_extras.py
language: python
files: ^contributing-docs/12_airflow_dependencies_and_extras.rst$|^INSTALL$|^providers/src/airflow/providers/.*/provider\.yaml$|^Dockerfile.*
pass_filenames: false
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.25.0']
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.26.1']
- id: check-extras-order
name: Check order of extras in Dockerfile
entry: ./scripts/ci/pre_commit/check_order_dockerfile_extras.py
Expand Down Expand Up @@ -667,7 +667,8 @@ repos:
^.*RELEASE_NOTES\.rst$|
^contributing-docs/03_contributors_quick_start.rst$|
^.*\.(png|gif|jp[e]?g|tgz|lock)$|
git
git|
^newsfragments/43368\.significant\.rst$
- id: check-base-operator-partial-arguments
name: Check BaseOperator and partial() arguments
language: python
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ARG AIRFLOW_UID="50000"
ARG AIRFLOW_USER_HOME_DIR=/home/airflow

# latest released version here
ARG AIRFLOW_VERSION="2.10.2"
ARG AIRFLOW_VERSION="2.10.3"

ARG PYTHON_BASE_IMAGE="python:3.9-slim-bookworm"

Expand All @@ -55,7 +55,7 @@ ARG PYTHON_BASE_IMAGE="python:3.9-slim-bookworm"
# Also use `force pip` label on your PR to swap all places we use `uv` to `pip`
ARG AIRFLOW_PIP_VERSION=24.3.1
# ARG AIRFLOW_PIP_VERSION="git+https://github.com/pypa/pip.git@main"
ARG AIRFLOW_UV_VERSION=0.4.29
ARG AIRFLOW_UV_VERSION=0.5.1
ARG AIRFLOW_USE_UV="false"
ARG UV_HTTP_TIMEOUT="300"
ARG AIRFLOW_IMAGE_REPOSITORY="https://github.com/apache/airflow"
Expand Down
Loading

0 comments on commit 984fa74

Please sign in to comment.