Home

Awesome

<!-- 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. --> <!-- START Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->

Apache Airflow

PyPI version GitHub Build Coverage Status License PyPI - Python Version Docker Pulls Docker Stars PyPI - Downloads Artifact HUB Code style: black Twitter Follow Slack Status Contributors OSSRank

<picture width="500"> <img src="https://github.com/apache/airflow/blob/19ebcac2395ef9a6b6ded3a2faa29dc960c1e635/docs/apache-airflow/img/logos/wordmark_1.png?raw=true" alt="Apache Airflow logo" /> </picture>

Apache Airflow (or simply Airflow) is a platform to programmatically author, schedule, and monitor workflows.

When workflows are defined as code, they become more maintainable, versionable, testable, and collaborative.

Use Airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The Airflow scheduler executes your tasks on an array of workers while following the specified dependencies. Rich command line utilities make performing complex surgeries on DAGs a snap. The rich user interface makes it easy to visualize pipelines running in production, monitor progress, and troubleshoot issues when needed.

<!-- END Apache Airflow, please keep comment here to allow auto update of PyPI readme.md --> <!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

Table of contents

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Project Focus

Airflow works best with workflows that are mostly static and slowly changing. When the DAG structure is similar from one run to the next, it clarifies the unit of work and continuity. Other similar projects include Luigi, Oozie and Azkaban.

