Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

License

NotificationsYou must be signed in to change notification settings

apache/airflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Badges
LicenseLicense
PyPIPyPI versionPyPI - Python VersionPyPI - Downloads
ContainersDocker PullsDocker StarsArtifact HUB
CommunityContributorsSlack StatusCommit ActivityOSSRank
VersionBuild Status
MainGitHub Build mainGitHub Build main
3.xGitHub Build 3.0GitHub Build 3.0
2.xGitHub Build 2.11
Apache Airflow logo

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 (Dags) that orchestrate 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.

Table of contents

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 includeLuigi,Oozie andAzkaban.

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'sXCom 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

  • Dynamic: Pipelines are defined in code, enabling dynamic dag generation and parameterization.
  • Extensible: The Airflow framework includes a wide range of built-in operators and can be extended to fit your needs.
  • Flexible: Airflow leverages theJinja templating engine, allowing rich customizations.

Requirements

Apache Airflow is tested with:

Main version (dev)Stable version (3.0.3)
Python3.10, 3.11, 3.12, 3.133.9, 3.10, 3.11, 3.12
PlatformAMD64/ARM64(*)AMD64/ARM64(*)
Kubernetes1.30, 1.31, 1.32, 1.331.30, 1.31, 1.32, 1.33
PostgreSQL13, 14, 15, 16, 1713, 14, 15, 16, 17
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 recommendusing the latest stable version of SQLite for local development.

Note: Airflow currently can be run on POSIX-compliant Operating Systems. For development, it is regularlytested 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, butit is not a high priority. You should only use Linux-based distros as "Production" execution environmentas this is the only environment that is supported. The only distro that is used in our CI tests and thatis used in theCommunity managed DockerHub image isDebian Bookworm.

Getting started

Visit the official Airflow website documentation (lateststable release) for help withinstalling Airflow,getting started, or walkingthrough a more completetutorial.

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

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

Documentation for dependent projects like provider distributions, Docker image, Helm Chart, you'll find it inthe documentation index.

Installing from PyPI

We publish Apache Airflow asapache-airflow package in PyPI. Installing it however might be sometimes trickybecause Airflow is a bit of both a library and application. Libraries usually keep their dependencies open, andapplications usually pin them, but we should do neither and both simultaneously. We decided to keepour dependencies as open as possible (inpyproject.toml) so users can install different versions of librariesif needed. This means thatpip install apache-airflow will not work from time to time or willproduce unusable Airflow installation.

To have repeatable installation, however, we keep a set of "known-to-be-working" constraintfiles in the orphanconstraints-main andconstraints-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 specifycorrect Airflow tag/version/branch and Python versions in the URL.

  1. Installing just Airflow:

Note: Onlypip installation is currently officially supported.

While it is possible to install Airflow with tools likePoetry orpip-tools, they do not share the same workflow aspip - especially when it comes to constraint vs. requirements management.Installing viaPoetry orpip-tools is not currently supported.

There are known issues withbazel that might lead to circular dependencies when using it to installAirflow. Please switch topip if you encounter such problems.Bazel community works on fixingthe problem inthis PR <https://github.com/bazelbuild/rules_python/pull/1166>_ so it might be thatnewer versions ofbazel will handle it.

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

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

For information on installing provider distributions, checkproviders.

Installation

For comprehensive instructions on setting up your local development environment and installing Apache Airflow, please refer to theINSTALLING.md file.

Official source code

Apache Airflow is anApache 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 therelease provided they have access to the appropriate platform and tools.

Convenience packages

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

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

  • PyPI releases to install Airflow using standardpip tool
  • Docker Images to install airflow viadocker tool, use them in Kubernetes, Helm Charts,docker-compose,docker swarm, etc. You canread more about using, customizing, and extending the images in theLatest docs, andlearn details on the internals in theimages document.
  • Tags in GitHub to retrieve the git project sources thatwere used to generate official source packages via git

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 suchfollowing the ASF Policy.

User Interface

  • DAGs: Overview of all DAGs in your environment.

    DAGs

  • Assets: Overview of Assets with dependencies.

    Asset Dependencies

  • Grid: Grid representation of a DAG that spans across time.

    Grid

  • Graph: Visualization of a DAG's dependencies and their current status for a specific run.

    Graph

  • Home: Summary statistics of your Airflow environment.

    Home

  • Backfill: Backfilling a DAG for a specific date range.

    Backfill

  • Code: Quick way to view source code of a DAG.

    Code

