You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by jh...@apache.org on 2021/08/11 23:07:44 UTC
[airflow] 06/11: Switches to "/" convention in ghcr.io images
(#17356)
This is an automated email from the ASF dual-hosted git repository.
jhtimmins pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit d5f0b1ad9b96d51c64d1c33b783528a7d4946c0e
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Thu Aug 5 18:39:43 2021 +0200
Switches to "/" convention in ghcr.io images (#17356)
We are using ghcr.io as image cache for our CI builds and Breeze
and it seems ghcr.io is being "rebuilt" while running.
We had been using "airflow-.." image convention before,
bacause multiple nesting levels of images were not supported,
however we experienced errors recently with pushing 2.1 images
(https://issues.apache.org/jira/browse/INFRA-22124) and during
investigation it turned out, that it is possible now to use "/"
in the name of the image, and while it still does not introduce
multiple nesting levels and folder structure, the UI of GitHub
treats it like that and if you have image which starts wiht
"airflow/", the airflow prefix is stripped out and you can also
have even more "/" in then name to introduce further hierarchy.
Since we have to change image naming convention due to (still
unresolved) bug with no permission to push the v2-1-test image
we've decided to change naming convention for all our cache
images to follow this - now available - "/" connvention to make
it better structured and easier to manage/understand.
Some more optimisations are implemented - Python, prod-build and
ci-manifest images are only pushed when "latest" image is prepared.
They are not needed for the COMMIT builds because we only need
final images for those builds. This simplified the code quite
a bit.
The push of cache image in CI is done in one job for both
CI and PROD images and the image is rebuilt again with
latest constraints, to account for the latest constraints
but to make sure that UPGRADE_TO_NEWER_DEPENDENCIES
is not set during the build (which invalidates the cache
for next non-upgrade builds)
Backwards-compatibility was implemented to allow PRs that have
not been upgraded to continue building after this one is merged,
also a workaround has been implemented to make this change
to work even if it is not merged yet to main.
This "legacy" mode will be removed in ~week when everybody rebase
on top of main.
Documentation is updated reflecting those changes.
(cherry picked from commit 1bd3a5c68c88cf3840073d6276460a108f864187)
---
.github/workflows/build-images.yml | 4 +-
README.md | 123 ++++++++++++---------
scripts/ci/images/ci_prepare_ci_image_on_ci.sh | 2 +-
scripts/ci/images/ci_prepare_prod_image_on_ci.sh | 2 +-
.../ci/images/ci_wait_for_and_verify_ci_image.sh | 6 +-
.../ci/images/ci_wait_for_and_verify_prod_image.sh | 6 +-
scripts/ci/libraries/_build_images.sh | 2 +-
scripts/ci/libraries/_push_pull_remove_images.sh | 2 +-
8 files changed, 83 insertions(+), 64 deletions(-)
diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml
index d2a7b97..c2a9054 100644
--- a/.github/workflows/build-images.yml
+++ b/.github/workflows/build-images.yml
@@ -203,7 +203,7 @@ jobs:
run: ./scripts/ci/images/ci_prepare_ci_image_on_ci.sh
- name: "Push CI images ${{ matrix.python-version }}:${{ env.TARGET_COMMIT_SHA }}"
run: ./scripts/ci/images/ci_push_ci_images.sh
- # Remove me ~ 7 August 2021
+ # Remove me on 15th of August 2021 after all users had chance to rebase
- name: "Push Legacy CI images ${{ matrix.python-version }}:${{ env.TARGET_COMMIT_SHA }}"
run: ./scripts/ci/images/ci_push_legacy_ci_images.sh
if: github.event_name == 'pull_request_target'
@@ -296,7 +296,7 @@ jobs:
env:
# GITHUB_REGISTRY_PULL_IMAGE_TAG is overriden to latest in order to build PROD image using "latest"
GITHUB_REGISTRY_PULL_IMAGE_TAG: "latest"
- # Remove me ~ 7 August 2021
+ # Remove me on 15th of August 2021 after all users had chance to rebase
- name: "Push Legacy PROD images ${{ matrix.python-version }}:${{ env.TARGET_COMMIT_SHA }}"
run: ./scripts/ci/images/ci_push_legacy_prod_images.sh
if: github.event_name == 'pull_request_target'
diff --git a/README.md b/README.md
index d58a39f..8ab1d2b 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,7 @@
[](https://hub.docker.com/r/apache/airflow)
[](https://hub.docker.com/r/apache/airflow)
[](https://pypi.org/project/apache-airflow/)
+[](https://artifacthub.io/packages/search?repo=apache-airflow)
[](https://github.com/psf/black)
[](https://twitter.com/ApacheAirflow)
[](https://s.apache.org/airflow-slack)
@@ -44,19 +45,21 @@ Use Airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The
- [Project Focus](#project-focus)
- [Principles](#principles)
- [Requirements](#requirements)
-- [Support for Python and Kubernetes versions](#support-for-python-and-kubernetes-versions)
- [Getting started](#getting-started)
- [Installing from PyPI](#installing-from-pypi)
- [Official source code](#official-source-code)
- [Convenience packages](#convenience-packages)
- [User Interface](#user-interface)
-- [Support for Python and Kubernetes versions](#support-for-python-and-kubernetes-versions-1)
+- [Semantic versioning](#semantic-versioning)
+- [Version Life Cycle](#version-life-cycle)
+- [Support for Python and Kubernetes versions](#support-for-python-and-kubernetes-versions)
- [Contributing](#contributing)
- [Who uses Apache Airflow?](#who-uses-apache-airflow)
- [Who Maintains Apache Airflow?](#who-maintains-apache-airflow)
- [Can I use the Apache Airflow logo in my presentation?](#can-i-use-the-apache-airflow-logo-in-my-presentation)
- [Airflow merchandise](#airflow-merchandise)
- [Links](#links)
+- [Sponsors](#sponsors)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -79,9 +82,9 @@ Airflow is not a streaming solution, but it is often used to process real-time d
Apache Airflow is tested with:
-| | Main version (dev) | Stable version (2.1.0) |
+| | Main version (dev) | Stable version (2.1.2) |
| -------------------- | ------------------------- | ------------------------ |
-| Python | 3.6, 3.7, 3.8, 3.9 | 3.6, 3.7, 3.8 |
+| Python | 3.6, 3.7, 3.8, 3.9 | 3.6, 3.7, 3.8, 3.9 |
| Kubernetes | 1.20, 1.19, 1.18 | 1.20, 1.19, 1.18 |
| PostgreSQL | 9.6, 10, 11, 12, 13 | 9.6, 10, 11, 12, 13 |
| MySQL | 5.7, 8 | 5.7, 8 |
@@ -95,34 +98,6 @@ 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.
-## 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](https://devguide.python.org/#status-of-python-branches) and
-[Kubernetes version skew policy](https://kubernetes.io/docs/setup/release/version-skew-policy/).
-
-1. We drop support for Python and Kubernetes versions when they reach EOL. 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.6 it means that we drop support in main right after 23.12.2021, and the first
- MAJOR or MINOR version of Airflow released after will not have it.
-
-2. The "oldest" supported version of Python/Kubernetes is the default one. "Default" is only meaningful
- in terms of "smoke tests" in CI PRs which are run using this default version and default reference
- image available in DockerHub. Currently ``apache/airflow:latest`` and ``apache/airflow:2.0.2`` images
- are both Python 3.6 images, however the first MINOR/MAJOR release of Airflow release after 23.12.2021 will
- become Python 3.7 images.
-
-3. 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 a new images/support in Airflow based on the working CI setup.
-
-### Additional notes on Python version requirements
-
-* Previous version [requires](https://github.com/apache/airflow/issues/8162) at least Python 3.5.3
- when using Python 3
-
## Getting started
Visit the official Airflow website documentation (latest **stable** release) for help with
@@ -135,7 +110,7 @@ through a more complete [tutorial](https://airflow.apache.org/docs/apache-airflo
For more information on Airflow Improvement Proposals (AIPs), visit
the [Airflow Wiki](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals).
-Official Docker (container) images for Apache Airflow are described in [IMAGES.rst](IMAGES.rst).
+Documentation for dependent projects like provider packages, Docker image, Helm Chart, you'll find it in [the documentation index](https://airflow.apache.org/docs/).
## Installing from PyPI
@@ -155,9 +130,7 @@ correct Airflow tag/version/branch and Python versions in the URL.
1. Installing just Airflow:
-NOTE!!!
-
-Only `pip` installation is currently officially supported.
+> Note: Only `pip` installation is currently officially supported.
While they are some successes with using other tools like [poetry](https://python-poetry.org) or
[pip-tools](https://pypi.org/project/pip-tools), they do not share the same workflow as
@@ -169,15 +142,15 @@ them to appropriate format and workflow that your tool requires.
```bash
-pip install apache-airflow==2.0.2 \
- --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.7.txt"
+pip install apache-airflow==2.1.2 \
+ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.1.2/constraints-3.7.txt"
```
2. Installing with extras (for example postgres,google)
```bash
-pip install apache-airflow[postgres,google]==2.0.2 \
- --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.7.txt"
+pip install apache-airflow[postgres,google]==2.1.2 \
+ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.1.2/constraints-3.7.txt"
```
For information on installing provider packages check
@@ -197,6 +170,7 @@ 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.
+
## Convenience packages
There are other ways of installing and using Airflow. Those are "convenience" methods - they are
@@ -222,31 +196,65 @@ following the ASF Policy.
- **DAGs**: Overview of all DAGs in your environment.
- 
+ 
-- **Tree View**: Tree representation of a DAG that spans across time.
+- **Tree**: Tree representation of a DAG that spans across time.
- 
+ 
-- **Graph View**: Visualization of a DAG's dependencies and their current status for a specific run.
+- **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.
+
+ 
-- **Gantt View**: Duration and overlap of a DAG.
+- **Code**: Quick way to view source code of a DAG.
- 
+ 
-- **Code View**: Quick way to view source code of a DAG.
- 
+## Semantic versioning
+
+As of Airflow 2.0.0, we support strict [SemVer](https://semver.org/) approach 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 from Airflow version.
+ For example `google 4.1.0` and `amazon 3.0.3` providers can happily be installed
+ with `Airflow 2.1.2`. If there are limits of cross-dependencies between providers and Airflow packages,
+ they are present in providers as `install_requires` limitations. We aim to keep backwards
+ compatibility of providers with all previously released Airflow 2 versions but
+ there will be sometimes breaking changes that might make some, or all
+ providers, to 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 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 Airlfow 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 version 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. The clients then can release their own PATCH releases with bugfixes,
+ independently of Airflow PATCH releases.
+
+## Version Life Cycle
+
+Apache Airflow version life cycle:
| Version | Current Patch/Minor | State | First Release | Limited Support | EOL/Terminated |
|---------|---------------------|-----------|---------------|-----------------|----------------|
-| 2 | 2.1.1 | Supported | Dec 17, 2020 | Dec 2021 | TBD |
+| 2 | 2.1.2 | Supported | Dec 17, 2020 | Dec 2021 | TBD |
| 1.10 | 1.10.15 | EOL | Aug 27, 2018 | Dec 17, 2020 | June 17, 2021 |
| 1.9 | 1.9.0 | EOL | Jan 03, 2018 | Aug 27, 2018 | Aug 27, 2018 |
| 1.8 | 1.8.2 | EOL | Mar 19, 2017 | Jan 03, 2018 | Jan 03, 2018 |
@@ -272,7 +280,7 @@ They are based on the official release schedule of Python and Kubernetes, nicely
2. The "oldest" supported version of Python/Kubernetes is the default one. "Default" is only meaningful
in terms of "smoke tests" in CI PRs which are run using this default version and default reference
- image available. Currently ``apache/airflow:latest`` and ``apache/airflow:2.1.1` images
+ image available. Currently ``apache/airflow:latest`` and ``apache/airflow:2.1.2` images
are both Python 3.6 images, however the first MINOR/MAJOR release of Airflow release after 23.12.2021 will
become Python 3.7 images.
@@ -289,6 +297,8 @@ They are based on the official release schedule of Python and Kubernetes, nicely
Want to help build Apache Airflow? Check out our [contributing documentation](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst).
+Official Docker (container) images for Apache Airflow are described in [IMAGES.rst](https://github.com/apache/airflow/blob/main/IMAGES.rst).
+
## Who uses Apache Airflow?
More than 400 organizations are using Apache Airflow
@@ -315,3 +325,12 @@ If you would love to have Apache Airflow stickers, t-shirt etc. then check out
- [Documentation](https://airflow.apache.org/docs/apache-airflow/stable/)
- [Chat](https://s.apache.org/airflow-slack)
+
+## Sponsors
+
+The CI infrastructure for Apache Airflow has been sponsored by:
+
+<!-- Orderd 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>
diff --git a/scripts/ci/images/ci_prepare_ci_image_on_ci.sh b/scripts/ci/images/ci_prepare_ci_image_on_ci.sh
index 8a89a30..de1aadc 100755
--- a/scripts/ci/images/ci_prepare_ci_image_on_ci.sh
+++ b/scripts/ci/images/ci_prepare_ci_image_on_ci.sh
@@ -32,7 +32,7 @@ function build_ci_image_on_ci() {
# so all the checksums are assumed to be correct
md5sum::calculate_md5sum_for_all_files
- # Remove me on 7th August 2021 after all users had chance to rebase
+ # Remove me on 15th of August 2021 after all users had chance to rebase
legacy_ci_image="ghcr.io/${GITHUB_REPOSITORY}-${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-ci-v2:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
build_images::wait_for_image_tag "${AIRFLOW_CI_IMAGE}" ":${GITHUB_REGISTRY_PULL_IMAGE_TAG}" "${legacy_ci_image}"
diff --git a/scripts/ci/images/ci_prepare_prod_image_on_ci.sh b/scripts/ci/images/ci_prepare_prod_image_on_ci.sh
index 14bd71f..3b5f7a6 100755
--- a/scripts/ci/images/ci_prepare_prod_image_on_ci.sh
+++ b/scripts/ci/images/ci_prepare_prod_image_on_ci.sh
@@ -33,7 +33,7 @@ function build_prod_images_on_ci() {
if [[ ${GITHUB_REGISTRY_WAIT_FOR_IMAGE} == "true" ]]; then
# Tries to wait for the images indefinitely
- # Remove me on 7th August 2021 after all users had chance to rebase
+ # Remove me on 15th of August 2021 after all users had chance to rebase
legacy_prod_image="ghcr.io/${GITHUB_REPOSITORY}-${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-v2:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
build_images::wait_for_image_tag "${AIRFLOW_PROD_IMAGE}" ":${GITHUB_REGISTRY_PULL_IMAGE_TAG}" "${legacy_prod_image}"
else
diff --git a/scripts/ci/images/ci_wait_for_and_verify_ci_image.sh b/scripts/ci/images/ci_wait_for_and_verify_ci_image.sh
index bb18100..3d99d5e 100755
--- a/scripts/ci/images/ci_wait_for_and_verify_ci_image.sh
+++ b/scripts/ci/images/ci_wait_for_and_verify_ci_image.sh
@@ -30,13 +30,13 @@ shift
image_name_with_tag="${AIRFLOW_CI_IMAGE}:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
-# Remove me on 7th August 2021 after all users had chance to rebase
+# Remove me on 15th of August 2021 after all users had chance to rebase
legacy_ci_image="ghcr.io/${GITHUB_REPOSITORY}-${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-ci-v2:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
function pull_ci_image() {
start_end::group_start "Pulling image: ${IMAGE_AVAILABLE}"
push_pull_remove_images::pull_image_if_not_present_or_forced "${IMAGE_AVAILABLE}"
- # Remove me on 7th August 2021 after all users had chance to rebase
+ # Remove me on 15th of August 2021 after all users had chance to rebase
if [[ ${IMAGE_AVAILABLE} != "${image_name_with_tag}" ]]; then
verbosity::print_info "Tagging the legacy ${IMAGE_AVAILABLE} with ${image_name_with_tag}"
docker tag "${IMAGE_AVAILABLE}" "${image_name_with_tag}"
@@ -49,7 +49,7 @@ build_images::configure_docker_registry
start_end::group_end
start_end::group_start "Waiting for ${image_name_with_tag}"
-# Remove me on 7th August 2021 after all users had chance to rebase
+# Remove me on 15th of August 2021 after all users had chance to rebase
push_pull_remove_images::wait_for_image "${image_name_with_tag}" "${legacy_ci_image}"
build_images::prepare_ci_build
start_end::group_end
diff --git a/scripts/ci/images/ci_wait_for_and_verify_prod_image.sh b/scripts/ci/images/ci_wait_for_and_verify_prod_image.sh
index d93da72..309e506 100755
--- a/scripts/ci/images/ci_wait_for_and_verify_prod_image.sh
+++ b/scripts/ci/images/ci_wait_for_and_verify_prod_image.sh
@@ -30,13 +30,13 @@ shift
image_name_with_tag="${AIRFLOW_PROD_IMAGE}:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
-# Remove me on 7th August 2021 after all users had chance to rebase
+# Remove me on 15th of August 2021 after all users had chance to rebase
legacy_prod_image="ghcr.io/${GITHUB_REPOSITORY}-${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-v2:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
function pull_prod_image() {
start_end::group_start "Pulling image: ${IMAGE_AVAILABLE}"
push_pull_remove_images::pull_image_if_not_present_or_forced "${IMAGE_AVAILABLE}"
- # Remove me on 7th August 2021 after all users had chance to rebase
+ # Remove me on 15th of August 2021 after all users had chance to rebase
if [[ ${IMAGE_AVAILABLE} != "${image_name_with_tag}" ]]; then
verbosity::print_info "Tagging the legacy ${IMAGE_AVAILABLE} with ${image_name_with_tag}"
docker tag "${IMAGE_AVAILABLE}" "${image_name_with_tag}"
@@ -49,7 +49,7 @@ build_images::configure_docker_registry
start_end::group_end
start_end::group_start "Waiting for ${image_name_with_tag}"
-# Remove me on 7th August 2021 after all users had chance to rebase
+# Remove me on 15th of August 2021 after all users had chance to rebase
push_pull_remove_images::wait_for_image "${image_name_with_tag}" "${legacy_prod_image}"
build_images::prepare_prod_build
start_end::group_end
diff --git a/scripts/ci/libraries/_build_images.sh b/scripts/ci/libraries/_build_images.sh
index 551674f..3ce020b 100644
--- a/scripts/ci/libraries/_build_images.sh
+++ b/scripts/ci/libraries/_build_images.sh
@@ -880,7 +880,7 @@ function build_images::tag_image() {
# Parameters:
# $1 - image name to wait for
# $2 - fallback image to wait for
-# $3 - suffix of the image to wait for (Remove me on 7th August 2021 after all users had chance to rebase)
+# $3 - suffix of the image to wait for (Remove me on 15th of August 2021 after all users had chance to rebase)
# $4, $5, ... - target tags to tag the image with
function build_images::wait_for_image_tag() {
diff --git a/scripts/ci/libraries/_push_pull_remove_images.sh b/scripts/ci/libraries/_push_pull_remove_images.sh
index 847d010..2d8e1c4 100644
--- a/scripts/ci/libraries/_push_pull_remove_images.sh
+++ b/scripts/ci/libraries/_push_pull_remove_images.sh
@@ -234,7 +234,7 @@ function push_pull_remove_images::push_ci_images_to_github() {
local airflow_ci_tagged_image="${AIRFLOW_CI_IMAGE}:${GITHUB_REGISTRY_PUSH_IMAGE_TAG}"
docker_v tag "${AIRFLOW_CI_IMAGE}" "${airflow_ci_tagged_image}"
push_pull_remove_images::push_image_with_retries "${airflow_ci_tagged_image}"
- # Also push ci manifest iumage image if GITHUB_REGISTRY_PUSH_IMAGE_TAG is "latest"
+ # Also push ci manifest image if GITHUB_REGISTRY_PUSH_IMAGE_TAG is "latest"
if [[ ${GITHUB_REGISTRY_PUSH_IMAGE_TAG} == "latest" ]]; then
local airflow_ci_manifest_tagged_image="${AIRFLOW_CI_REMOTE_MANIFEST_IMAGE}:latest"
docker_v tag "${AIRFLOW_CI_LOCAL_MANIFEST_IMAGE}" "${airflow_ci_manifest_tagged_image}"