Airflow is commonly used to process data, but has the opinion that tasks should ideally be idempotent (i.e., results of the task will be the same, and will not create duplicated data in a destination system), and should not pass large quantities of data from one task to the next (though tasks can pass metadata using Airflow's XCom feature). For high-volume, data-intensive tasks, a best practice is to delegate to external services specializing in that type of work.

Airflow is not a streaming solution, but it is often used to process real-time data, pulling data off streams in batches.

Principles

<!-- START Requirements, please keep comment here to allow auto update of PyPI readme.md -->

Requirements

Apache Airflow is tested with:

Main version (dev)Stable version (2.10.3)
Python3.9, 3.10, 3.11, 3.123.8, 3.9, 3.10, 3.11, 3.12
PlatformAMD64/ARM64(*)AMD64/ARM64(*)
Kubernetes1.28, 1.29, 1.30, 1.311.27, 1.28, 1.29, 1.30
PostgreSQL13, 14, 15, 16, 1712, 13, 14, 15, 16
MySQL8.0, 8.4, Innovation8.0, 8.4, Innovation
SQLite3.15.0+3.15.0+

* Experimental

Note: MariaDB is not tested/recommended.

Note: SQLite is used in Airflow tests. Do not use it in production. We recommend using the latest stable version of SQLite for local development.

Note: Airflow currently can be run on POSIX-compliant Operating Systems. For development, it is regularly tested on fairly modern Linux Distros and recent versions of macOS. On Windows you can run it via WSL2 (Windows Subsystem for Linux 2) or via Linux Containers. The work to add Windows support is tracked via #10388, but it is not a high priority. You should only use Linux-based distros as "Production" execution environment as this is the only environment that is supported. The only distro that is used in our CI tests and that is used in the Community managed DockerHub image is Debian Bookworm.

<!-- END Requirements, please keep comment here to allow auto update of PyPI readme.md --> <!-- START Getting started, please keep comment here to allow auto update of PyPI readme.md -->

Getting started

Visit the official Airflow website documentation (latest stable release) for help with installing Airflow, getting started, or walking through a more complete tutorial.

Note: If you're looking for documentation for the main branch (latest development branch): you can find it on s.apache.org/airflow-docs.

For more information on Airflow Improvement Proposals (AIPs), visit the Airflow Wiki.

Documentation for dependent projects like provider packages, Docker image, Helm Chart, you'll find it in the documentation index.

<!-- END Getting started, please keep comment here to allow auto update of PyPI readme.md --> <!-- START Installing from PyPI, please keep comment here to allow auto update of PyPI readme.md -->

Installing from PyPI

We publish Apache Airflow as apache-airflow package in PyPI. Installing it however might be sometimes tricky because Airflow is a bit of both a library and application. Libraries usually keep their dependencies open, and applications usually pin them, but we should do neither and both simultaneously. We decided to keep our dependencies as open as possible (in pyproject.toml) so users can install different versions of libraries if needed. This means that pip install apache-airflow will not work from time to time or will produce unusable Airflow installation.

To have repeatable installation, however, we keep a set of "known-to-be-working" constraint files in the orphan constraints-main and constraints-2-0 branches. We keep those "known-to-be-working" constraints files separately per major/minor Python version. You can use them as constraint files when installing Airflow from PyPI. Note that you have to specify correct Airflow tag/version/branch and Python versions in the URL.

  1. Installing just Airflow:

Note: Only pip installation is currently officially supported.

While it is possible to install Airflow with tools like Poetry or pip-tools, they do not share the same workflow as pip - especially when it comes to constraint vs. requirements management. Installing via Poetry or pip-tools is not currently supported.

There are known issues with bazel that might lead to circular dependencies when using it to install Airflow. Please switch to pip if you encounter such problems. Bazel community works on fixing the problem in this PR <https://github.com/bazelbuild/rules_python/pull/1166>_ so it might be that newer versions of bazel will handle it.

If you wish to install Airflow using those tools, you should use the constraint files and convert them to the appropriate format and workflow that your tool requires.

pip install 'apache-airflow==2.10.3' \
 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.3/constraints-3.9.txt"
  1. Installing with extras (i.e., postgres, google)
pip install 'apache-airflow[postgres,google]==2.10.3' \
 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.3/constraints-3.9.txt"

For information on installing provider packages, check providers.

<!-- END Installing from PyPI, please keep comment here to allow auto update of PyPI readme.md --> <!-- START Official source code, please keep comment here to allow auto update of PyPI readme.md -->

Official source code

Apache Airflow is an Apache Software Foundation (ASF) project, and our official source code releases:

Following the ASF rules, the source packages released must be sufficient for a user to build and test the release provided they have access to the appropriate platform and tools.

<!-- END Official source code, please keep comment here to allow auto update of PyPI readme.md -->

Convenience packages

There are other ways of installing and using Airflow. Those are "convenience" methods - they are not "official releases" as stated by the ASF Release Policy, but they can be used by the users who do not want to build the software themselves.

Those are - in the order of most common ways people install Airflow:

All those artifacts are not official releases, but they are prepared using officially released sources. Some of those artifacts are "development" or "pre-release" ones, and they are clearly marked as such following the ASF Policy.

User Interface

Semantic versioning

As of Airflow 2.0.0, we support a strict SemVer approach for all packages released.

There are few specific rules that we agreed to that define details of versioning of the different packages:

Version Life Cycle

Apache Airflow version life cycle:

<!-- This table is automatically updated by pre-commit scripts/ci/pre_commit/supported_versions.py --> <!-- Beginning of auto-generated table -->
VersionCurrent Patch/MinorStateFirst ReleaseLimited SupportEOL/Terminated
22.10.3SupportedDec 17, 2020TBDTBD
1.101.10.15EOLAug 27, 2018Dec 17, 2020June 17, 2021
1.91.9.0EOLJan 03, 2018Aug 27, 2018Aug 27, 2018
1.81.8.2EOLMar 19, 2017Jan 03, 2018Jan 03, 2018
1.71.7.1.2EOLMar 28, 2016Mar 19, 2017Mar 19, 2017
<!-- End of auto-generated table -->

Limited support versions will be supported with security and critical bug fix only. EOL versions will not get any fixes nor support. We always recommend that all users run the latest available minor release for whatever major version is in use. We highly recommend upgrading to the latest Airflow major release at the earliest convenient time and before the EOL date.

Support for Python and Kubernetes versions

As of Airflow 2.0, we agreed to certain rules we follow for Python and Kubernetes support. They are based on the official release schedule of Python and Kubernetes, nicely summarized in the Python Developer's Guide and Kubernetes version skew policy.

  1. We drop support for Python and Kubernetes versions when they reach EOL. Except for Kubernetes, a version stays supported by Airflow if two major cloud providers still provide support for it. We drop support for those EOL versions in main right after EOL date, and it is effectively removed when we release the first new MINOR (Or MAJOR if there is no new MINOR version) of Airflow. For example, for Python 3.9 it means that we will drop support in main right after 27.06.2023, and the first MAJOR or MINOR version of Airflow released after will not have it.

  2. We support a new version of Python/Kubernetes in main after they are officially released, as soon as we make them work in our CI pipeline (which might not be immediate due to dependencies catching up with new versions of Python mostly) we release new images/support in Airflow based on the working CI setup.

  3. This policy is best-effort which means there may be situations where we might terminate support earlier if circumstances require it.

Base OS support for reference Airflow images

The Airflow Community provides conveniently packaged container images that are published whenever we publish an Apache Airflow release. Those images contain:

The version of the base OS image is the stable version of Debian. Airflow supports using all currently active stable versions - as soon as all Airflow dependencies support building, and we set up the CI pipeline for building and testing the OS version. Approximately 6 months before the end-of-regular support of a previous stable version of the OS, Airflow switches the images released to use the latest supported version of the OS.

For example switch from Debian Bullseye to Debian Bookworm has been implemented before 2.8.0 release in October 2023 and Debian Bookworm will be the only option supported as of Airflow 2.10.0.

Users will continue to be able to build their images using stable Debian releases until the end of regular support and building and verifying of the images happens in our CI but no unit tests were executed using this image in the main branch.

Approach to dependencies of Airflow

Airflow has a lot of dependencies - direct and transitive, also Airflow is both - library and application, therefore our policies to dependencies has to include both - stability of installation of application, but also ability to install newer version of dependencies for those users who develop DAGs. We developed the approach where constraints are used to make sure airflow can be installed in a repeatable way, while we do not limit our users to upgrade most of the dependencies. As a result we decided not to upper-bound version of Airflow dependencies by default, unless we have good reasons to believe upper-bounding them is needed because of importance of the dependency as well as risk it involves to upgrade specific dependency. We also upper-bound the dependencies that we know cause problems.

The constraint mechanism of ours takes care about finding and upgrading all the non-upper bound dependencies automatically (providing that all the tests pass). Our main build failures will indicate in case there are versions of dependencies that break our tests - indicating that we should either upper-bind them or that we should fix our code/tests to account for the upstream changes from those dependencies.

Whenever we upper-bound such a dependency, we should always comment why we are doing it - i.e. we should have a good reason why dependency is upper-bound. And we should also mention what is the condition to remove the binding.

Approach for dependencies for Airflow Core

Those dependencies are maintained in pyproject.toml.

There are few dependencies that we decided are important enough to upper-bound them by default, as they are known to follow predictable versioning scheme, and we know that new versions of those are very likely to bring breaking changes. We commit to regularly review and attempt to upgrade to the newer versions of the dependencies as they are released, but this is manual process.

The important dependencies are:

Approach for dependencies in Airflow Providers and extras

The main part of the Airflow is the Airflow Core, but the power of Airflow also comes from a number of providers that extend the core functionality and are released separately, even if we keep them (for now) in the same monorepo for convenience. You can read more about the providers in the Providers documentation. We also have set of policies implemented for maintaining and releasing community-managed providers as well as the approach for community vs. 3rd party providers in the providers document.

Those extras and providers dependencies are maintained in provider.yaml of each provider.

By default, we should not upper-bound dependencies for providers, however each provider's maintainer might decide to add additional limits (and justify them with comment).

<!-- START Contributing, please keep comment here to allow auto update of PyPI readme.md -->

Contributing

Want to help build Apache Airflow? Check out our contributors' guide for a comprehensive overview of how to contribute, including setup instructions, coding standards, and pull request guidelines.

If you can't wait to contribute, and want to get started asap, check out the contribution quickstart here!

Official Docker (container) images for Apache Airflow are described in images.

<!-- END Contributing, please keep comment here to allow auto update of PyPI readme.md --> <!-- START Who uses Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->

Voting Policy

Who uses Apache Airflow?

We know about around 500 organizations that are using Apache Airflow (but there are likely many more) in the wild.

If you use Airflow - feel free to make a PR to add your organisation to the list.

<!-- END Who uses Apache Airflow, please keep comment here to allow auto update of PyPI readme.md --> <!-- START Who maintains Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->

Who maintains Apache Airflow?

Airflow is the work of the community, but the core committers/maintainers are responsible for reviewing and merging PRs as well as steering conversations around new feature requests. If you would like to become a maintainer, please review the Apache Airflow committer requirements.

<!-- END Who maintains Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->

What goes into the next release?

Often you will see an issue that is assigned to specific milestone with Airflow version, or a PR that gets merged to the main branch and you might wonder which release the merged PR(s) will be released in or which release the fixed issues will be in. The answer to this is as usual - it depends on various scenarios. The answer is different for PRs and Issues.

To add a bit of context, we are following the Semver versioning scheme as described in Airflow release process. More details are explained in detail in this README under the Semantic versioning chapter, but in short, we have MAJOR.MINOR.PATCH versions of Airflow.

Generally we release MINOR versions of Airflow from a branch that is named after the MINOR version. For example 2.7.* releases are released from v2-7-stable branch, 2.8.* releases are released from v2-8-stable branch, etc.

  1. Most of the time in our release cycle, when the branch for next MINOR branch is not yet created, all PRs merged to main (unless they get reverted), will find their way to the next MINOR release. For example if the last release is 2.7.3 and v2-8-stable branch is not created yet, the next MINOR release is 2.8.0 and all PRs merged to main will be released in 2.8.0. However, some PRs (bug-fixes and doc-only changes) when merged, can be cherry-picked to current MINOR branch and released in the next PATCHLEVEL release. For example, if 2.8.1 is already released and we are working on 2.9.0dev, then marking a PR with 2.8.2 milestone means that it will be cherry-picked to v2-8-test branch and released in 2.8.2rc1, and eventually in 2.8.2.

  2. When we prepare for the next MINOR release, we cut new v2-*-test and v2-*-stable branch and prepare alpha, beta releases for the next MINOR version, the PRs merged to main will still be released in the next MINOR release until rc version is cut. This is happening because the v2-*-test and v2-*-stable branches are rebased on top of main when next beta and rc releases are prepared. For example, when we cut 2.10.0beta1 version, anything merged to main before 2.10.0rc1 is released, will find its way to 2.10.0rc1.

  3. Then, once we prepare the first RC candidate for the MINOR release, we stop moving the v2-*-test and v2-*-stable branches and the PRs merged to main will be released in the next MINOR release. However, some PRs (bug-fixes and doc-only changes) when merged, can be cherry-picked to current MINOR branch and released in the next PATCHLEVEL release - for example when the last released version from v2-10-stable branch is 2.10.0rc1, some of the PRs from main can be marked as 2.10.0 milestone by committers, the release manager will try to cherry-pick them into the release branch. If successful, they will be released in 2.10.0rc2 and subsequently in 2.10.0. This also applies to subsequent PATCHLEVEL versions. When for example 2.10.1 is already released, marking a PR with 2.10.2 milestone will mean that it will be cherry-picked to v2-10-stable branch and released in 2.10.2rc1 and eventually in 2.10.2.

The final decision about cherry-picking is made by the release manager.

Marking issues with a milestone is a bit different. Maintainers do not mark issues with a milestone usually, normally they are only marked in PRs. If PR linked to the issue (and "fixing it") gets merged and released in a specific version following the process described above, the issue will be automatically closed, no milestone will be set for the issue, you need to check the PR that fixed the issue to see which version it was released in.

However, sometimes maintainers mark issues with specific milestone, which means that the issue is important to become a candidate to take a look when the release is being prepared. Since this is an Open-Source project, where basically all contributors volunteer their time, there is no guarantee that specific issue will be fixed in specific version. We do not want to hold the release because some issue is not fixed, so in such case release manager will reassign such unfixed issues to the next milestone in case they are not fixed in time for the current release. Therefore, the milestone for issue is more of an intent that it should be looked at, than promise it will be fixed in the version.

More context and FAQ about the patchlevel release can be found in the What goes into the next release document in the dev folder of the repository.

Can I use the Apache Airflow logo in my presentation?

Yes! Be sure to abide by the Apache Foundation trademark policies and the Apache Airflow Brandbook. The most up-to-date logos are found in this repo and on the Apache Software Foundation website.

Links

Sponsors

The CI infrastructure for Apache Airflow has been sponsored by:

<!-- Ordered by most recently "funded" -->

<a href="https://astronomer.io"><img src="https://assets2.astronomer.io/logos/logoForLIGHTbackground.png" alt="astronomer.io" width="250px"></a> <a href="https://aws.amazon.com/opensource/"><img src="docs/integration-logos/aws/AWS-Cloud-alt_light-bg@4x.png" alt="AWS OpenSource" width="130px"></a>

<!-- telemetry/analytics pixel: --> <img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=1b5a5e3c-da81-42f5-befa-42d836bf1b54" alt="Tracking Pixel" />