You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2022/09/09 12:35:51 UTC

[airflow] 01/04: Reformat 2.4.0 release notes (#26247)

This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch v2-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 7b6da0ad7cccd4e8eede72b3021dfb07b6b7f58e
Author: Jed Cunningham <66...@users.noreply.github.com>
AuthorDate: Thu Sep 8 12:28:01 2022 -0700

    Reformat 2.4.0 release notes (#26247)
    
    This makes them proper sections and reorders a couple of them as well.
    
    (cherry picked from commit 49fb3ffb99705dda77f0b57c9d6be7829e4549f5)
---
 RELEASE_NOTES.rst | 141 +++++++++++++++++++++++++++++-------------------------
 1 file changed, 77 insertions(+), 64 deletions(-)

diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index f976b1631c..8663f278fb 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -27,105 +27,118 @@ Airflow 2.4.0beta1 (2022-09-08)
 Significant Changes
 ^^^^^^^^^^^^^^^^^^^
 
-- The DB related classes: ``DBApiHook``, ``SQLSensor`` have been moved to ``apache-airflow-providers-common-sql`` provider. (NEW)
-- DAGS used in a context manager no longer need to be assigned to a module variable (#23592)
+DAGS used in a context manager no longer need to be assigned to a module variable (#23592)
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-  Previously you had do assign a DAG to a module-level variable in order for Airflow to pick it up. For example this
+Previously you had do assign a DAG to a module-level variable in order for Airflow to pick it up. For example this
 
-  .. code-block:: python
+.. code-block:: python
 
-     with DAG(dag_id="example") as dag:
-         ...
+   with DAG(dag_id="example") as dag:
+       ...
 
 
-     @dag
-     def dag_maker():
-         ...
+   @dag
+   def dag_maker():
+       ...
 
 
-     dag2 = dag_maker()
+   dag2 = dag_maker()
 
 
-  can become
+can become
 
-  .. code-block:: python
+.. code-block:: python
+
+   with DAG(dag_id="example"):
+       ...
 
-     with DAG(dag_id="example"):
-         ...
 
+   @dag
+   def dag_maker():
+       ...
 
-     @dag
-     def dag_maker():
-         ...
 
+   dag_maker()
+
+If you want to disable the behaviour for any reason then set ``auto_register=False`` on the dag:
+
+.. code-block:: python
+
+   # This dag will not be picked up by Airflow as it's not assigned to a variable
+   with DAG(dag_id="example", auto_register=False):
+       ...
+
+Deprecation of ``schedule_interval`` and ``timetable`` arguments (#25410)
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-     dag_maker()
+We added new DAG argument ``schedule`` that can accept a cron expression, timedelta object, *timetable* object, or list of dataset objects. Arguments ``schedule_interval`` and ``timetable`` are deprecated.
 
-  If you want to disable the behaviour for any reason then set ``auto_register=False`` on the dag:
+If you previously used the ``@daily`` cron preset, your DAG may have looked like this:
 
-  .. code-block:: python
+.. code-block:: python
 
-     # This dag will not be picked up by Airflow as it's not assigned to a variable
-     with DAG(dag_id="example", auto_register=False):
-         ...
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        schedule_interval='@daily',
+    ):
+        ...
 
-- DAG runs sorting logic changed in grid view (#25410)
+Going forward, you should use the ``schedule`` argument instead:
 
-  The ordering of DAG runs in the grid view has been changed to be more "natural".
-  The new logic generally orders by data interval, but a custom ordering can be
-  applied by setting the DAG to use a custom timetable. (#25090)
-- Deprecation of ``schedule_interval`` and ``timetable`` arguments
+.. code-block:: python
 
-  We added new DAG argument ``schedule`` that can accept a cron expression, timedelta object, *timetable* object, or list of dataset objects. Arguments ``schedule_interval`` and ``timetable`` are deprecated.
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        schedule='@daily',
+    ):
+        ...
 
-  If you previously used the ``@daily`` cron preset, your DAG may have looked like this:
+The same is true if you used a custom timetable.  Previously you would have used the ``timetable`` argument:
 
-  .. code-block:: python
+.. code-block:: python
 
-      with DAG(
-          dag_id='my_example',
-          start_date=datetime(2021, 1, 1),
-          schedule_interval='@daily',
-      ):
-          ...
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        timetable=EventsTimetable(event_dates=[pendulum.datetime(2022, 4, 5)]),
+    ):
+        ...
 
-  Going forward, you should use the ``schedule`` argument instead:
+Now you should use the ``schedule`` argument:
 
-  .. code-block:: python
+.. code-block:: python
 
-      with DAG(
-          dag_id='my_example',
-          start_date=datetime(2021, 1, 1),
-          schedule='@daily',
-      ):
-          ...
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        schedule=EventsTimetable(event_dates=[pendulum.datetime(2022, 4, 5)]),
+    ):
+        ...
 
-  The same is true if you used a custom timetable.  Previously you would have used the ``timetable`` argument:
+Removal of experimental Smart Sensors (#25507)
+""""""""""""""""""""""""""""""""""""""""""""""
 
-  .. code-block:: python
+Smart Sensors were added in 2.0 and deprecated in favor of Deferrable operators in 2.2, and have now been removed.
 
-      with DAG(
-          dag_id='my_example',
-          start_date=datetime(2021, 1, 1),
-          timetable=EventsTimetable(event_dates=[pendulum.datetime(2022, 4, 5)]),
-      ):
-          ...
+``airflow.contrib`` packages and deprecated modules are dynamically generated (#26153, #26179, #26167)
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-  Now you should use the ``schedule`` argument:
+The ``airflow.contrib`` packages and deprecated modules from Airflow 1.10 in ``airflow.hooks``, ``airflow.operators``, ``airflow.sensors`` packages, have now dynamically generated modules and while users can continue using the deprecated contrib classes, they are no longer visible for static code check tools and will be reported as missing. It is recommended for the users to move to non-deprecated classes.
 
-  .. code-block:: python
+``DBApiHook`` and ``SQLSensor`` have moved (#24836)
+"""""""""""""""""""""""""""""""""""""""""""""""""""
 
-      with DAG(
-          dag_id='my_example',
-          start_date=datetime(2021, 1, 1),
-          schedule=EventsTimetable(event_dates=[pendulum.datetime(2022, 4, 5)]),
-      ):
-          ...
+``DBApiHook``, ``SQLSensor`` have been moved to the ``apache-airflow-providers-common-sql`` provider.
 
-- Removal of experimental Smart Sensors (#25507)
+DAG runs sorting logic changed in grid view (#25090)
+""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-  Smart Sensors were added in 2.0 and deprecated in favor of Deferrable operators in 2.2, and have now been removed.
-- The ``airflow.contrib`` packages and deprecated modules from Airflow 1.10 in ``airflow.hooks``, ``airflow.operators``, ``airflow.sensors`` packages, have now dynamically generated modules and while users can continue using the deprecated contrib classes, they are no longer visible for static code check tools and will be reported as missing. It is recommended for the users to move to non-deprecated classes. (#26153, #26179, #26167)
+The ordering of DAG runs in the grid view has been changed to be more "natural".
+The new logic generally orders by data interval, but a custom ordering can be
+applied by setting the DAG to use a custom timetable.
 
 
 Features