Semantic versioning

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

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

  • Airflow: SemVer rules apply to core airflow only (excludes any changes to providers).Changing limits for versions of Airflow dependencies is not a breaking change on its own.
  • Airflow Providers: SemVer rules apply to changes in the particular provider's code only.SemVer MAJOR and MINOR versions for the packages are independent of the Airflow version.For example,google 4.1.0 andamazon 3.0.3 providers can happily be installedwithAirflow 2.1.2. If there are limits of cross-dependencies between providers and Airflow packages,they are present in providers asinstall_requires limitations. We aim to keep backwardscompatibility of providers with all previously released Airflow 2 versions butthere will sometimes be breaking changes that might make some, or allproviders, have minimum Airflow version specified.
  • Airflow Helm Chart: SemVer rules apply to changes in the chart only. SemVer MAJOR and MINORversions for the chart are independent of the Airflow version. We aim to keep backwardscompatibility of the Helm Chart with all released Airflow 2 versions, but some new features mightonly work starting from specific Airflow releases. We might however limit the HelmChart to depend on minimal Airflow version.
  • Airflow API clients: Their versioning is independent from Airflow versions. They follow their ownSemVer rules for breaking changes and new features - which for example allows to change the way we generatethe clients.

Version Life Cycle

Apache Airflow version life cycle:

