diff --git a/.dockerignore b/.dockerignore
index 75d9be8960a3..dba7378a3b77 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -54,7 +54,6 @@
!Dockerfile
!hatch_build.py
!prod_image_installed_providers.txt
-!airflow_pre_installed_providers.txt
# This folder is for you if you want to add any packages to the docker context when you build your own
# docker image. most of other files and any new folder you add will be excluded by default
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4fe8be8dc0dd..e657f871271f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -432,26 +432,26 @@ repos:
additional_dependencies: ['setuptools', 'rich>=12.4.4', 'pyyaml', 'tomli']
- id: check-extra-packages-references
name: Checks setup extra packages
- description: Checks if all the extras defined in pyproject.toml are listed in extra-packages-ref.rst file
+ description: Checks if all the extras defined in hatch_build.py are listed in extra-packages-ref.rst file
language: python
- files: ^docs/apache-airflow/extra-packages-ref\.rst$|^pyproject.toml
+ files: ^docs/apache-airflow/extra-packages-ref\.rst$|^hatch_build.py
pass_filenames: false
entry: ./scripts/ci/pre_commit/pre_commit_check_extra_packages_ref.py
- additional_dependencies: ['rich>=12.4.4', 'tomli', 'tabulate']
- - id: check-pyproject-toml-order
- name: Check order of dependencies in pyproject.toml
+ additional_dependencies: ['rich>=12.4.4', 'hatchling==1.22.4', 'tabulate']
+ - id: check-hatch-build-order
+ name: Check order of dependencies in hatch_build.py
language: python
- files: ^pyproject\.toml$
+ files: ^hatch_build.py$
pass_filenames: false
- entry: ./scripts/ci/pre_commit/pre_commit_check_order_pyproject_toml.py
- additional_dependencies: ['rich>=12.4.4']
+ entry: ./scripts/ci/pre_commit/pre_commit_check_order_hatch_build.py
+ additional_dependencies: ['rich>=12.4.4', 'hatchling==1.22.4']
- id: update-extras
name: Update extras in documentation
entry: ./scripts/ci/pre_commit/pre_commit_insert_extras.py
language: python
files: ^contributing-docs/12_airflow_dependencies_and_extras.rst$|^INSTALL$|^airflow/providers/.*/provider\.yaml$|^Dockerfile.*
pass_filenames: false
- additional_dependencies: ['rich>=12.4.4', 'tomli']
+ additional_dependencies: ['rich>=12.4.4', 'hatchling==1.22.4']
- id: check-extras-order
name: Check order of extras in Dockerfile
entry: ./scripts/ci/pre_commit/pre_commit_check_order_dockerfile_extras.py
diff --git a/Dockerfile b/Dockerfile
index 10fc939093f6..1f72714477b3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -455,13 +455,17 @@ function install_airflow_dependencies_from_branch_tip() {
if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then
AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,}
fi
+ local TEMP_AIRFLOW_DIR
+ TEMP_AIRFLOW_DIR=$(mktemp -d)
# Install latest set of dependencies - without constraints. This is to download a "base" set of
# dependencies that we can cache and reuse when installing airflow using constraints and latest
# pyproject.toml in the next step (when we install regular airflow).
set -x
- ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
- ${ADDITIONAL_PIP_INSTALL_FLAGS} \
- "apache-airflow[${AIRFLOW_EXTRAS}] @ https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz"
+ curl -fsSL "https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz" | \
+ tar xvz -C "${TEMP_AIRFLOW_DIR}" --strip 1
+ # Make sure editable dependencies are calculated when devel-ci dependencies are installed
+ ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${ADDITIONAL_PIP_INSTALL_FLAGS} \
+ --editable "${TEMP_AIRFLOW_DIR}[${AIRFLOW_EXTRAS}]"
set +x
common::install_packaging_tools
set -x
@@ -477,6 +481,7 @@ function install_airflow_dependencies_from_branch_tip() {
set +x
${PACKAGING_TOOL_CMD} uninstall ${EXTRA_UNINSTALL_FLAGS} apache-airflow
set -x
+ rm -rvf "${TEMP_AIRFLOW_DIR}"
# If you want to make sure dependency is removed from cache in your PR when you removed it from
# pyproject.toml - please add your dependency here as a list of strings
# for example:
diff --git a/Dockerfile.ci b/Dockerfile.ci
index d52e8909468c..03c5bbb4e736 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -402,13 +402,17 @@ function install_airflow_dependencies_from_branch_tip() {
if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then
AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,}
fi
+ local TEMP_AIRFLOW_DIR
+ TEMP_AIRFLOW_DIR=$(mktemp -d)
# Install latest set of dependencies - without constraints. This is to download a "base" set of
# dependencies that we can cache and reuse when installing airflow using constraints and latest
# pyproject.toml in the next step (when we install regular airflow).
set -x
- ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
- ${ADDITIONAL_PIP_INSTALL_FLAGS} \
- "apache-airflow[${AIRFLOW_EXTRAS}] @ https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz"
+ curl -fsSL "https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz" | \
+ tar xvz -C "${TEMP_AIRFLOW_DIR}" --strip 1
+ # Make sure editable dependencies are calculated when devel-ci dependencies are installed
+ ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${ADDITIONAL_PIP_INSTALL_FLAGS} \
+ --editable "${TEMP_AIRFLOW_DIR}[${AIRFLOW_EXTRAS}]"
set +x
common::install_packaging_tools
set -x
@@ -424,6 +428,7 @@ function install_airflow_dependencies_from_branch_tip() {
set +x
${PACKAGING_TOOL_CMD} uninstall ${EXTRA_UNINSTALL_FLAGS} apache-airflow
set -x
+ rm -rvf "${TEMP_AIRFLOW_DIR}"
# If you want to make sure dependency is removed from cache in your PR when you removed it from
# pyproject.toml - please add your dependency here as a list of strings
# for example:
@@ -1309,7 +1314,6 @@ COPY airflow/__init__.py ${AIRFLOW_SOURCES}/airflow/
COPY generated/* ${AIRFLOW_SOURCES}/generated/
COPY constraints/* ${AIRFLOW_SOURCES}/constraints/
COPY LICENSE ${AIRFLOW_SOURCES}/LICENSE
-COPY airflow_pre_installed_providers.txt ${AIRFLOW_SOURCES}/
COPY hatch_build.py ${AIRFLOW_SOURCES}/
COPY --from=scripts install_airflow.sh /scripts/docker/
diff --git a/INSTALL b/INSTALL
index a1e2034b6993..38434d9192d4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,7 @@
-# INSTALL / BUILD instructions for Apache Airflow
+INSTALL / BUILD instructions for Apache Airflow
-## Basic installation of Airflow from sources and development environment setup
+Basic installation of Airflow from sources and development environment setup
+============================================================================
This is a generic installation method that requires minimum starndard tools to develop airflow and
test it in local virtual environment (using standard CPyhon installation and `pip`).
@@ -23,7 +24,18 @@ MacOS (Mojave/Catalina) you might need to to install XCode command line tools an
brew install sqlite mysql postgresql
-## Downloading and installing Airflow from sources
+The `pip` is one of the build packaging front-ends that might be used to install Airflow. It's the one
+that we recommend (see below) for reproducible installation of specific versions of Airflow.
+
+As of version 2.8 Airflow follows PEP 517/518 and uses `pyproject.toml` file to define build dependencies
+and build process and it requires relatively modern versions of packaging tools to get airflow built from
+local sources or sdist packages, as PEP 517 compliant build hooks are used to determine dynamic build
+dependencies. In case of `pip` it means that at least version 22.1.0 is needed (released at the beginning of
+2022) to build or install Airflow from sources. This does not affect the ability of installing Airflow from
+released wheel packages.
+
+Downloading and installing Airflow from sources
+-----------------------------------------------
While you can get Airflow sources in various ways (including cloning https://github.com/apache/airflow/), the
canonical way to download it is to fetch the tarball published at https://downloads.apache.org where you can
@@ -95,7 +107,8 @@ Airflow project contains some pre-defined virtualenv definitions in ``pyproject.
easily used by hatch to create your local venvs. This is not necessary for you to develop and test
Airflow, but it is a convenient way to manage your local Python versions and virtualenvs.
-## Installing Hatch
+Installing Hatch
+----------------
You can install hat using various other ways (including Gui installers).
@@ -128,19 +141,21 @@ You can see the list of available envs with:
This is what it shows currently:
-┏━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
-┃ Name ┃ Type ┃ Features ┃ Description ┃
-┡━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
-│ default │ virtual │ devel │ Default environment with Python 3.8 for maximum compatibility │
-├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
-│ airflow-38 │ virtual │ │ Environment with Python 3.8. No devel installed. │
-├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
-│ airflow-39 │ virtual │ │ Environment with Python 3.9. No devel installed. │
-├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
-│ airflow-310 │ virtual │ │ Environment with Python 3.10. No devel installed. │
-├─────────────┼─────────┼──────────┼───────────────────────────────────────────────────────────────┤
-│ airflow-311 │ virtual │ │ Environment with Python 3.11. No devel installed │
-└─────────────┴─────────┴──────────┴───────────────────────────────────────────────────────────────┘
+┏━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃ Name ┃ Type ┃ Description ┃
+┡━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ default │ virtual │ Default environment with Python 3.8 for maximum compatibility │
+├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
+│ airflow-38 │ virtual │ Environment with Python 3.8. No devel installed. │
+├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
+│ airflow-39 │ virtual │ Environment with Python 3.9. No devel installed. │
+├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
+│ airflow-310 │ virtual │ Environment with Python 3.10. No devel installed. │
+├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
+│ airflow-311 │ virtual │ Environment with Python 3.11. No devel installed │
+├─────────────┼─────────┼───────────────────────────────────────────────────────────────┤
+│ airflow-312 │ virtual │ Environment with Python 3.11. No devel installed │
+└─────────────┴─────────┴───────────────────────────────────────────────────────────────┘
The default env (if you have not used one explicitly) is `default` and it is a Python 3.8
virtualenv for maximum compatibility with `devel` extra installed - this devel extra contains the minimum set
@@ -229,7 +244,8 @@ and install to latest supported ones by pure airflow core.
pip install -e ".[devel]" \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-no-providers-3.8.txt"
-## All airflow extras
+Airflow extras
+==============
Airflow has a number of extras that you can install to get additional dependencies. They sometimes install
providers, sometimes enable other features where packages are not installed by default.
@@ -239,36 +255,69 @@ https://airflow.apache.org/docs/apache-airflow/stable/extra-packages-ref.html
The list of available extras is below.
-Regular extras that are available for users in the Airflow package.
+Core extras
+-----------
+
+Those extras are available as regular core airflow extras - they install optional features of Airflow.
+
+# START CORE EXTRAS HERE
+
+aiobotocore, apache-atlas, apache-webhdfs, async, cgroups, deprecated-api, github-enterprise,
+google-auth, graphviz, kerberos, ldap, leveldb, otel, pandas, password, pydantic, rabbitmq, s3fs,
+saml, sentry, statsd, uv, virtualenv
+
+# END CORE EXTRAS HERE
-# START REGULAR EXTRAS HERE
+Provider extras
+---------------
-aiobotocore, airbyte, alibaba, all, all-core, all-dbs, amazon, apache-atlas, apache-beam, apache-
-cassandra, apache-drill, apache-druid, apache-flink, apache-hdfs, apache-hive, apache-impala,
-apache-kafka, apache-kylin, apache-livy, apache-pig, apache-pinot, apache-spark, apache-webhdfs,
-apprise, arangodb, asana, async, atlas, atlassian-jira, aws, azure, cassandra, celery, cgroups,
-cloudant, cncf-kubernetes, cohere, common-io, common-sql, crypto, databricks, datadog, dbt-cloud,
-deprecated-api, dingding, discord, docker, druid, elasticsearch, exasol, fab, facebook, ftp, gcp,
-gcp_api, github, github-enterprise, google, google-auth, graphviz, grpc, hashicorp, hdfs, hive,
-http, imap, influxdb, jdbc, jenkins, kerberos, kubernetes, ldap, leveldb, microsoft-azure,
-microsoft-mssql, microsoft-psrp, microsoft-winrm, mongo, mssql, mysql, neo4j, odbc, openai,
-openfaas, openlineage, opensearch, opsgenie, oracle, otel, pagerduty, pandas, papermill, password,
-pgvector, pinecone, pinot, postgres, presto, pydantic, qdrant, rabbitmq, redis, s3, s3fs,
-salesforce, samba, saml, segment, sendgrid, sentry, sftp, singularity, slack, smtp, snowflake,
-spark, sqlite, ssh, statsd, tableau, tabular, telegram, teradata, trino, uv, vertica, virtualenv,
-weaviate, webhdfs, winrm, yandex, zendesk
+Those extras are available as regular Airflow extras, they install provider packages in standard builds
+or dependencies that are necessary to enable the feature in editable build.
-# END REGULAR EXTRAS HERE
+# START PROVIDER EXTRAS HERE
-Devel extras - used to install development-related tools. Only available during editable install.
+airbyte, alibaba, amazon, apache.beam, apache.cassandra, apache.drill, apache.druid, apache.flink,
+apache.hdfs, apache.hive, apache.impala, apache.kafka, apache.kylin, apache.livy, apache.pig,
+apache.pinot, apache.spark, apprise, arangodb, asana, atlassian.jira, celery, cloudant,
+cncf.kubernetes, cohere, common.io, common.sql, databricks, datadog, dbt.cloud, dingding, discord,
+docker, elasticsearch, exasol, fab, facebook, ftp, github, google, grpc, hashicorp, http, imap,
+influxdb, jdbc, jenkins, microsoft.azure, microsoft.mssql, microsoft.psrp, microsoft.winrm, mongo,
+mysql, neo4j, odbc, openai, openfaas, openlineage, opensearch, opsgenie, oracle, pagerduty,
+papermill, pgvector, pinecone, postgres, presto, qdrant, redis, salesforce, samba, segment,
+sendgrid, sftp, singularity, slack, smtp, snowflake, sqlite, ssh, tableau, tabular, telegram,
+teradata, trino, vertica, weaviate, yandex, zendesk
+
+# END PROVIDER EXTRAS HERE
+
+Devel extras
+------------
+
+The `devel` extras are not available in the released packages. They are only available when you install
+Airflow from sources in `editable` installation - i.e. one that you are usually using to contribute to
+Airflow. They provide tools such as `pytest` and `mypy` for general purpose development and testing.
# START DEVEL EXTRAS HERE
-devel, devel-all, devel-all-dbs, devel-ci, devel-debuggers, devel-devscripts, devel-duckdb, devel-
-hadoop, devel-mypy, devel-sentry, devel-static-checks, devel-tests
+devel, devel-all-dbs, devel-ci, devel-debuggers, devel-devscripts, devel-duckdb, devel-hadoop,
+devel-mypy, devel-sentry, devel-static-checks, devel-tests
# END DEVEL EXTRAS HERE
+Bundle extras
+-------------
+
+Those extras are bundles dynamically generated from other extras.
+
+# START BUNDLE EXTRAS HERE
+
+all, all-core, all-dbs, devel-all, devel-ci
+
+# END BUNDLE EXTRAS HERE
+
+
+Doc extras
+----------
+
Doc extras - used to install dependencies that are needed to build documentation. Only available during
editable install.
@@ -278,7 +327,20 @@ doc, doc-gen
# END DOC EXTRAS HERE
-## Compiling front end assets
+Deprecated extras
+-----------------
+
+The `deprecated` extras are deprecated extras from Airflow 1 that will be removed in future versions.
+
+# START DEPRECATED EXTRAS HERE
+
+atlas, aws, azure, cassandra, crypto, druid, gcp, gcp-api, hdfs, hive, kubernetes, mssql, pinot, s3,
+spark, webhdfs, winrm
+
+# END DEPRECATED EXTRAS HERE
+
+Compiling front end assets
+--------------------------
Sometimes you can see that front-end assets are missing and website looks broken. This is because
you need to compile front-end assets. This is done automatically when you create a virtualenv
diff --git a/airflow_pre_installed_providers.txt b/airflow_pre_installed_providers.txt
index 2d38abfce119..8ea073266ae6 100644
--- a/airflow_pre_installed_providers.txt
+++ b/airflow_pre_installed_providers.txt
@@ -1,7 +1,7 @@
# List of all the providers that are pre-installed when you run `pip install apache-airflow` without extras
common.io
common.sql
-fab>=1.0.2dev0
+fab>=1.0.2dev1
ftp
http
imap
diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml
index 59022ef9aaa1..cda4de256d09 100644
--- a/clients/python/pyproject.toml
+++ b/clients/python/pyproject.toml
@@ -16,7 +16,7 @@
# under the License.
[build-system]
-requires = ["hatchling"]
+requires = ["hatchling==1.22.4"]
build-backend = "hatchling.build"
[project]
diff --git a/contributing-docs/07_local_virtualenv.rst b/contributing-docs/07_local_virtualenv.rst
index a7a984e47cca..373b6d76aaf5 100644
--- a/contributing-docs/07_local_virtualenv.rst
+++ b/contributing-docs/07_local_virtualenv.rst
@@ -51,6 +51,16 @@ of required packages.
- MacOs with ARM architectures require graphviz for venv setup, refer `here `_ to install graphviz
- The helm chart tests need helm to be installed as a pre requisite. Refer `here `_ to install and setup helm
+.. note::
+
+ As of version 2.8 Airflow follows PEP 517/518 and uses ``pyproject.toml`` file to define build dependencies
+ and build process and it requires relatively modern versions of packaging tools to get airflow built from
+ local sources or ``sdist`` packages, as PEP 517 compliant build hooks are used to determine dynamic build
+ dependencies. In case of ``pip`` it means that at least version 22.1.0 is needed (released at the beginning of
+ 2022) to build or install Airflow from sources. This does not affect the ability of installing Airflow from
+ released wheel packages.
+
+
Installing Airflow
..................
@@ -173,26 +183,31 @@ You can see the list of available envs with:
This is what it shows currently:
-+-------------+---------+----------+---------------------------------------------------------------+
-| Name | Type | Features | Description |
-+=============+=========+==========+===============================================================+
-| default | virtual | devel | Default environment with Python 3.8 for maximum compatibility |
-+-------------+---------+----------+---------------------------------------------------------------+
-| airflow-38 | virtual | devel | Environment with Python 3.8 |
-+-------------+---------+----------+---------------------------------------------------------------+
-| airflow-39 | virtual | devel | Environment with Python 3.9 |
-+-------------+---------+----------+---------------------------------------------------------------+
-| airflow-310 | virtual | devel | Environment with Python 3.10 |
-+-------------+---------+----------+---------------------------------------------------------------+
-| airflow-311 | virtual | devel | Environment with Python 3.11 |
-+-------------+---------+----------+---------------------------------------------------------------+
-| airflow-312 | virtual | devel | Environment with Python 3.12 |
-+-------------+---------+----------+---------------------------------------------------------------+
++-------------+---------+---------------------------------------------------------------+
+| Name | Type | Description |
++=============+=========+===============================================================+
+| default | virtual | Default environment with Python 3.8 for maximum compatibility |
++-------------+---------+---------------------------------------------------------------+
+| airflow-38 | virtual | Environment with Python 3.8. No devel installed. |
++-------------+---------+---------------------------------------------------------------+
+| airflow-39 | virtual | Environment with Python 3.9. No devel installed. |
++-------------+---------+---------------------------------------------------------------+
+| airflow-310 | virtual | Environment with Python 3.10. No devel installed. |
++-------------+---------+---------------------------------------------------------------+
+| airflow-311 | virtual | Environment with Python 3.11. No devel installed |
++-------------+---------+---------------------------------------------------------------+
+| airflow-312 | virtual | Environment with Python 3.12. No devel installed |
++-------------+---------+---------------------------------------------------------------+
The default env (if you have not used one explicitly) is ``default`` and it is a Python 3.8
-virtualenv for maximum compatibility with ``devel`` extra installed - this devel extra contains the minimum set
-of dependencies and tools that should be used during unit testing of core Airflow and running all ``airflow``
-CLI commands - without support for providers or databases.
+virtualenv for maximum compatibility. You can install devel set of dependencies with it
+by running:
+
+.. code:: bash
+
+ pip install -e ".[devel]"
+
+After entering the environment.
The other environments are just bare-bones Python virtualenvs with Airflow core requirements only,
without any extras installed and without any tools. They are much faster to create than the default
diff --git a/contributing-docs/08_static_code_checks.rst b/contributing-docs/08_static_code_checks.rst
index a947c7512f29..18222fd601c8 100644
--- a/contributing-docs/08_static_code_checks.rst
+++ b/contributing-docs/08_static_code_checks.rst
@@ -170,6 +170,8 @@ require Breeze Docker image to be built locally.
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
| check-google-re2-as-dependency | Check google-re2 is declared as dependency when needed | |
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
+| check-hatch-build-order | Check order of dependencies in hatch_build.py | |
++-----------------------------------------------------------+--------------------------------------------------------------+---------+
| check-hooks-apply | Check if all hooks apply to the repository | |
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
| check-incorrect-use-of-LoggingMixin | Make sure LoggingMixin is not used alone | |
@@ -208,8 +210,6 @@ require Breeze Docker image to be built locally.
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
| check-pydevd-left-in-code | Check for pydevd debug statements accidentally left | |
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
-| check-pyproject-toml-order | Check order of dependencies in pyproject.toml | |
-+-----------------------------------------------------------+--------------------------------------------------------------+---------+
| check-revision-heads-map | Check that the REVISION_HEADS_MAP is up-to-date | |
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
| check-safe-filter-usage-in-html | Don't use safe in templates | |
diff --git a/contributing-docs/12_airflow_dependencies_and_extras.rst b/contributing-docs/12_airflow_dependencies_and_extras.rst
index bf16efd91de1..91328a24abb3 100644
--- a/contributing-docs/12_airflow_dependencies_and_extras.rst
+++ b/contributing-docs/12_airflow_dependencies_and_extras.rst
@@ -156,23 +156,68 @@ the documentation.
This is the full list of these extras:
+
+Core extras
+...........
+
+Those extras are available as regular core airflow extras - they install optional features of Airflow.
+
+ .. START CORE EXTRAS HERE
+
+aiobotocore, apache-atlas, apache-webhdfs, async, cgroups, deprecated-api, github-enterprise,
+google-auth, graphviz, kerberos, ldap, leveldb, otel, pandas, password, pydantic, rabbitmq, s3fs,
+saml, sentry, statsd, uv, virtualenv
+
+ .. END CORE EXTRAS HERE
+
+Provider extras
+...............
+
+Those extras are available as regular Airflow extras, they install provider packages in standard builds
+or dependencies that are necessary to enable the feature in editable build.
+
+ .. START PROVIDER EXTRAS HERE
+
+airbyte, alibaba, amazon, apache.beam, apache.cassandra, apache.drill, apache.druid, apache.flink,
+apache.hdfs, apache.hive, apache.impala, apache.kafka, apache.kylin, apache.livy, apache.pig,
+apache.pinot, apache.spark, apprise, arangodb, asana, atlassian.jira, celery, cloudant,
+cncf.kubernetes, cohere, common.io, common.sql, databricks, datadog, dbt.cloud, dingding, discord,
+docker, elasticsearch, exasol, fab, facebook, ftp, github, google, grpc, hashicorp, http, imap,
+influxdb, jdbc, jenkins, microsoft.azure, microsoft.mssql, microsoft.psrp, microsoft.winrm, mongo,
+mysql, neo4j, odbc, openai, openfaas, openlineage, opensearch, opsgenie, oracle, pagerduty,
+papermill, pgvector, pinecone, postgres, presto, qdrant, redis, salesforce, samba, segment,
+sendgrid, sftp, singularity, slack, smtp, snowflake, sqlite, ssh, tableau, tabular, telegram,
+teradata, trino, vertica, weaviate, yandex, zendesk
+
+ .. END PROVIDER EXTRAS HERE
+
+
Devel extras
.............
The ``devel`` extras are not available in the released packages. They are only available when you install
Airflow from sources in ``editable`` installation - i.e. one that you are usually using to contribute to
-Airflow. They provide tools such as ``pytest`` and ``mypy`` for general purpose development and testing, also
-some providers have their own development-related extras tbat allow to install tools necessary to run tests,
-where the tools are specific for the provider.
-
+Airflow. They provide tools such as ``pytest`` and ``mypy`` for general purpose development and testing.
.. START DEVEL EXTRAS HERE
-devel, devel-all, devel-all-dbs, devel-ci, devel-debuggers, devel-devscripts, devel-duckdb, devel-
-hadoop, devel-mypy, devel-sentry, devel-static-checks, devel-tests
+devel, devel-all-dbs, devel-ci, devel-debuggers, devel-devscripts, devel-duckdb, devel-hadoop,
+devel-mypy, devel-sentry, devel-static-checks, devel-tests
.. END DEVEL EXTRAS HERE
+Bundle extras
+.............
+
+Those extras are bundles dynamically generated from other extras.
+
+ .. START BUNDLE EXTRAS HERE
+
+all, all-core, all-dbs, devel-all, devel-ci
+
+ .. END BUNDLE EXTRAS HERE
+
+
Doc extras
...........
@@ -189,33 +234,17 @@ doc, doc-gen
.. END DOC EXTRAS HERE
+Deprecated extras
+.................
-Regular extras
-..............
-
-Those extras are available as regular Airflow extras and are targeted to be used by Airflow users and
-contributors to select features of Airflow they want to use They might install additional providers or
-just install dependencies that are necessary to enable the feature.
-
- .. START REGULAR EXTRAS HERE
+The ``deprecated`` extras are deprecated extras from Airflow 1 that will be removed in future versions.
-aiobotocore, airbyte, alibaba, all, all-core, all-dbs, amazon, apache-atlas, apache-beam, apache-
-cassandra, apache-drill, apache-druid, apache-flink, apache-hdfs, apache-hive, apache-impala,
-apache-kafka, apache-kylin, apache-livy, apache-pig, apache-pinot, apache-spark, apache-webhdfs,
-apprise, arangodb, asana, async, atlas, atlassian-jira, aws, azure, cassandra, celery, cgroups,
-cloudant, cncf-kubernetes, cohere, common-io, common-sql, crypto, databricks, datadog, dbt-cloud,
-deprecated-api, dingding, discord, docker, druid, elasticsearch, exasol, fab, facebook, ftp, gcp,
-gcp_api, github, github-enterprise, google, google-auth, graphviz, grpc, hashicorp, hdfs, hive,
-http, imap, influxdb, jdbc, jenkins, kerberos, kubernetes, ldap, leveldb, microsoft-azure,
-microsoft-mssql, microsoft-psrp, microsoft-winrm, mongo, mssql, mysql, neo4j, odbc, openai,
-openfaas, openlineage, opensearch, opsgenie, oracle, otel, pagerduty, pandas, papermill, password,
-pgvector, pinecone, pinot, postgres, presto, pydantic, qdrant, rabbitmq, redis, s3, s3fs,
-salesforce, samba, saml, segment, sendgrid, sentry, sftp, singularity, slack, smtp, snowflake,
-spark, sqlite, ssh, statsd, tableau, tabular, telegram, teradata, trino, uv, vertica, virtualenv,
-weaviate, webhdfs, winrm, yandex, zendesk
+ .. START DEPRECATED EXTRAS HERE
- .. END REGULAR EXTRAS HERE
+atlas, aws, azure, cassandra, crypto, druid, gcp, gcp-api, hdfs, hive, kubernetes, mssql, pinot, s3,
+spark, webhdfs, winrm
+ .. END DEPRECATED EXTRAS HERE
-----
diff --git a/dev/breeze/README.md b/dev/breeze/README.md
index 981a7bb85901..0a6ef086ffd4 100644
--- a/dev/breeze/README.md
+++ b/dev/breeze/README.md
@@ -66,6 +66,6 @@ PLEASE DO NOT MODIFY THE HASH BELOW! IT IS AUTOMATICALLY UPDATED BY PRE-COMMIT.
---------------------------------------------------------------------------------------------------------
-Package config hash: fb5183650b0efb5ec8241fcd53b6e5cc26c21c8d273fff91d0e8a3716f37703c44c7ae189653dd3fd52624d89c97635e0a7fc09104138ba35cb3ccf45f8efd4b
+Package config hash: 64737d477cded72bb31d3b440bb2e5b76d48e865fd5d7ecc3b2cf9d1f0c889a7232e78f74854e9d2d0a1fd0dd653cb3ff81aee7387fea5afddec91f16ee63cd0
---------------------------------------------------------------------------------------------------------
diff --git a/dev/breeze/doc/02_customizing.rst b/dev/breeze/doc/02_customizing.rst
index 78d24f30db7b..4e41bedd0874 100644
--- a/dev/breeze/doc/02_customizing.rst
+++ b/dev/breeze/doc/02_customizing.rst
@@ -45,7 +45,7 @@ will be evaluated at entering the environment.
The ``files`` folder from your local sources is automatically mounted to the container under
``/files`` path and you can put there any files you want to make available for the Breeze container.
-You can also copy any .whl or .sdist packages to dist and when you pass ``--use-packages-from-dist`` flag
+You can also copy any .whl or ``sdist`` packages to dist and when you pass ``--use-packages-from-dist`` flag
as ``wheel`` or ``sdist`` line parameter, breeze will automatically install the packages found there
when you enter Breeze.
diff --git a/dev/breeze/doc/ci/04_selective_checks.md b/dev/breeze/doc/ci/04_selective_checks.md
index 9a4959dfc5d8..7df3c6d4c385 100644
--- a/dev/breeze/doc/ci/04_selective_checks.md
+++ b/dev/breeze/doc/ci/04_selective_checks.md
@@ -52,11 +52,11 @@ We have the following Groups of files for CI that determine which tests are run:
* `API tests files` and `Codegen test files` - those are OpenAPI definition files that impact
Open API specification and determine that we should run dedicated API tests.
* `Helm files` - change in those files impacts helm "rendering" tests - `chart` folder and `helm_tests` folder.
-* `Setup files` - change in the setup files indicates that we should run `upgrade to newer dependencies` -
- pyproject.toml and generated dependencies files in `generated` folder. The dependency files and part of
- the pyproject.toml are automatically generated from the provider.yaml files in provider by
- the `update-providers-dependencies` pre-commit. The provider.yaml is a single source of truth for each
- provider.
+* `Build files` - change in the files indicates that we should run `upgrade to newer dependencies` -
+ build dependencies in `pyproject.toml` and generated dependencies files in `generated` folder.
+ The dependencies are automatically generated from the `provider.yaml` files in provider by
+ the `hatch_build.py` build hook. The provider.yaml is a single source of truth for each
+ provider and `hatch_build.py` for all regular dependencies.
* `DOC files` - change in those files indicate that we should run documentation builds (both airflow sources
and airflow documentation)
* `WWW files` - those are files for the WWW part of our UI (useful to determine if UI tests should run)
@@ -73,7 +73,6 @@ We have the following Groups of files for CI that determine which tests are run:
* `All Docs Python files` - files that are checked by `mypy-docs` static checks
* `All Provider Yaml files` - all provider yaml files
-
We have a number of `TEST_TYPES` that can be selectively disabled/enabled based on the
content of the incoming PR. Usually they are limited to a sub-folder of the "tests" folder but there
are some exceptions. You can read more about those in `testing.rst `. Those types
@@ -114,7 +113,8 @@ together using `pytest-xdist` (pytest-xdist distributes the tests among parallel
types to execute. This is done because changes in core might impact all the other test types.
* if `CI Image building` is disabled, only basic pre-commits are enabled - no 'image-depending` pre-commits
are enabled.
-* If there are some setup files changed, `upgrade to newer dependencies` is enabled.
+* If there are some build dependencies changed (`hatch_build.py` and updated system dependencies in
+ the `pyproject.toml` - then `upgrade to newer dependencies` is enabled.
* If docs are build, the `docs-list-as-string` will determine which docs packages to build. This is based on
several criteria: if any of the airflow core, charts, docker-stack, providers files or docs have changed,
then corresponding packages are build (including cross-dependent providers). If any of the core files
@@ -164,67 +164,70 @@ separated by spaces. This is to accommodate for the wau how outputs of this kind
Github Actions to pass the list of parameters to a command to execute
-| Output | Meaning of the output | Example value | List as string |
-|------------------------------------|------------------------------------------------------------------------------------------------------|-------------------------------------------|----------------|
-| affected-providers-list-as-string | List of providers affected when they are selectively affected. | airbyte http | * |
-| all-python-versions | List of all python versions there are available in the form of JSON array | ['3.8', '3.9', '3.10'] | |
-| all-python-versions-list-as-string | List of all python versions there are available in the form of space separated string | 3.8 3.9 3.10 | * |
-| all-versions | If set to true, then all python, k8s, DB versions are used for tests. | false | |
-| basic-checks-only | Whether to run all static checks ("false") or only basic set of static checks ("true") | false | |
-| cache-directive | Which cache should be used for images ("registry", "local" , "disabled") | registry | |
-| chicken-egg-providers | List of providers that should be considered as "chicken-egg" - expecting development Airflow version | | |
-| ci-image-build | Whether CI image build is needed | true | |
-| debug-resources | Whether resources usage should be printed during parallel job execution ("true"/ "false") | false | |
-| default-branch | Which branch is default for the build ("main" for main branch, "v2-4-test" for 2.4 line etc.) | main | |
-| default-constraints-branch | Which branch is default for the build ("constraints-main" for main branch, "constraints-2-4" etc.) | constraints-main | |
-| default-helm-version | Which Helm version to use as default | v3.9.4 | |
-| default-kind-version | Which Kind version to use as default | v0.16.0 | |
-| default-kubernetes-version | Which Kubernetes version to use as default | v1.25.2 | |
-| default-mysql-version | Which MySQL version to use as default | 5.7 | |
-| default-postgres-version | Which Postgres version to use as default | 10 | |
-| default-python-version | Which Python version to use as default | 3.8 | |
-| docs-build | Whether to build documentation ("true"/"false") | true | |
-| docs-list-as-string | What filter to apply to docs building - based on which documentation packages should be built | apache-airflow helm-chart google | |
-| full-tests-needed | Whether this build runs complete set of tests or only subset (for faster PR builds) [1] | false | |
-| generated-dependencies-changed | Whether generated dependencies have changed ("true"/"false") | false | |
-| helm-version | Which Helm version to use for tests | v3.9.4 | |
-| is-airflow-runner | Whether runner used is an airflow or infrastructure runner (true if airflow/false if infrastructure) | false | |
-| is-amd-runner | Whether runner used is an AMD one | true | |
-| is-arm-runner | Whether runner used is an ARM one | false | |
-| is-committer-build | Whether the build is triggered by a committer | false | |
-| is-k8s-runner | Whether the build runs on our k8s infrastructure | false | |
-| is-self-hosted-runner | Whether the runner is self-hosted | false | |
-| is-vm-runner | Whether the runner uses VM to run | true | |
-| kind-version | Which Kind version to use for tests | v0.16.0 | |
-| kubernetes-combos-list-as-string | All combinations of Python version and Kubernetes version to use for tests as space-separated string | 3.8-v1.25.2 3.9-v1.26.4 | * |
-| kubernetes-versions | All Kubernetes versions to use for tests as JSON array | ['v1.25.2'] | |
-| kubernetes-versions-list-as-string | All Kubernetes versions to use for tests as space-separated string | v1.25.2 | * |
-| mypy-folders | List of folders to be considered for mypy | [] | |
-| mysql-exclude | Which versions of MySQL to exclude for tests as JSON array | [] | |
-| mysql-versions | Which versions of MySQL to use for tests as JSON array | ['5.7'] | |
-| needs-api-codegen | Whether "api-codegen" are needed to run ("true"/"false") | true | |
-| needs-api-tests | Whether "api-tests" are needed to run ("true"/"false") | true | |
-| needs-helm-tests | Whether Helm tests are needed to run ("true"/"false") | true | |
-| needs-javascript-scans | Whether javascript CodeQL scans should be run ("true"/"false") | true | |
-| needs-mypy | Whether mypy check is supposed to run in this build | true | |
-| needs-python-scans | Whether Python CodeQL scans should be run ("true"/"false") | true | |
-| parallel-test-types-list-as-string | Which test types should be run for unit tests | API Always Providers Providers\[-google\] | * |
-| postgres-exclude | Which versions of Postgres to exclude for tests as JSON array | [] | |
-| postgres-versions | Which versions of Postgres to use for tests as JSON array | ['10'] | |
-| prod-image-build | Whether PROD image build is needed | true | |
-| prod-image-build | Whether PROD image build is needed | true | |
-| providers-compatibility-checks | List of dicts: (python_version, airflow_version, removed_providers) for compatibility checks | [] | |
-| python-versions | List of python versions to use for that build | ['3.8'] | * |
-| python-versions-list-as-string | Which versions of MySQL to use for tests as space-separated string | 3.8 | * |
-| run-amazon-tests | Whether Amazon tests should be run ("true"/"false") | true | |
-| run-kubernetes-tests | Whether Kubernetes tests should be run ("true"/"false") | true | |
-| run-tests | Whether unit tests should be run ("true"/"false") | true | |
-| run-www-tests | Whether WWW tests should be run ("true"/"false") | true | |
-| runs-on | List of labels assigned for runners for that build (used to select runners) | ["ubuntu-22.04"] | |
-| skip-pre-commits | Which pre-commits should be skipped during the static-checks run | check-provider-yaml-valid,flynt,identity | |
-| skip-provider-tests | When provider tests should be skipped (on non-main branch or when no provider changes detected) | true | |
-| sqlite-exclude | Which versions of Sqlite to exclude for tests as JSON array | [] | |
-| upgrade-to-newer-dependencies | Whether the image build should attempt to upgrade all dependencies (true/false or commit hash) | false | |
+| Output | Meaning of the output | Example value | List as string |
+|----------------------------------------|------------------------------------------------------------------------------------------------------|-------------------------------------------|----------------|
+| affected-providers-list-as-string | List of providers affected when they are selectively affected. | airbyte http | * |
+| all-python-versions | List of all python versions there are available in the form of JSON array | ['3.8', '3.9', '3.10'] | |
+| all-python-versions-list-as-string | List of all python versions there are available in the form of space separated string | 3.8 3.9 3.10 | * |
+| all-versions | If set to true, then all python, k8s, DB versions are used for tests. | false | |
+| basic-checks-only | Whether to run all static checks ("false") or only basic set of static checks ("true") | false | |
+| build_system_changed_in_pyproject_toml | When builds system dependencies changed in pyproject.toml changed in the PR. | false | |
+| cache-directive | Which cache should be used for images ("registry", "local" , "disabled") | registry | |
+| chicken-egg-providers | List of providers that should be considered as "chicken-egg" - expecting development Airflow version | | |
+| ci-image-build | Whether CI image build is needed | true | |
+| debug-resources | Whether resources usage should be printed during parallel job execution ("true"/ "false") | false | |
+| default-branch | Which branch is default for the build ("main" for main branch, "v2-4-test" for 2.4 line etc.) | main | |
+| default-constraints-branch | Which branch is default for the build ("constraints-main" for main branch, "constraints-2-4" etc.) | constraints-main | |
+| default-helm-version | Which Helm version to use as default | v3.9.4 | |
+| default-kind-version | Which Kind version to use as default | v0.16.0 | |
+| default-kubernetes-version | Which Kubernetes version to use as default | v1.25.2 | |
+| default-mysql-version | Which MySQL version to use as default | 5.7 | |
+| default-postgres-version | Which Postgres version to use as default | 10 | |
+| default-python-version | Which Python version to use as default | 3.8 | |
+| docs-build | Whether to build documentation ("true"/"false") | true | |
+| docs-list-as-string | What filter to apply to docs building - based on which documentation packages should be built | apache-airflow helm-chart google | |
+| full-tests-needed | Whether this build runs complete set of tests or only subset (for faster PR builds) [1] | false | |
+| generated-dependencies-changed | Whether generated dependencies have changed ("true"/"false") | false | |
+| hatch-build-changed | When hatch build.py changed in the PR. | false | |
+| helm-version | Which Helm version to use for tests | v3.9.4 | |
+| is-airflow-runner | Whether runner used is an airflow or infrastructure runner (true if airflow/false if infrastructure) | false | |
+| is-amd-runner | Whether runner used is an AMD one | true | |
+| is-arm-runner | Whether runner used is an ARM one | false | |
+| is-committer-build | Whether the build is triggered by a committer | false | |
+| is-k8s-runner | Whether the build runs on our k8s infrastructure | false | |
+| is-self-hosted-runner | Whether the runner is self-hosted | false | |
+| is-vm-runner | Whether the runner uses VM to run | true | |
+| kind-version | Which Kind version to use for tests | v0.16.0 | |
+| kubernetes-combos-list-as-string | All combinations of Python version and Kubernetes version to use for tests as space-separated string | 3.8-v1.25.2 3.9-v1.26.4 | * |
+| kubernetes-versions | All Kubernetes versions to use for tests as JSON array | ['v1.25.2'] | |
+| kubernetes-versions-list-as-string | All Kubernetes versions to use for tests as space-separated string | v1.25.2 | * |
+| mypy-folders | List of folders to be considered for mypy | [] | |
+| mysql-exclude | Which versions of MySQL to exclude for tests as JSON array | [] | |
+| mysql-versions | Which versions of MySQL to use for tests as JSON array | ['5.7'] | |
+| needs-api-codegen | Whether "api-codegen" are needed to run ("true"/"false") | true | |
+| needs-api-tests | Whether "api-tests" are needed to run ("true"/"false") | true | |
+| needs-helm-tests | Whether Helm tests are needed to run ("true"/"false") | true | |
+| needs-javascript-scans | Whether javascript CodeQL scans should be run ("true"/"false") | true | |
+| needs-mypy | Whether mypy check is supposed to run in this build | true | |
+| needs-python-scans | Whether Python CodeQL scans should be run ("true"/"false") | true | |
+| parallel-test-types-list-as-string | Which test types should be run for unit tests | API Always Providers Providers\[-google\] | * |
+| postgres-exclude | Which versions of Postgres to exclude for tests as JSON array | [] | |
+| postgres-versions | Which versions of Postgres to use for tests as JSON array | ['10'] | |
+| prod-image-build | Whether PROD image build is needed | true | |
+| prod-image-build | Whether PROD image build is needed | true | |
+| providers-compatibility-checks | List of dicts: (python_version, airflow_version, removed_providers) for compatibility checks | [] | |
+| pyproject-toml-changed | When pyproject.toml changed in the PR. | false | |
+| python-versions | List of python versions to use for that build | ['3.8'] | * |
+| python-versions-list-as-string | Which versions of MySQL to use for tests as space-separated string | 3.8 | * |
+| run-amazon-tests | Whether Amazon tests should be run ("true"/"false") | true | |
+| run-kubernetes-tests | Whether Kubernetes tests should be run ("true"/"false") | true | |
+| run-tests | Whether unit tests should be run ("true"/"false") | true | |
+| run-www-tests | Whether WWW tests should be run ("true"/"false") | true | |
+| runs-on | List of labels assigned for runners for that build (used to select runners) | ["ubuntu-22.04"] | |
+| skip-pre-commits | Which pre-commits should be skipped during the static-checks run | check-provider-yaml-valid,flynt,identity | |
+| skip-provider-tests | When provider tests should be skipped (on non-main branch or when no provider changes detected) | true | |
+| sqlite-exclude | Which versions of Sqlite to exclude for tests as JSON array | [] | |
+| upgrade-to-newer-dependencies | Whether the image build should attempt to upgrade all dependencies (true/false or commit hash) | false | |
[1] Note for deciding if `full tests needed` mode is enabled and provider.yaml files.
diff --git a/dev/breeze/doc/images/output_static-checks.svg b/dev/breeze/doc/images/output_static-checks.svg
index 200d53394d3e..a6c9ba8bec5a 100644
--- a/dev/breeze/doc/images/output_static-checks.svg
+++ b/dev/breeze/doc/images/output_static-checks.svg
@@ -1,4 +1,4 @@
-