You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2024/01/15 10:05:19 UTC
(airflow) branch v2-8-test updated (1be06e00c6 -> ee903bce8d)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a change to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
discard 1be06e00c6 Update RELEASE_NOTES.rst
discard b8091a8e90 Update version to 2.8.1
new 0e03ef6463 Allow anoymous user edit/show resource when set `AUTH_ROLE_PUBLIC` (#36750)
new 0d3766f3af Add unit test for AUTH_ROLE_PUBLIC=Admin (#36787)
new 9e04729c72 Update version to 2.8.1
new ee903bce8d Update RELEASE_NOTES.rst
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (1be06e00c6)
\
N -- N -- N refs/heads/v2-8-test (ee903bce8d)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
RELEASE_NOTES.rst | 1 +
airflow/reproducible_build.yaml | 4 +-
airflow/www/auth.py | 12 ++---
airflow/www/views.py | 9 ++--
tests/test_utils/www.py | 7 +++
tests/www/views/conftest.py | 7 ++-
tests/www/views/test_anonymous_as_admin_role.py | 63 +++++++++++++++++++++++++
7 files changed, 87 insertions(+), 16 deletions(-)
create mode 100644 tests/www/views/test_anonymous_as_admin_role.py
(airflow) 04/04: Update RELEASE_NOTES.rst
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit ee903bce8db762d41338c62de929e7f110419fdb
Author: Ephraim Anierobi <sp...@gmail.com>
AuthorDate: Mon Jan 15 10:55:11 2024 +0100
Update RELEASE_NOTES.rst
---
RELEASE_NOTES.rst | 218 ++++++++++++++++++++++++------------
airflow/reproducible_build.yaml | 4 +-
newsfragments/36281.significant.rst | 4 -
newsfragments/36537.significant.rst | 41 -------
newsfragments/36647.significant.rst | 23 ----
newsfragments/config.toml | 2 +-
6 files changed, 150 insertions(+), 142 deletions(-)
diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index cdd3a4e42d..fa9a79ca0c 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -27,75 +27,151 @@ Airflow 2.8.1 (2024-01-19)
Significant Changes
^^^^^^^^^^^^^^^^^^^
-- Target version for core dependency ``pendulum`` package set to 3
-
- Support for pendulum 2.1.2 will be saved for a while, presumably until the next feature version of Airflow.
- It is advised to upgrade user code to use pendulum 3 as soon as possible. (#36281)
-- Airflow packaging specification follows modern Python packaging standards.
-
- We standardized Airflow dependency configuration to follow latest development in Python packaging by
- using pyproject.toml. Airflow is now compliant with those accepted PEPs:
-
- * `PEP-440 Version Identification and Dependency Specification <https://www.python.org/dev/peps/pep-0440/>`__
- * `PEP-517 A build-system independent format for source trees <https://www.python.org/dev/peps/pep-0517/>`__
- * `PEP-518 Specifying Minimum Build System Requirements for Python Projects <https://www.python.org/dev/peps/pep-0518/>`__
- * `PEP-561 Distributing and Packaging Type Information <https://www.python.org/dev/peps/pep-0561/>`__
- * `PEP-621 Storing project metadata in pyproject.toml <https://www.python.org/dev/peps/pep-0621/>`__
- * `PEP-660 Editable installs for pyproject.toml based builds (wheel based) <https://www.python.org/dev/peps/pep-0660/>`__
- * `PEP-685 Comparison of extra names for optional distribution dependencies <https://www.python.org/dev/peps/pep-0685/>`__
-
- Also we implement multiple license files support coming from Draft, not yet accepted (but supported by hatchling) PEP:
- * `PEP 639 Improving License Clarity with Better Package Metadata <https://peps.python.org/pep-0639/>`__
-
- This has almost no noticeable impact on users if they are using modern Python packaging and development tools, generally
- speaking Airflow should behave as it did before when installing it from PyPI and it should be much easier to install
- it for development purposes using ``pip install -e ".[devel]"``.
-
- The differences from the user side are:
-
- * Airflow extras now get extras normalized to ``-`` (following PEP-685) instead of ``_`` and ``.``
- (as it was before in some extras). When you install airflow with such extras (for example ``dbt.core`` or
- ``all_dbs``) you should use ``-`` instead of ``_`` and ``.``.
-
- In most modern tools this will work in backwards-compatible way, but in some old version of those tools you might need to
- replace ``_`` and ``.`` with ``-``. You can also get warnings that the extra you are installing does not exist - but usually
- this warning is harmless and the extra is installed anyway. It is, however, recommended to change to use ``-`` in extras in your dependency
- specifications for all Airflow extras.
+Target version for core dependency ``pendulum`` package set to 3 (#36281).
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+Support for pendulum 2.1.2 will be saved for a while, presumably until the next feature version of Airflow.
+It is advised to upgrade user code to use pendulum 3 as soon as possible.
- * Released airflow package does not contain ``devel``, ``devel-*``, ``doc`` and ``doc-gen`` extras.
- Those extras are only available when you install Airflow from sources in ``--editable`` mode. This is
- because those extras are only used for development and documentation building purposes and are not needed
- when you install Airflow for production use. Those dependencies had unspecified and varying behaviour for
- released packages anyway and you were not supposed to use them in released packages.
+Airflow packaging specification follows modern Python packaging standards (#36537).
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+We standardized Airflow dependency configuration to follow latest development in Python packaging by
+using pyproject.toml. Airflow is now compliant with those accepted PEPs:
+
+* `PEP-440 Version Identification and Dependency Specification <https://www.python.org/dev/peps/pep-0440/>`__
+* `PEP-517 A build-system independent format for source trees <https://www.python.org/dev/peps/pep-0517/>`__
+* `PEP-518 Specifying Minimum Build System Requirements for Python Projects <https://www.python.org/dev/peps/pep-0518/>`__
+* `PEP-561 Distributing and Packaging Type Information <https://www.python.org/dev/peps/pep-0561/>`__
+* `PEP-621 Storing project metadata in pyproject.toml <https://www.python.org/dev/peps/pep-0621/>`__
+* `PEP-660 Editable installs for pyproject.toml based builds (wheel based) <https://www.python.org/dev/peps/pep-0660/>`__
+* `PEP-685 Comparison of extra names for optional distribution dependencies <https://www.python.org/dev/peps/pep-0685/>`__
+
+Also we implement multiple license files support coming from Draft, not yet accepted (but supported by hatchling) PEP:
+* `PEP 639 Improving License Clarity with Better Package Metadata <https://peps.python.org/pep-0639/>`__
+
+This has almost no noticeable impact on users if they are using modern Python packaging and development tools, generally
+speaking Airflow should behave as it did before when installing it from PyPI and it should be much easier to install
+it for development purposes using ``pip install -e ".[devel]"``.
+
+The differences from the user side are:
+
+* Airflow extras now get extras normalized to ``-`` (following PEP-685) instead of ``_`` and ``.``
+ (as it was before in some extras). When you install airflow with such extras (for example ``dbt.core`` or
+ ``all_dbs``) you should use ``-`` instead of ``_`` and ``.``.
+
+In most modern tools this will work in backwards-compatible way, but in some old version of those tools you might need to
+replace ``_`` and ``.`` with ``-``. You can also get warnings that the extra you are installing does not exist - but usually
+this warning is harmless and the extra is installed anyway. It is, however, recommended to change to use ``-`` in extras in your dependency
+specifications for all Airflow extras.
+
+* Released airflow package does not contain ``devel``, ``devel-*``, ``doc`` and ``doc-gen`` extras.
+ Those extras are only available when you install Airflow from sources in ``--editable`` mode. This is
+ because those extras are only used for development and documentation building purposes and are not needed
+ when you install Airflow for production use. Those dependencies had unspecified and varying behaviour for
+ released packages anyway and you were not supposed to use them in released packages.
+
+* The ``all`` and ``all-*`` extras were not always working correctly when installing Airflow using constraints
+ because they were also considered as development-only dependencies. With this change, those dependencies are
+ now properly handling constraints and they will install properly with constraints, pulling the right set
+ of providers and dependencies when constraints are used.
+
+Graphviz dependency is now an optional one, not required one (#36647).
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+The ``graphviz`` dependency has been problematic as Airflow required dependency - especially for
+ARM-based installations. Graphviz packages require binary graphviz libraries - which is already a
+limitation, but they also require to install graphviz Python bindings to be build and installed.
+This does not work for older Linux installation but - more importantly - when you try to install
+Graphviz libraries for Python 3.8, 3.9 for ARM M1 MacBooks, the packages fail to install because
+Python bindings compilation for M1 can only work for Python 3.10+.
- * The ``all`` and ``all-*`` extras were not always working correctly when installing Airflow using constraints
- because they were also considered as development-only dependencies. With this change, those dependencies are
- now properly handling constraints and they will install properly with constraints, pulling the right set
- of providers and dependencies when constraints are used. (#36537)
-- Graphviz dependency is now an optional one, not required one.
+This is not a breaking change technically - the CLIs to render the DAGs is still there and IF you
+already have graphviz installed, it will continue working as it did before. The only problem when it
+does not work is where you do not have graphviz installed it will raise an error and inform that you need it.
- The ``graphviz`` dependency has been problematic as Airflow required dependency - especially for
- ARM-based installations. Graphviz packages require binary graphviz libraries - which is already a
- limitation, but they also require to install graphviz Python bindings to be build and installed.
- This does not work for older Linux installation but - more importantly - when you try to install
- Graphviz libraries for Python 3.8, 3.9 for ARM M1 MacBooks, the packages fail to install because
- Python bindings compilation for M1 can only work for Python 3.10+.
+Graphviz will remain to be installed for most users:
- This is not a breaking change technically - the CLIs to render the DAGs is still there and IF you
- already have graphviz installed, it will continue working as it did before. The only problem when it
- does not work is where you do not have graphviz installed it will raise an error and inform that you need it.
+* the Airflow Image will still contain graphviz library, because
+ it is added there as extra
+* when previous version of Airflow has been installed already, then
+ graphviz library is already installed there and Airflow will
+ continue working as it did
- Graphviz will remain to be installed for most users:
+The only change will be a new installation of new version of Airflow from the scratch, where graphviz will
+need to be specified as extra or installed separately in order to enable DAG rendering option.
- * the Airflow Image will still contain graphviz library, because
- it is added there as extra
- * when previous version of Airflow has been installed already, then
- graphviz library is already installed there and Airflow will
- continue working as it did
+Bug Fixes
+"""""""""
+- Allow anonymous user edit/show resource when set ``AUTH_ROLE_PUBLIC=admin`` (#36750)
+- Better error message when sqlite URL uses relative path (#36774)
+- Explicit string cast required to force integer-type run_ids to be passed as strings instead of integers (#36756)
+- Add log lookup exception for empty ``op`` subtypes (#35536)
+- Remove usused index on task instance (#36737)
+- Fix check on subclass for ``typing.Union`` in ``_infer_multiple_outputs`` for Python 3.10+ (#36728)
+- Make sure ``multiple_outputs`` is inferred correctly even when using ``TypedDict`` (#36652)
+- Add back FAB constant in legacy security manager (#36719)
+- Fix AttributeError when using ``Dagrun.update_state`` (#36712)
+- Do not let ``EventsTimetable`` schedule past events if ``catchup=False`` (#36134)
+- Support encryption for triggers parameters (#36492)
+- Rename concurrency label to max active tasks (#36691)
+- Fix the type hint for ``tis_query`` in ``_process_executor_events`` (#36655)
+- Redirect to index when user does not have permission to access a page (#36623)
+- Avoid using dict as default value in ``call_regular_interval`` (#36608)
+- Remove option to set a task instance to running state in UI (#36518)
+- Fix details tab not showing when using dynamic task mapping (#36522)
+- Raise error when ``DagRun`` fails while running ``dag test`` (#36517)
+- Refactor ``_manage_executor_state`` by refreshing TIs in batch (#36502)
+- Add flask config: ``MAX_CONTENT_LENGTH`` (#36401)
+- Fix get_leaves calculation for teardown in nested group (#36456)
+- Stop serializing timezone-naive datetime to timezone-aware datetime with UTC tz (#36379)
+- Make ``kubernetes`` decorator type annotation consistent with operator (#36405)
+- Fix Webserver returning 500 for POST requests to api/dag/*/dagrun from anonymous user (#36275)
+- Fix the required access for get_variable endpoint (#36396)
+- Fix datetime reference in ``DAG.is_fixed_time_schedule`` (#36370)
+- Fix AirflowSkipException message raised by BashOperator (#36354)
+- Allow PythonVirtualenvOperator.skip_on_exit_code to be zero (#36361)
+- Increase width of execution_date input in trigger.html (#36278)
+- Fix logging for pausing DAG (#36182)
+- Stop deserializing pickle when enable_xcom_pickling is False (#36255)
+- Check DAG read permission before accessing DAG code (#36257)
+- Enable mark task as failed/success always (#36254)
+- Create latest log dir symlink as relative link (#36019)
+- Fix Python-based decorators templating (#36103)
- The only change will be a new installation of new version of Airflow from the scratch, where graphviz will
- need to be specified as extra or installed separately in order to enable DAG rendering option. (#36647)
+Miscellaneous
+"""""""""""""
+- Restore function scoped ``httpx`` import in file_task_handler for perf (#36753)
+- Add support of Pendulum 3 (#36281)
+- Standardize airflow build process and switch to Hatchling build backend (#36537)
+- Get rid of ``pyarrow-hotfix`` for ``CVE-2023-47248`` (#36697)
+- Make ``graphviz`` dependency optional (#36647)
+- Announce MSSQL support end in Airflow 2.9.0, add migration script hints (#36509)
+- Set min ``pandas`` dependency to 1.2.5 for all providers and airflow (#36698)
+- Bump follow-redirects from 1.15.3 to 1.15.4 in ``/airflow/www`` (#36700)
+- Provide the logger_name param to base hook in order to override the logger name (#36674)
+- Fix run type icon alignment with run type text (#36616)
+- Follow BaseHook connection fields method signature in FSHook (#36444)
+- Remove redundant ``docker`` decorator type annotations (#36406)
+- Straighten typing in workday timetable (#36296)
+- Use ``batch_is_authorized_dag`` to check if user has permission to read DAGs (#36279)
+- Replace deprecated get_accessible_dag_ids and use get_readable_dags in get_dag_warnings (#36256)
+Doc Only Changes
+""""""""""""""""
+- Metrics tagging documentation (#36627)
+- In docs use logical_date instead of deprecated execution_date (#36654)
+- Add section about live-upgrading Airflow (#36637)
+- Replace ``numpy`` example with practical exercise demonstrating top-level code (#35097)
+- Improve and add more complete description in the architecture diagrams (#36513)
+- Improve the error message displayed when there is a webserver error (#36570)
+- Update ``dags.rst`` with information on DAG pausing (#36540)
+- Update installation prerequisites after upgrading to Debian Bookworm (#36521)
+- Add description on the ways how users should approach DB monitoring (#36483)
+- Add branching based on mapped task group example to dynamic-task-mapping.rst (#36480)
+- Add further details to replacement documentation (#36485)
+- Use cards when describing priority weighting methods (#36411)
+- Update ``metrics.rst`` for param ``dagrun.schedule_delay`` (#36404)
+- Update admonitions in Python operator doc to reflect sentiment (#36340)
+- Improve audit_logs.rst (#36213)
+- Remove Redshift mention from the list of managed Postgres backends (#36217)
Airflow 2.8.0 (2023-12-18)
--------------------------
@@ -103,16 +179,16 @@ Airflow 2.8.0 (2023-12-18)
Significant Changes
^^^^^^^^^^^^^^^^^^^
-- Raw HTML code in DAG docs and DAG params descriptions is disabled by default
-
- To ensure that no malicious javascript can be injected with DAG descriptions or trigger UI forms by DAG authors
- a new parameter ``webserver.allow_raw_html_descriptions`` was added with default value of ``False``.
- If you trust your DAG authors code and want to allow using raw HTML in DAG descriptions and params, you can restore the previous
- behavior by setting the configuration value to ``True``.
-
- To ensure Airflow is secure by default, the raw HTML support in trigger UI has been super-seeded by markdown support via
- the ``description_md`` attribute. If you have been using ``description_html`` please migrate to ``description_md``.
- The ``custom_html_form`` is now deprecated. (#35460)
+Raw HTML code in DAG docs and DAG params descriptions is disabled by default (#35460)
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+To ensure that no malicious javascript can be injected with DAG descriptions or trigger UI forms by DAG authors
+a new parameter ``webserver.allow_raw_html_descriptions`` was added with default value of ``False``.
+If you trust your DAG authors code and want to allow using raw HTML in DAG descriptions and params, you can restore the previous
+behavior by setting the configuration value to ``True``.
+
+To ensure Airflow is secure by default, the raw HTML support in trigger UI has been super-seeded by markdown support via
+the ``description_md`` attribute. If you have been using ``description_html`` please migrate to ``description_md``.
+The ``custom_html_form`` is now deprecated.
New Features
""""""""""""
diff --git a/airflow/reproducible_build.yaml b/airflow/reproducible_build.yaml
index af282b6a04..bd957e935c 100644
--- a/airflow/reproducible_build.yaml
+++ b/airflow/reproducible_build.yaml
@@ -1,2 +1,2 @@
-release-notes-hash: b0d8fdf0caf6f957b63ee7f4ee2147b9
-source-date-epoch: 1705311983
+release-notes-hash: 51989c1e64fe1115f720ddf7e8b6adc2
+source-date-epoch: 1705313090
diff --git a/newsfragments/36281.significant.rst b/newsfragments/36281.significant.rst
deleted file mode 100644
index 1207be0782..0000000000
--- a/newsfragments/36281.significant.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Target version for core dependency ``pendulum`` package set to 3
-
-Support for pendulum 2.1.2 will be saved for a while, presumably until the next feature version of Airflow.
-It is advised to upgrade user code to use pendulum 3 as soon as possible.
diff --git a/newsfragments/36537.significant.rst b/newsfragments/36537.significant.rst
deleted file mode 100644
index 22a288b076..0000000000
--- a/newsfragments/36537.significant.rst
+++ /dev/null
@@ -1,41 +0,0 @@
-Airflow packaging specification follows modern Python packaging standards.
-
-We standardized Airflow dependency configuration to follow latest development in Python packaging by
-using pyproject.toml. Airflow is now compliant with those accepted PEPs:
-
-* `PEP-440 Version Identification and Dependency Specification <https://www.python.org/dev/peps/pep-0440/>`__
-* `PEP-517 A build-system independent format for source trees <https://www.python.org/dev/peps/pep-0517/>`__
-* `PEP-518 Specifying Minimum Build System Requirements for Python Projects <https://www.python.org/dev/peps/pep-0518/>`__
-* `PEP-561 Distributing and Packaging Type Information <https://www.python.org/dev/peps/pep-0561/>`__
-* `PEP-621 Storing project metadata in pyproject.toml <https://www.python.org/dev/peps/pep-0621/>`__
-* `PEP-660 Editable installs for pyproject.toml based builds (wheel based) <https://www.python.org/dev/peps/pep-0660/>`__
-* `PEP-685 Comparison of extra names for optional distribution dependencies <https://www.python.org/dev/peps/pep-0685/>`__
-
-Also we implement multiple license files support coming from Draft, not yet accepted (but supported by hatchling) PEP:
-* `PEP 639 Improving License Clarity with Better Package Metadata <https://peps.python.org/pep-0639/>`__
-
-This has almost no noticeable impact on users if they are using modern Python packaging and development tools, generally
-speaking Airflow should behave as it did before when installing it from PyPI and it should be much easier to install
-it for development purposes using ``pip install -e ".[devel]"``.
-
-The differences from the user side are:
-
-* Airflow extras now get extras normalized to ``-`` (following PEP-685) instead of ``_`` and ``.``
- (as it was before in some extras). When you install airflow with such extras (for example ``dbt.core`` or
- ``all_dbs``) you should use ``-`` instead of ``_`` and ``.``.
-
-In most modern tools this will work in backwards-compatible way, but in some old version of those tools you might need to
-replace ``_`` and ``.`` with ``-``. You can also get warnings that the extra you are installing does not exist - but usually
-this warning is harmless and the extra is installed anyway. It is, however, recommended to change to use ``-`` in extras in your dependency
-specifications for all Airflow extras.
-
-* Released airflow package does not contain ``devel``, ``devel-*``, ``doc`` and ``doc-gen`` extras.
- Those extras are only available when you install Airflow from sources in ``--editable`` mode. This is
- because those extras are only used for development and documentation building purposes and are not needed
- when you install Airflow for production use. Those dependencies had unspecified and varying behaviour for
- released packages anyway and you were not supposed to use them in released packages.
-
-* The ``all`` and ``all-*`` extras were not always working correctly when installing Airflow using constraints
- because they were also considered as development-only dependencies. With this change, those dependencies are
- now properly handling constraints and they will install properly with constraints, pulling the right set
- of providers and dependencies when constraints are used.
diff --git a/newsfragments/36647.significant.rst b/newsfragments/36647.significant.rst
deleted file mode 100644
index dc3f0faad8..0000000000
--- a/newsfragments/36647.significant.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-Graphviz dependency is now an optional one, not required one.
-
-The ``graphviz`` dependency has been problematic as Airflow required dependency - especially for
-ARM-based installations. Graphviz packages require binary graphviz libraries - which is already a
-limitation, but they also require to install graphviz Python bindings to be build and installed.
-This does not work for older Linux installation but - more importantly - when you try to install
-Graphviz libraries for Python 3.8, 3.9 for ARM M1 MacBooks, the packages fail to install because
-Python bindings compilation for M1 can only work for Python 3.10+.
-
-This is not a breaking change technically - the CLIs to render the DAGs is still there and IF you
-already have graphviz installed, it will continue working as it did before. The only problem when it
-does not work is where you do not have graphviz installed it will raise an error and inform that you need it.
-
-Graphviz will remain to be installed for most users:
-
-* the Airflow Image will still contain graphviz library, because
- it is added there as extra
-* when previous version of Airflow has been installed already, then
- graphviz library is already installed there and Airflow will
- continue working as it did
-
-The only change will be a new installation of new version of Airflow from the scratch, where graphviz will
-need to be specified as extra or installed separately in order to enable DAG rendering option.
diff --git a/newsfragments/config.toml b/newsfragments/config.toml
index 014284c133..4c0f7cc949 100644
--- a/newsfragments/config.toml
+++ b/newsfragments/config.toml
@@ -16,7 +16,7 @@
# under the License.
[tool.towncrier]
name = "Airflow"
-filename = "../RELEASE_NOTES.rst"
+filename = "RELEASE_NOTES.rst"
underlines = ["-", '^']
[[tool.towncrier.type]]
(airflow) 01/04: Allow anoymous user edit/show resource when set `AUTH_ROLE_PUBLIC` (#36750)
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 0e03ef6463e92c8c59786b5ba1409df5fe767c74
Author: Bob Du <i...@bobdu.cc>
AuthorDate: Fri Jan 12 23:58:37 2024 +0800
Allow anoymous user edit/show resource when set `AUTH_ROLE_PUBLIC` (#36750)
(cherry picked from commit 512461c74523f8e015b5ccc1cc01184e4fd3960f)
---
airflow/www/auth.py | 12 ++++--------
airflow/www/views.py | 9 ++++-----
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/airflow/www/auth.py b/airflow/www/auth.py
index a611307a31..97a79cc533 100644
--- a/airflow/www/auth.py
+++ b/airflow/www/auth.py
@@ -107,14 +107,10 @@ def has_access_with_pk(f):
_permission_name = self.method_permission_name.get(f.__name__)
if _permission_name:
permission_str = f"{PERMISSION_PREFIX}{_permission_name}"
- if (
- get_auth_manager().is_logged_in()
- and permission_str in self.base_permissions
- and self.appbuilder.sm.has_access(
- action_name=permission_str,
- resource_name=self.class_permission_name,
- resource_pk=kwargs.get("pk"),
- )
+ if permission_str in self.base_permissions and self.appbuilder.sm.has_access(
+ action_name=permission_str,
+ resource_name=self.class_permission_name,
+ resource_pk=kwargs.get("pk"),
):
return f(self, *args, **kwargs)
else:
diff --git a/airflow/www/views.py b/airflow/www/views.py
index 70fc2fb392..74ff10bed2 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -133,7 +133,6 @@ from airflow.utils.task_group import TaskGroup, task_group_to_dict
from airflow.utils.timezone import td_format, utcnow
from airflow.version import version
from airflow.www import auth, utils as wwwutils
-from airflow.www.auth import has_access_with_pk
from airflow.www.decorators import action_logging, gzipped
from airflow.www.extensions.init_auth_manager import get_auth_manager
from airflow.www.forms import (
@@ -4002,7 +4001,7 @@ class AirflowModelView(ModelView):
return attribute
@expose("/show/<pk>", methods=["GET"])
- @has_access_with_pk
+ @auth.has_access_with_pk
def show(self, pk):
"""
Show view.
@@ -4024,7 +4023,7 @@ class AirflowModelView(ModelView):
)
@expose("/edit/<pk>", methods=["GET", "POST"])
- @has_access_with_pk
+ @auth.has_access_with_pk
def edit(self, pk):
"""
Edit view.
@@ -4048,7 +4047,7 @@ class AirflowModelView(ModelView):
)
@expose("/delete/<pk>", methods=["GET", "POST"])
- @has_access_with_pk
+ @auth.has_access_with_pk
def delete(self, pk):
"""
Delete view.
@@ -4746,7 +4745,7 @@ class PoolModelView(AirflowModelView):
return redirect(self.get_redirect())
@expose("/delete/<pk>", methods=["GET", "POST"])
- @has_access_with_pk
+ @auth.has_access_with_pk
def delete(self, pk):
"""Single delete."""
if models.Pool.is_default_pool(pk):
(airflow) 02/04: Add unit test for AUTH_ROLE_PUBLIC=Admin (#36787)
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 0d3766f3aff8d6c1735b4be2d8518a2cc4f3f86d
Author: Bob Du <i...@bobdu.cc>
AuthorDate: Mon Jan 15 18:01:04 2024 +0800
Add unit test for AUTH_ROLE_PUBLIC=Admin (#36787)
Signed-off-by: BobDu <i...@bobdu.cc>
(cherry picked from commit a87953e8382e2e5d0af98368e896fe78af04da27)
---
tests/test_utils/www.py | 7 +++
tests/www/views/conftest.py | 7 ++-
tests/www/views/test_anonymous_as_admin_role.py | 63 +++++++++++++++++++++++++
3 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/tests/test_utils/www.py b/tests/test_utils/www.py
index bd9e604097..b2420acb19 100644
--- a/tests/test_utils/www.py
+++ b/tests/test_utils/www.py
@@ -39,6 +39,13 @@ def client_without_login(app):
return client
+def client_without_login_as_admin(app):
+ # Anonymous users as Admin if set AUTH_ROLE_PUBLIC=Admin
+ app.config["AUTH_ROLE_PUBLIC"] = "Admin"
+ client = app.test_client()
+ return client
+
+
def check_content_in_response(text, resp, resp_code=200):
resp_html = resp.data.decode("utf-8")
assert resp_code == resp.status_code
diff --git a/tests/www/views/conftest.py b/tests/www/views/conftest.py
index aa531a8267..980ca5d4d2 100644
--- a/tests/www/views/conftest.py
+++ b/tests/www/views/conftest.py
@@ -30,7 +30,7 @@ from airflow.www.app import create_app
from tests.test_utils.api_connexion_utils import delete_user
from tests.test_utils.config import conf_vars
from tests.test_utils.decorators import dont_initialize_flask_app_submodules
-from tests.test_utils.www import client_with_login, client_without_login
+from tests.test_utils.www import client_with_login, client_without_login, client_without_login_as_admin
@pytest.fixture(autouse=True, scope="module")
@@ -130,6 +130,11 @@ def anonymous_client(app):
return client_without_login(app)
+@pytest.fixture()
+def anonymous_client_as_admin(app):
+ return client_without_login_as_admin(app)
+
+
class _TemplateWithContext(NamedTuple):
template: jinja2.environment.Template
context: dict[str, Any]
diff --git a/tests/www/views/test_anonymous_as_admin_role.py b/tests/www/views/test_anonymous_as_admin_role.py
new file mode 100644
index 0000000000..214f2ee3c9
--- /dev/null
+++ b/tests/www/views/test_anonymous_as_admin_role.py
@@ -0,0 +1,63 @@
+#
+# 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.
+from __future__ import annotations
+
+import pytest
+
+from airflow.models import Pool
+from airflow.utils.session import create_session
+from tests.test_utils.www import check_content_in_response
+
+pytestmark = pytest.mark.db_test
+
+POOL = {
+ "pool": "test-pool",
+ "slots": 777,
+ "description": "test-pool-description",
+ "include_deferred": False,
+}
+
+
+@pytest.fixture(autouse=True)
+def clear_pools():
+ with create_session() as session:
+ session.query(Pool).delete()
+
+
+@pytest.fixture()
+def pool_factory(session):
+ def factory(**values):
+ pool = Pool(**{**POOL, **values}) # Passed in values override defaults.
+ session.add(pool)
+ session.commit()
+ return pool
+
+ return factory
+
+
+def test_delete_pool_anonymous_user_no_role(anonymous_client, pool_factory):
+ pool = pool_factory()
+ resp = anonymous_client.post(f"pool/delete/{pool.id}")
+ assert 302 == resp.status_code
+ assert "/login/" == resp.headers["Location"]
+
+
+def test_delete_pool_anonymous_user_as_admin(anonymous_client_as_admin, pool_factory):
+ pool = pool_factory()
+ resp = anonymous_client_as_admin.post(f"pool/delete/{pool.id}", follow_redirects=True)
+ check_content_in_response("Deleted Row", resp)
(airflow) 03/04: Update version to 2.8.1
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 9e04729c7284a20f735717dfa4c0425a7d871744
Author: Ephraim Anierobi <sp...@gmail.com>
AuthorDate: Mon Jan 15 10:47:03 2024 +0100
Update version to 2.8.1
---
README.md | 14 ++--
RELEASE_NOTES.rst | 76 ++++++++++++++++++++++
airflow/__init__.py | 2 +-
airflow/api_connexion/openapi/v1.yaml | 2 +-
airflow/reproducible_build.yaml | 4 +-
dev/breeze/src/airflow_breeze/global_constants.py | 5 ++
.../installation/supported-versions.rst | 2 +-
docs/docker-stack/README.md | 10 +--
.../extending/add-airflow-configuration/Dockerfile | 2 +-
.../extending/add-apt-packages/Dockerfile | 2 +-
.../add-build-essential-extend/Dockerfile | 2 +-
.../extending/add-providers/Dockerfile | 2 +-
.../extending/add-pypi-packages/Dockerfile | 2 +-
.../extending/add-requirement-packages/Dockerfile | 2 +-
.../extending/custom-providers/Dockerfile | 2 +-
.../extending/embedding-dags/Dockerfile | 2 +-
.../extending/writable-directory/Dockerfile | 2 +-
docs/docker-stack/entrypoint.rst | 14 ++--
generated/PYPI_README.md | 12 ++--
.../ci/pre_commit/pre_commit_supported_versions.py | 2 +-
20 files changed, 121 insertions(+), 40 deletions(-)
diff --git a/README.md b/README.md
index b992bd77ea..ec998eacd0 100644
--- a/README.md
+++ b/README.md
@@ -97,11 +97,11 @@ 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.8.0) |
+| | Main version (dev) | Stable version (2.8.1) |
|-------------|------------------------------|------------------------------|
| Python | 3.8, 3.9, 3.10, 3.11 | 3.8, 3.9, 3.10, 3.11 |
| Platform | AMD64/ARM64(\*) | AMD64/ARM64(\*) |
-| Kubernetes | 1.25, 1.26, 1.27, 1.28, 1.29 | 1.25, 1.26, 1.27, 1.28 |
+| Kubernetes | 1.25, 1.26, 1.27, 1.28, 1.29 | 1.25, 1.26, 1.27, 1.28, 1.29 |
| PostgreSQL | 12, 13, 14, 15, 16 | 12, 13, 14, 15, 16 |
| MySQL | 8.0, Innovation | 8.0, Innovation |
| SQLite | 3.15.0+ | 3.15.0+ |
@@ -182,15 +182,15 @@ them to the appropriate format and workflow that your tool requires.
```bash
-pip install 'apache-airflow==2.8.0' \
- --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.0/constraints-3.8.txt"
+pip install 'apache-airflow==2.8.1' \
+ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.8.txt"
```
2. Installing with extras (i.e., postgres, google)
```bash
-pip install 'apache-airflow[postgres,google]==2.8.0' \
- --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.0/constraints-3.8.txt"
+pip install 'apache-airflow[postgres,google]==2.8.1' \
+ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.8.txt"
```
For information on installing provider packages, check
@@ -295,7 +295,7 @@ Apache Airflow version life cycle:
| Version | Current Patch/Minor | State | First Release | Limited Support | EOL/Terminated |
|-----------|-----------------------|-----------|-----------------|-------------------|------------------|
-| 2 | 2.8.0 | Supported | Dec 17, 2020 | TBD | TBD |
+| 2 | 2.8.1 | Supported | Dec 17, 2020 | TBD | 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 |
diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index 8f34a8dbf3..cdd3a4e42d 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -21,6 +21,82 @@
.. towncrier release notes start
+Airflow 2.8.1 (2024-01-19)
+--------------------------
+
+Significant Changes
+^^^^^^^^^^^^^^^^^^^
+
+- Target version for core dependency ``pendulum`` package set to 3
+
+ Support for pendulum 2.1.2 will be saved for a while, presumably until the next feature version of Airflow.
+ It is advised to upgrade user code to use pendulum 3 as soon as possible. (#36281)
+- Airflow packaging specification follows modern Python packaging standards.
+
+ We standardized Airflow dependency configuration to follow latest development in Python packaging by
+ using pyproject.toml. Airflow is now compliant with those accepted PEPs:
+
+ * `PEP-440 Version Identification and Dependency Specification <https://www.python.org/dev/peps/pep-0440/>`__
+ * `PEP-517 A build-system independent format for source trees <https://www.python.org/dev/peps/pep-0517/>`__
+ * `PEP-518 Specifying Minimum Build System Requirements for Python Projects <https://www.python.org/dev/peps/pep-0518/>`__
+ * `PEP-561 Distributing and Packaging Type Information <https://www.python.org/dev/peps/pep-0561/>`__
+ * `PEP-621 Storing project metadata in pyproject.toml <https://www.python.org/dev/peps/pep-0621/>`__
+ * `PEP-660 Editable installs for pyproject.toml based builds (wheel based) <https://www.python.org/dev/peps/pep-0660/>`__
+ * `PEP-685 Comparison of extra names for optional distribution dependencies <https://www.python.org/dev/peps/pep-0685/>`__
+
+ Also we implement multiple license files support coming from Draft, not yet accepted (but supported by hatchling) PEP:
+ * `PEP 639 Improving License Clarity with Better Package Metadata <https://peps.python.org/pep-0639/>`__
+
+ This has almost no noticeable impact on users if they are using modern Python packaging and development tools, generally
+ speaking Airflow should behave as it did before when installing it from PyPI and it should be much easier to install
+ it for development purposes using ``pip install -e ".[devel]"``.
+
+ The differences from the user side are:
+
+ * Airflow extras now get extras normalized to ``-`` (following PEP-685) instead of ``_`` and ``.``
+ (as it was before in some extras). When you install airflow with such extras (for example ``dbt.core`` or
+ ``all_dbs``) you should use ``-`` instead of ``_`` and ``.``.
+
+ In most modern tools this will work in backwards-compatible way, but in some old version of those tools you might need to
+ replace ``_`` and ``.`` with ``-``. You can also get warnings that the extra you are installing does not exist - but usually
+ this warning is harmless and the extra is installed anyway. It is, however, recommended to change to use ``-`` in extras in your dependency
+ specifications for all Airflow extras.
+
+ * Released airflow package does not contain ``devel``, ``devel-*``, ``doc`` and ``doc-gen`` extras.
+ Those extras are only available when you install Airflow from sources in ``--editable`` mode. This is
+ because those extras are only used for development and documentation building purposes and are not needed
+ when you install Airflow for production use. Those dependencies had unspecified and varying behaviour for
+ released packages anyway and you were not supposed to use them in released packages.
+
+ * The ``all`` and ``all-*`` extras were not always working correctly when installing Airflow using constraints
+ because they were also considered as development-only dependencies. With this change, those dependencies are
+ now properly handling constraints and they will install properly with constraints, pulling the right set
+ of providers and dependencies when constraints are used. (#36537)
+- Graphviz dependency is now an optional one, not required one.
+
+ The ``graphviz`` dependency has been problematic as Airflow required dependency - especially for
+ ARM-based installations. Graphviz packages require binary graphviz libraries - which is already a
+ limitation, but they also require to install graphviz Python bindings to be build and installed.
+ This does not work for older Linux installation but - more importantly - when you try to install
+ Graphviz libraries for Python 3.8, 3.9 for ARM M1 MacBooks, the packages fail to install because
+ Python bindings compilation for M1 can only work for Python 3.10+.
+
+ This is not a breaking change technically - the CLIs to render the DAGs is still there and IF you
+ already have graphviz installed, it will continue working as it did before. The only problem when it
+ does not work is where you do not have graphviz installed it will raise an error and inform that you need it.
+
+ Graphviz will remain to be installed for most users:
+
+ * the Airflow Image will still contain graphviz library, because
+ it is added there as extra
+ * when previous version of Airflow has been installed already, then
+ graphviz library is already installed there and Airflow will
+ continue working as it did
+
+ The only change will be a new installation of new version of Airflow from the scratch, where graphviz will
+ need to be specified as extra or installed separately in order to enable DAG rendering option. (#36647)
+
+
Airflow 2.8.0 (2023-12-18)
--------------------------
diff --git a/airflow/__init__.py b/airflow/__init__.py
index f5c12016c4..068039e754 100644
--- a/airflow/__init__.py
+++ b/airflow/__init__.py
@@ -26,7 +26,7 @@ isort:skip_file
"""
from __future__ import annotations
-__version__ = "2.8.1.dev0"
+__version__ = "2.8.1"
# flake8: noqa: F401
diff --git a/airflow/api_connexion/openapi/v1.yaml b/airflow/api_connexion/openapi/v1.yaml
index 5d0c58102a..0c34c44876 100644
--- a/airflow/api_connexion/openapi/v1.yaml
+++ b/airflow/api_connexion/openapi/v1.yaml
@@ -231,7 +231,7 @@ info:
This means that the server encountered an unexpected condition that prevented it from
fulfilling the request.
- version: '2.8.0'
+ version: '2.8.1'
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
diff --git a/airflow/reproducible_build.yaml b/airflow/reproducible_build.yaml
index 2bd6204c80..af282b6a04 100644
--- a/airflow/reproducible_build.yaml
+++ b/airflow/reproducible_build.yaml
@@ -1,2 +1,2 @@
-release-notes-hash: 81a945804fc42c18f416b5aa1f4b0fde
-source-date-epoch: 1704922121
+release-notes-hash: b0d8fdf0caf6f957b63ee7f4ee2147b9
+source-date-epoch: 1705311983
diff --git a/dev/breeze/src/airflow_breeze/global_constants.py b/dev/breeze/src/airflow_breeze/global_constants.py
index ded03520b8..0e208081ad 100644
--- a/dev/breeze/src/airflow_breeze/global_constants.py
+++ b/dev/breeze/src/airflow_breeze/global_constants.py
@@ -481,6 +481,11 @@ BASE_PROVIDERS_COMPATIBILITY_CHECKS: list[dict[str, str]] = [
"airflow-version": "2.7.1",
"remove-providers": _exclusion(["common.io"]),
},
+ {
+ "python-version": "3.8",
+ "airflow-version": "2.8.1",
+ "remove-providers": _exclusion(["fab"]),
+ },
]
diff --git a/docs/apache-airflow/installation/supported-versions.rst b/docs/apache-airflow/installation/supported-versions.rst
index 19c24074bb..96ebdafcb5 100644
--- a/docs/apache-airflow/installation/supported-versions.rst
+++ b/docs/apache-airflow/installation/supported-versions.rst
@@ -29,7 +29,7 @@ Apache Airflowâ„¢ version life cycle:
========= ===================== ========= =============== ================= ================
Version Current Patch/Minor State First Release Limited Support EOL/Terminated
========= ===================== ========= =============== ================= ================
-2 2.8.0 Supported Dec 17, 2020 TBD TBD
+2 2.8.1 Supported Dec 17, 2020 TBD 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
diff --git a/docs/docker-stack/README.md b/docs/docker-stack/README.md
index c95a2d05cf..68b9edfb9c 100644
--- a/docs/docker-stack/README.md
+++ b/docs/docker-stack/README.md
@@ -31,12 +31,12 @@ Every time a new version of Airflow is released, the images are prepared in the
[apache/airflow DockerHub](https://hub.docker.com/r/apache/airflow)
for all the supported Python versions.
-You can find the following images there (Assuming Airflow version `2.8.1.dev0`):
+You can find the following images there (Assuming Airflow version `2.8.1`):
* `apache/airflow:latest` - the latest released Airflow image with default Python version (3.8 currently)
* `apache/airflow:latest-pythonX.Y` - the latest released Airflow image with specific Python version
-* `apache/airflow:2.8.1.dev0` - the versioned Airflow image with default Python version (3.8 currently)
-* `apache/airflow:2.8.1.dev0-pythonX.Y` - the versioned Airflow image with specific Python version
+* `apache/airflow:2.8.1` - the versioned Airflow image with default Python version (3.8 currently)
+* `apache/airflow:2.8.1-pythonX.Y` - the versioned Airflow image with specific Python version
Those are "reference" regular images. They contain the most common set of extras, dependencies and providers that are
often used by the users and they are good to "try-things-out" when you want to just take Airflow for a spin,
@@ -47,8 +47,8 @@ via [Building the image](https://airflow.apache.org/docs/docker-stack/build.html
* `apache/airflow:slim-latest` - the latest released Airflow image with default Python version (3.8 currently)
* `apache/airflow:slim-latest-pythonX.Y` - the latest released Airflow image with specific Python version
-* `apache/airflow:slim-2.8.1.dev0` - the versioned Airflow image with default Python version (3.8 currently)
-* `apache/airflow:slim-2.8.1.dev0-pythonX.Y` - the versioned Airflow image with specific Python version
+* `apache/airflow:slim-2.8.1` - the versioned Airflow image with default Python version (3.8 currently)
+* `apache/airflow:slim-2.8.1-pythonX.Y` - the versioned Airflow image with specific Python version
The Apache Airflow image provided as convenience package is optimized for size, and
it provides just a bare minimal set of the extras and dependencies installed and in most cases
diff --git a/docs/docker-stack/docker-examples/extending/add-airflow-configuration/Dockerfile b/docs/docker-stack/docker-examples/extending/add-airflow-configuration/Dockerfile
index f52d8e263f..7359b315c0 100644
--- a/docs/docker-stack/docker-examples/extending/add-airflow-configuration/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/add-airflow-configuration/Dockerfile
@@ -15,7 +15,7 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
ENV AIRFLOW__CORE__LOAD_EXAMPLES=True
ENV AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=my_conn_string
# [END Dockerfile]
diff --git a/docs/docker-stack/docker-examples/extending/add-apt-packages/Dockerfile b/docs/docker-stack/docker-examples/extending/add-apt-packages/Dockerfile
index 83ce81d793..4c6988ee52 100644
--- a/docs/docker-stack/docker-examples/extending/add-apt-packages/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/add-apt-packages/Dockerfile
@@ -15,7 +15,7 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
diff --git a/docs/docker-stack/docker-examples/extending/add-build-essential-extend/Dockerfile b/docs/docker-stack/docker-examples/extending/add-build-essential-extend/Dockerfile
index a6c4c3bf8b..6001e53d32 100644
--- a/docs/docker-stack/docker-examples/extending/add-build-essential-extend/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/add-build-essential-extend/Dockerfile
@@ -15,7 +15,7 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
diff --git a/docs/docker-stack/docker-examples/extending/add-providers/Dockerfile b/docs/docker-stack/docker-examples/extending/add-providers/Dockerfile
index 809930a804..fa57932f5f 100644
--- a/docs/docker-stack/docker-examples/extending/add-providers/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/add-providers/Dockerfile
@@ -15,7 +15,7 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
diff --git a/docs/docker-stack/docker-examples/extending/add-pypi-packages/Dockerfile b/docs/docker-stack/docker-examples/extending/add-pypi-packages/Dockerfile
index 7d80095402..420e80e2df 100644
--- a/docs/docker-stack/docker-examples/extending/add-pypi-packages/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/add-pypi-packages/Dockerfile
@@ -15,6 +15,6 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
RUN pip install --no-cache-dir "apache-airflow==${AIRFLOW_VERSION}" lxml
# [END Dockerfile]
diff --git a/docs/docker-stack/docker-examples/extending/add-requirement-packages/Dockerfile b/docs/docker-stack/docker-examples/extending/add-requirement-packages/Dockerfile
index 4a88926d36..16f4ff92ba 100644
--- a/docs/docker-stack/docker-examples/extending/add-requirement-packages/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/add-requirement-packages/Dockerfile
@@ -15,7 +15,7 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
COPY requirements.txt /
RUN pip install --no-cache-dir "apache-airflow==${AIRFLOW_VERSION}" -r /requirements.txt
# [END Dockerfile]
diff --git a/docs/docker-stack/docker-examples/extending/custom-providers/Dockerfile b/docs/docker-stack/docker-examples/extending/custom-providers/Dockerfile
index 09f96a8d0d..e12cf72862 100644
--- a/docs/docker-stack/docker-examples/extending/custom-providers/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/custom-providers/Dockerfile
@@ -15,6 +15,6 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
RUN pip install "apache-airflow==${AIRFLOW_VERSION}" --no-cache-dir apache-airflow-providers-docker==2.5.1
# [END Dockerfile]
diff --git a/docs/docker-stack/docker-examples/extending/embedding-dags/Dockerfile b/docs/docker-stack/docker-examples/extending/embedding-dags/Dockerfile
index 95aa073203..bee0eb7404 100644
--- a/docs/docker-stack/docker-examples/extending/embedding-dags/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/embedding-dags/Dockerfile
@@ -15,7 +15,7 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
COPY --chown=airflow:root test_dag.py /opt/airflow/dags
diff --git a/docs/docker-stack/docker-examples/extending/writable-directory/Dockerfile b/docs/docker-stack/docker-examples/extending/writable-directory/Dockerfile
index 963705303b..824a0a7ee0 100644
--- a/docs/docker-stack/docker-examples/extending/writable-directory/Dockerfile
+++ b/docs/docker-stack/docker-examples/extending/writable-directory/Dockerfile
@@ -15,7 +15,7 @@
# This is an example Dockerfile. It is not intended for PRODUCTION use
# [START Dockerfile]
-FROM apache/airflow:2.8.1.dev0
+FROM apache/airflow:2.8.1
RUN umask 0002; \
mkdir -p ~/writeable-directory
# [END Dockerfile]
diff --git a/docs/docker-stack/entrypoint.rst b/docs/docker-stack/entrypoint.rst
index a08d5ab2b0..f236bcd0d6 100644
--- a/docs/docker-stack/entrypoint.rst
+++ b/docs/docker-stack/entrypoint.rst
@@ -132,7 +132,7 @@ if you specify extra arguments. For example:
.. code-block:: bash
- docker run -it apache/airflow:2.8.1.dev0-python3.8 bash -c "ls -la"
+ docker run -it apache/airflow:2.8.1-python3.8 bash -c "ls -la"
total 16
drwxr-xr-x 4 airflow root 4096 Jun 5 18:12 .
drwxr-xr-x 1 root root 4096 Jun 5 18:12 ..
@@ -144,7 +144,7 @@ you pass extra parameters. For example:
.. code-block:: bash
- > docker run -it apache/airflow:2.8.1.dev0-python3.8 python -c "print('test')"
+ > docker run -it apache/airflow:2.8.1-python3.8 python -c "print('test')"
test
If first argument equals to "airflow" - the rest of the arguments is treated as an airflow command
@@ -152,13 +152,13 @@ to execute. Example:
.. code-block:: bash
- docker run -it apache/airflow:2.8.1.dev0-python3.8 airflow webserver
+ docker run -it apache/airflow:2.8.1-python3.8 airflow webserver
If there are any other arguments - they are simply passed to the "airflow" command
.. code-block:: bash
- > docker run -it apache/airflow:2.8.1.dev0-python3.8 help
+ > docker run -it apache/airflow:2.8.1-python3.8 help
usage: airflow [-h] GROUP_OR_COMMAND ...
positional arguments:
@@ -363,7 +363,7 @@ database and creating an ``admin/admin`` Admin user with the following command:
--env "_AIRFLOW_DB_MIGRATE=true" \
--env "_AIRFLOW_WWW_USER_CREATE=true" \
--env "_AIRFLOW_WWW_USER_PASSWORD=admin" \
- apache/airflow:2.8.1.dev0-python3.8 webserver
+ apache/airflow:2.8.1-python3.8 webserver
.. code-block:: bash
@@ -372,7 +372,7 @@ database and creating an ``admin/admin`` Admin user with the following command:
--env "_AIRFLOW_DB_MIGRATE=true" \
--env "_AIRFLOW_WWW_USER_CREATE=true" \
--env "_AIRFLOW_WWW_USER_PASSWORD_CMD=echo admin" \
- apache/airflow:2.8.1.dev0-python3.8 webserver
+ apache/airflow:2.8.1-python3.8 webserver
The commands above perform initialization of the SQLite database, create admin user with admin password
and Admin role. They also forward local port ``8080`` to the webserver port and finally start the webserver.
@@ -412,6 +412,6 @@ Example:
--env "_AIRFLOW_DB_MIGRATE=true" \
--env "_AIRFLOW_WWW_USER_CREATE=true" \
--env "_AIRFLOW_WWW_USER_PASSWORD_CMD=echo admin" \
- apache/airflow:2.8.1.dev0-python3.8 webserver
+ apache/airflow:2.8.1-python3.8 webserver
This method is only available starting from Docker image of Airflow 2.1.1 and above.
diff --git a/generated/PYPI_README.md b/generated/PYPI_README.md
index 30ad2e2f41..d8d3e99835 100644
--- a/generated/PYPI_README.md
+++ b/generated/PYPI_README.md
@@ -54,11 +54,11 @@ Use Airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The
Apache Airflow is tested with:
-| | Main version (dev) | Stable version (2.8.0) |
+| | Main version (dev) | Stable version (2.8.1) |
|-------------|------------------------------|------------------------------|
| Python | 3.8, 3.9, 3.10, 3.11 | 3.8, 3.9, 3.10, 3.11 |
| Platform | AMD64/ARM64(\*) | AMD64/ARM64(\*) |
-| Kubernetes | 1.25, 1.26, 1.27, 1.28, 1.29 | 1.25, 1.26, 1.27, 1.28 |
+| Kubernetes | 1.25, 1.26, 1.27, 1.28, 1.29 | 1.25, 1.26, 1.27, 1.28, 1.29 |
| PostgreSQL | 12, 13, 14, 15, 16 | 12, 13, 14, 15, 16 |
| MySQL | 8.0, Innovation | 8.0, Innovation |
| SQLite | 3.15.0+ | 3.15.0+ |
@@ -135,15 +135,15 @@ them to the appropriate format and workflow that your tool requires.
```bash
-pip install 'apache-airflow==2.8.0' \
- --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.0/constraints-3.8.txt"
+pip install 'apache-airflow==2.8.1' \
+ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.8.txt"
```
2. Installing with extras (i.e., postgres, google)
```bash
-pip install 'apache-airflow[postgres,google]==2.8.0' \
- --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.0/constraints-3.8.txt"
+pip install 'apache-airflow[postgres,google]==2.8.1' \
+ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.8.txt"
```
For information on installing provider packages, check
diff --git a/scripts/ci/pre_commit/pre_commit_supported_versions.py b/scripts/ci/pre_commit/pre_commit_supported_versions.py
index 9acf012a4f..60c67e874a 100755
--- a/scripts/ci/pre_commit/pre_commit_supported_versions.py
+++ b/scripts/ci/pre_commit/pre_commit_supported_versions.py
@@ -27,7 +27,7 @@ AIRFLOW_SOURCES = Path(__file__).resolve().parent.parent.parent.parent
HEADERS = ("Version", "Current Patch/Minor", "State", "First Release", "Limited Support", "EOL/Terminated")
SUPPORTED_VERSIONS = (
- ("2", "2.8.0", "Supported", "Dec 17, 2020", "TBD", "TBD"),
+ ("2", "2.8.1", "Supported", "Dec 17, 2020", "TBD", "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"),