VersionCurrent Patch/MinorStateFirst ReleaseLimited MaintenanceEOL/Terminated
33.0.3SupportedApr 22, 2025TBDTBD
22.11.0SupportedDec 17, 2020Oct 22, 2025Apr 22, 2026
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

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.Wehighly 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 thePython Developer's Guide andKubernetes version skew policy.

  1. We drop support for Python and Kubernetes versions when they reach EOL. Except for Kubernetes, aversion stays supported by Airflow if two major cloud providers still provide support for it. We dropsupport for those EOL versions in main right after EOL date, and it is effectively removed when we releasethe first new MINOR (Or MAJOR if there is no new MINOR version) of Airflow. For example, for Python 3.10 itmeans that we will drop support in main right after 27.06.2023, and the first MAJOR or MINOR version ofAirflow 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 wemake them work in our CI pipeline (which might not be immediate due to dependencies catching up withnew 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 earlierif circumstances require it.

Base OS support for reference Airflow images

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

  • Base OS with necessary packages to install Airflow (stable Debian OS)
  • Base Python installation in versions supported at the time of release for the MINOR version ofAirflow released (so there could be different versions for 2.3 and 2.2 line for example)
  • Libraries required to connect to supported Databases (again the set of databases supported dependson the MINOR version of Airflow)
  • Predefined set of popular providers (for details see theDockerfile).
  • Possibility of building your own, custom image where the user can choose their own set of providersand libraries (seeBuilding the image)
  • In the future Airflow might also support a "slim" version without providers nor database clients installed

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

For example switch fromDebian Bullseye toDebian Bookworm has been implementedbefore 2.8.0 release in October 2023 andDebian Bookworm will be the only option supported as ofAirflow 2.10.0.

Users will continue to be able to build their images using stable Debian releases until the end of regularsupport and building and verifying of the images happens in our CI but no unit tests were executed usingthis image in themain 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 developedthe approach whereconstraints are used to make sure airflow can be installed in a repeatable way, whilewe do not limit our users to upgrade most of the dependencies. As a result we decided not to upper-boundversion of Airflow dependencies by default, unless we have good reasons to believe upper-bounding them isneeded 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 dependenciesautomatically (providing that all the tests pass). Ourmain build failures will indicate in case thereare versions of dependencies that break our tests - indicating that we should either upper-bind them orthat 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 havea good reason why dependency is upper-bound. And we should also mention what is the condition to remove thebinding.

Approach for dependencies for Airflow Core

Those dependencies are maintained inpyproject.toml.

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

The important dependencies are:

  • SQLAlchemy: upper-bound to specific MINOR version (SQLAlchemy is known to remove deprecations andintroduce breaking changes especially that support for different Databases varies and changes atvarious speed)
  • Alembic: it is important to handle our migrations in predictable and performant way. It is developedtogether with SQLAlchemy. Our experience with Alembic is that it very stable in MINOR version
  • Flask: We are using Flask as the back-bone of our web UI and API. We know major version of Flaskare very likely to introduce breaking changes across those so limiting it to MAJOR version makes sense
  • werkzeug: the library is known to cause problems in new versions. It is tightly coupled with Flasklibraries, and we should update them together
  • celery: Celery is a crucial component of Airflow as it used for CeleryExecutor (and similar). Celeryfollows SemVer, sowe should upper-bound it to the next MAJOR version. Also, when we bump the upper version of the library,we should make sure Celery Provider minimum Airflow version is updated.
  • kubernetes: Kubernetes is a crucial component of Airflow as it is used for the KubernetesExecutor(and similar). Kubernetes Python libraryfollows SemVer,so we should upper-bound it to the next MAJOR version. Also, when we bump the upper version of the library,we should make sure Kubernetes Provider minimum Airflow version is updated.

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 ofproviders 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 theProviders documentation. We alsohave set of policies implemented for maintaining and releasing community-managed providers as wellas the approach for community vs. 3rd party providers in theproviders document.

Thoseextras andproviders dependencies are maintained inprovider.yaml of each provider.

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

Contributing

Want to help build Apache Airflow? Check out ourcontributors' 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 thecontribution quickstart here!

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

Voting Policy

  • Commits need a +1 vote from a committer who is not the author
  • When we do AIP voting, both PMC member's and committer's+1s are considered a binding vote.

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.

Who maintains Apache Airflow?

Airflow is the work of thecommunity,but thecore committers/maintainersare 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 Airflowcommitter requirements.

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 mergedto the main branch and you might wonder which release the merged PR(s) will be released in or which release the fixedissues 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 theSemver versioning scheme as described inAirflow release process. Moredetails are explained in detail in this README under theSemantic versioning chapter, butin short, we haveMAJOR.MINOR.PATCH versions of Airflow.

  • MAJOR version is incremented in case of breaking changes
  • MINOR version is incremented when there are new features added
  • PATCH version is incremented when there are only bug-fixes and doc-only changes

Generally we releaseMINOR versions of Airflow from a branch that is named after the MINOR version. For example2.7.* releases are released fromv2-7-stable branch,2.8.* releases are released fromv2-8-stablebranch, etc.

  1. Most of the time in our release cycle, when the branch for nextMINOR branch is not yet created, allPRs merged tomain (unless they get reverted), will find their way to the nextMINOR release. For exampleif the last release is2.7.3 andv2-8-stable branch is not created yet, the nextMINOR releaseis2.8.0 and all PRs merged to main will be released in2.8.0. However, some PRs (bug-fixes anddoc-only changes) when merged, can be cherry-picked to currentMINOR branch and released in thenextPATCHLEVEL release. For example, if2.8.1 is already released and we are working on2.9.0dev, thenmarking a PR with2.8.2 milestone means that it will be cherry-picked tov2-8-test branch andreleased in2.8.2rc1, and eventually in2.8.2.

  2. When we prepare for the nextMINOR release, we cut newv2-*-test andv2-*-stable branchand preparealpha,beta releases for the nextMINOR version, the PRs merged to main will still bereleased in the nextMINOR release untilrc version is cut. This is happening because thev2-*-testandv2-*-stable branches are rebased on top of main when nextbeta andrc releases are prepared.For example, when we cut2.10.0beta1 version, anything merged to main before2.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 thev2-*-test andv2-*-stable branches and the PRs merged to main will be released in the nextMINOR release.However, some PRs (bug-fixes and doc-only changes) when merged, can be cherry-picked to currentMINORbranch and released in the nextPATCHLEVEL release - for example when the last released version fromv2-10-stablebranch is2.10.0rc1, some of the PRs from main can be marked as2.10.0 milestone by committers,the release manager will try to cherry-pick them into the release branch.If successful, they will be released in2.10.0rc2 and subsequently in2.10.0. This also applies tosubsequentPATCHLEVEL versions. When for example2.10.1 is already released, marking a PR with2.10.2 milestone will mean that it will be cherry-picked tov2-10-stable branch and released in2.10.2rc1and eventually in2.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 releasedin a specific version following the process described above, the issue will be automatically closed, nomilestone will be set for the issue, you need to check the PR that fixed the issue to see which versionit was released in.

However, sometimes maintainers mark issues with specific milestone, which means that theissue is important to become a candidate to take a look when the release is being prepared. Since this is anOpen-Source project, where basically all contributors volunteer their time, there is no guarantee that specificissue 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 notfixed in time for the current release. Therefore, the milestone for issue is more of an intent that it should belooked at, than promise it will be fixed in the version.

More context andFAQ about the patchlevel release can be found in theWhat goes into the next release document in thedev folder of therepository.

Can I use the Apache Airflow logo in my presentation?

Yes! Be sure to abide by the Apache Foundationtrademark policies and the Apache AirflowBrandbook. The most up-to-date logos are found inthis repo and on the Apache Software Foundationwebsite.

Links

Sponsors

The CI infrastructure for Apache Airflow has been sponsored by:

astronomer.ioAWS OpenSource

Packages

 
 
 

[8]ページ先頭

©2009-2025 Movatter.jp