Package: pano-airflow
Apache AirflowApache 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.Table of contentsProject FocusPrinciplesRequirementsGetting startedInstalling from PyPIOfficial source codeConvenience packagesUser InterfaceSemantic versioningVersion Life CycleSupport for Python and Kubernetes versionsBase OS support for reference Airflow imagesApproach to dependencies of AirflowContributingWho uses Apache Airflow?Who Maintains Apache Airflow?Can I use the Apache Airflow logo in my presentation?Airflow merchandiseLinksSponsorsProject FocusAirflow 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,OozieandAzkaban.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.PrinciplesDynamic: Airflow pipelines are configuration as code (Python), allowing for dynamic pipeline generation. This allows for writing code that instantiates pipelines dynamically.Extensible: Easily define your own operators, executors and extend the library so that it fits the level of abstraction that suits your environment.Elegant: Airflow pipelines are lean and explicit. Parameterizing your scripts is built into the core of Airflow using the powerfulJinjatemplating engine.Scalable: Airflow has a modular architecture and uses a message queue to orchestrate an arbitrary number of workers.RequirementsApache Airflow is tested with:Main version (dev)Stable version (2.6.0)Python3.7, 3.8, 3.9, 3.103.7, 3.8, 3.9, 3.10PlatformAMD64/ARM64(*)AMD64/ARM64(*)Kubernetes1.23, 1.24, 1.25, 1.261.21, 1.22, 1.23, 1.24, 1.25PostgreSQL11, 12, 13, 14, 1511, 12, 13, 14, 15MySQL5.7, 85.7, 8SQLite3.15.0+3.15.0+MSSQL2017(*), 2019(*)2017(*), 2019(*)* ExperimentalNote: MySQL 5.x versions are unable to or have limitations with
running multiple schedulers -- please see theScheduler docs.
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#10388but
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 theCommunity managed DockerHub imageisDebian Bullseye.Getting startedVisit the official Airflow website documentation (lateststablerelease) for help withinstalling Airflow,getting started, or walking
through 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), visit
theAirflow Wiki.Documentation for dependent projects like provider packages, Docker image, Helm Chart, you'll find it inthe documentation index.Installing from PyPIWe publish Apache Airflow asapache-airflowpackage 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 (insetup.py) so users can install different versions of libraries
if needed. This means thatpip install apache-airflowwill 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 orphanconstraints-mainandconstraints-2-0branches. 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.Installing just Airflow:Note: Onlypipinstallation is currently officially supported.While it is possible to install Airflow with tools likePoetryorpip-tools, they do not share the same workflow aspip- especially when it comes to constraint vs. requirements management.
Installing viaPoetryorpip-toolsis not currently supported.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.pipinstall'apache-airflow==2.6.0'\--constraint"https://raw.githubusercontent.com/apache/airflow/constraints-2.6.0/constraints-3.7.txt"Installing with extras (i.e., postgres, google)pipinstall'apache-airflow[postgres,google]==2.6.0'\--constraint"https://raw.githubusercontent.com/apache/airflow/constraints-2.6.0/constraints-3.7.txt"For information on installing provider packages, checkproviders.Official source codeApache Airflow is anApache Software Foundation(ASF) project,
and our official source code releases:Follow theASF Release PolicyCan be downloaded fromthe ASF Distribution DirectoryAre cryptographically signed by the release managerAre officially voted on by the PMC members during theRelease Approval ProcessFollowing 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.Convenience packagesThere are other ways of installing and using Airflow. Those are "convenience" methods - they are
not "official releases" as stated by theASF 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:PyPI releasesto install Airflow using standardpiptoolDocker Imagesto install airflow viadockertool, use them in Kubernetes, Helm Charts,docker-compose,docker swarm, etc. You can
read more about using, customising, and extending the images in theLatest docs, and
learn details on the internals in theIMAGES.rstdocument.Tags in GitHubto retrieve the git project sources that
were used to generate official source packages via gitAll 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 InterfaceDAGs: Overview of all DAGs in your environment.Grid: Grid representation of a DAG that spans across time.Graph: Visualization of a DAG's dependencies and their current status for a specific run.Task Duration: Total time spent on different tasks over time.Gantt: Duration and overlap of a DAG.Code: Quick way to view source code of a DAG.Semantic versioningAs of Airflow 2.0.0, we support a strictSemVerapproach for all packages released.There are few specific rules that we agreed to that define details of versioning of the different
packages: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.0andamazon 3.0.3providers can happily be installed
withAirflow 2.1.2. If there are limits of cross-dependencies between providers and Airflow packages,
they are present in providers asinstall_requireslimitations. We aim to keep backwards
compatibility of providers with all previously released Airflow 2 versions but
there will sometimes be breaking changes that might make some, or all
providers, have minimum Airflow version specified. Change of that minimum supported Airflow version
is a breaking change for provider because installing the new provider might automatically
upgrade Airflow (which might be an undesired side effect of upgrading provider).Airflow Helm Chart: SemVer rules apply to changes in the chart only. SemVer MAJOR and MINOR
versions for the chart are independent from the Airflow version. We aim to keep backwards
compatibility of the Helm Chart with all released Airflow 2 versions, but some new features might
only work starting from specific Airflow releases. We might however limit the Helm
Chart to depend on minimal Airflow version.Airflow API clients: SemVer MAJOR and MINOR versions follow MAJOR and MINOR versions of Airflow.
The first MAJOR or MINOR X.Y.0 release of Airflow should always be followed by X.Y.0 release of
all clients. An airflow PATCH X.Y.Z release can be followed by a PATCH release of API clients, only
if this PATCH is relevant to the clients.
The clients then can release their own PATCH releases with bugfixes, independently of Airflow PATCH releases.
As a consequence, each API client will have its own PATCH version that may or may not be in sync with the Airflow
PATCH version. For a specific MAJOR/MINOR Airflow version, users should favor the latest PATCH version of clients
independently of their Airflow PATCH version.Version Life CycleApache Airflow version life cycle:VersionCurrent Patch/MinorStateFirst ReleaseLimited SupportEOL/Terminated22.6.0SupportedDec 17, 2020TBDTBD1.101.10.15EOLAug 27, 2018Dec 17, 2020June 17, 20211.91.9.0EOLJan 03, 2018Aug 27, 2018Aug 27, 20181.81.8.2EOLMar 19, 2017Jan 03, 2018Jan 03, 20181.71.7.1.2EOLMar 28, 2016Mar 19, 2017Mar 19, 2017Limited 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.
Wehighlyrecommend upgrading to the latest Airflow major release at the earliest convenient time and before the EOL date.Support for Python and Kubernetes versionsAs 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 GuideandKubernetes version skew policy.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.7 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.The "oldest" supported version of Python/Kubernetes is the default one until we decide to switch to
later version. "Default" is only meaningful in terms of "smoke tests" in CI PRs, which are run using this
default version and the default reference image available. Currentlyapache/airflow:latestandapache/airflow:2.6.0images are Python 3.7 images. This means that default reference image will
become the default at the time when we start preparing for dropping 3.7 support which is few months
before the end of life for Python 3.7.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.Base OS support for reference Airflow imagesThe Airflow Community provides conveniently packaged container images that are published whenever
we 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 of
Airflow 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 depends
on 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 providers
and libraries (seeBuilding the image)In the future Airflow might also support a "slim" version without providers nor database clients installedThe 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-life of a previous stable
version of the OS, Airflow switches the images released to use the latest supported version of the OS.
For example sinceDebian Busterend-of-life was August 2022, Airflow switched the images inmainbranch
to useDebian Bullseyein February/March 2022. The version was used in the next MINOR release after
the switch happened. In case of the Bullseye switch - 2.3.0 version usedDebian Bullseye.
The images released  in the previous MINOR version continue to use the version that all other releases
for the MINOR version used.Support forDebian Busterimage was dropped in August 2022 completely and everyone is expected to
stop building their images usingDebian Buster.Users will continue to be able to build their images using stable Debian releases until the end of life and
building and verifying of the images happens in our CI but no unit tests were executed using this image in
themainbranch.Approach to dependencies of AirflowAirflow 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 whereconstraintsare 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). Ourmainbuild 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 CoreThoseextrasandprovidersdependencies are maintained insetup.cfg.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:SQLAlchemy: upper-bound to specific MINOR version (SQLAlchemy is known to remove deprecations and
introduce breaking changes especially that support for different Databases varies and changes at
various speed (example: SQLAlchemy 1.4 broke MSSQL integration for Airflow)Alembic: it is important to handle our migrations in predictable and performant way. It is developed
together with SQLAlchemy. Our experience with Alembic is that it very stable in MINOR versionFlask: We are using Flask as the back-bone of our web UI and API. We know major version of Flask
are very likely to introduce breaking changes across those so limiting it to MAJOR version makes sensewerkzeug: the library is known to cause problems in new versions. It is tightly coupled with Flask
libraries, and we should update them togethercelery: Celery is crucial component of Airflow as it used for CeleryExecutor (and similar). Celeryfollows 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 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 extrasThe 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 theProviders 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 theprovidersdocument.Thoseextrasandprovidersdependencies are maintained inprovider.yamlof 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).ContributingWant to help build Apache Airflow? Check out ourcontributing documentation.Official Docker (container) images for Apache Airflow are described inIMAGES.rst.Who uses Apache Airflow?More than 400 organizations are using Apache Airflowin the wild.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.Can I use the Apache Airflow logo in my presentation?Yes! Be sure to abide by the Apache Foundationtrademark policiesand the Apache AirflowBrandbook. The most up to date logos are found inthis repoand on the Apache Software Foundationwebsite.Airflow merchandiseIf you would love to have Apache Airflow stickers, t-shirt, etc. then check outRedbubble Shop.LinksDocumentationChatSponsorsThe CI infrastructure for Apache Airflow has been sponsored by: