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 2022/07/05 18:11:05 UTC

[airflow] branch v2-3-test updated (5cab56d03a -> 78f215a192)

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

ephraimanierobi pushed a change to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


 discard 5cab56d03a fixup! fixup! Update the release note
 discard 4c0a165388 fixup! Update the release note
 discard 480e7d6763 Update the release note
     new 7a4869c737 Fix cycle bug with attaching label to task group (#24847)
     new a8762fca89 improve grid date tick spacing (#24849)
     new 78f215a192 Update the release note

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   (5cab56d03a)
            \
             N -- N -- N   refs/heads/v2-3-test (78f215a192)

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 3 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                                 |  3 ++-
 airflow/utils/task_group.py                       | 12 +++++------
 airflow/www/static/js/grid/dagRuns/Bar.tsx        |  5 +++--
 airflow/www/static/js/grid/dagRuns/index.test.tsx |  2 +-
 tests/utils/test_task_group.py                    | 25 +++++++++++++++++++++++
 5 files changed, 37 insertions(+), 10 deletions(-)


[airflow] 02/03: improve grid date tick spacing (#24849)

Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a8762fca890e1cbb9182d28afd2c386cf93ad495
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Tue Jul 5 14:01:54 2022 -0400

    improve grid date tick spacing (#24849)
    
    (cherry picked from commit 6caaf476d3ca53f2e53701b21de1d4f828e8b8b1)
---
 airflow/www/static/js/grid/dagRuns/Bar.tsx        | 5 +++--
 airflow/www/static/js/grid/dagRuns/index.test.tsx | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/airflow/www/static/js/grid/dagRuns/Bar.tsx b/airflow/www/static/js/grid/dagRuns/Bar.tsx
index 7e9b2ef353..660619f5b7 100644
--- a/airflow/www/static/js/grid/dagRuns/Bar.tsx
+++ b/airflow/www/static/js/grid/dagRuns/Bar.tsx
@@ -70,8 +70,9 @@ const DagRunBar = ({
   };
 
   // show the tick on the 4th DagRun and then every 10th tick afterwards
-  const shouldShowTick = index === totalRuns - 4
-    || (index < totalRuns - 4 && (index + 4) % 10 === 0);
+  const inverseIndex = totalRuns - index;
+  const shouldShowTick = inverseIndex === 4
+    || (inverseIndex > 4 && (inverseIndex - 4) % 10 === 0);
 
   return (
     <Box
diff --git a/airflow/www/static/js/grid/dagRuns/index.test.tsx b/airflow/www/static/js/grid/dagRuns/index.test.tsx
index 612c96eb27..c91e15f59f 100644
--- a/airflow/www/static/js/grid/dagRuns/index.test.tsx
+++ b/airflow/www/static/js/grid/dagRuns/index.test.tsx
@@ -106,7 +106,7 @@ describe('Test DagRuns', () => {
   test('Show 1 date tick when there are less than 14 runs', () => {
     const data = {
       groups: {},
-      dagRuns: generateRuns(8),
+      dagRuns: generateRuns(11),
     };
     const spy = jest.spyOn(useGridDataModule, 'default').mockImplementation(() => ({
       data,


[airflow] 03/03: Update the release note

Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 78f215a192914ed3ef1a7105dddf727be8494dd1
Author: Ephraim Anierobi <sp...@gmail.com>
AuthorDate: Tue Jul 5 15:44:34 2022 +0100

    Update the release note
---
 RELEASE_NOTES.rst              | 19 ++++++++++++++++++-
 docs/docker-stack/index.rst    |  4 ++--
 docs/spelling_wordlist.txt     |  1 +
 newsfragments/23647.bugfix.rst |  1 -
 4 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index ed9ea874af..de769ef453 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -64,8 +64,22 @@ Here is the list of breaking changes in dependencies that comes together with FA
 Bug Fixes
 ^^^^^^^^^
 
+- Fix cycle bug with attaching label to task group (#24847)
+- Fix timestamp defaults for ``sensorinstance`` (#24638)
+- Move fallible ``ti.task.dag`` assignment back inside ``try/except`` block (#24533) (#24592)
+- Add missing types to ``FSHook`` (#24470)
+- Mask secrets in ``stdout`` for ``airflow tasks test`` (#24362)
+- ``DebugExecutor`` use ``ti.run()`` instead of ``ti._run_raw_task`` (#24357)
+- Fix bugs in ``URI`` constructor for ``MySQL`` connection (#24320)
+- Missing ``scheduleinterval`` nullable true added in ``openapi`` (#24253)
+- Unify ``return_code`` interface for task runner (#24093)
+- Handle occasional deadlocks in trigger with retries (#24071)
+- Remove special serde logic for mapped ``op_kwargs`` (#23860)
+- ``ExternalTaskSensor`` respects ``soft_fail`` if the external task enters a ``failed_state`` (#23647)
+- Fix ``StatD`` timing metric units (#21106)
+- Add ``cache_ok`` flag to sqlalchemy TypeDecorators. (#24499)
 - Allow for ``LOGGING_LEVEL=DEBUG`` (#23360)
-- Fix grid date ticks (#24738)
+- Fix grid date ticks (#24738, #24849)
 - Debounce status highlighting in Grid view (#24710)
 - Fix Grid vertical scrolling (#24684)
 - don't try to render child rows for closed groups (#24637)
@@ -107,6 +121,7 @@ Bug Fixes
 Doc only changes
 ^^^^^^^^^^^^^^^^
 
+- Fix doc description of ``[core]`` parallelism config setting (#23768)
 - Update templates doc to mention ``extras`` and format Airflow ``Vars`` / ``Conns`` (#24735)
 - Document built in Timetables (#23099)
 - Alphabetizes two tables (#23923)
@@ -121,6 +136,8 @@ Doc only changes
 Misc/Internal
 ^^^^^^^^^^^^^
 
+- Drop Python ``3.6`` compatibility objects/modules (#24048)
+- Remove upper-binding for SQLAlchemy (#24819)
 - Remove internet explorer support (#24495)
 - Removing magic status code numbers from ``api_connexion`` (#24050)
 - Upgrade FAB to ``4.1.2`` (#24619)
diff --git a/docs/docker-stack/index.rst b/docs/docker-stack/index.rst
index ed52625031..87e1f4088c 100644
--- a/docs/docker-stack/index.rst
+++ b/docs/docker-stack/index.rst
@@ -59,7 +59,7 @@ Those are "reference" regular images. They contain the most common set of extras
 often used by the users and they are good to "try-things-out" when you want to just take Airflow for a spin,
 
 You can also use "slim" images that contain only core airflow and are about half the size of the "regular" images
-but you need to add all the :doc:`extra-packages-ref` and providers that you need separately
+but you need to add all the extra packages and providers that you need separately
 via :ref:`Building the image <build:build_image>`.
 
 * :subst-code:`apache/airflow:slim-latest`              - the latest released Airflow image with default Python version (3.7 currently)
@@ -69,7 +69,7 @@ via :ref:`Building the image <build:build_image>`.
 
 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
-you want to either extend or customize the image. You can see all possible extras in :doc:`extra-packages-ref`.
+you want to either extend or customize the image. You can see all possible extras in :doc:`apache-airflow:extra-packages-ref`.
 The set of extras used in Airflow Production image are available in the
 `Dockerfile <https://github.com/apache/airflow/blob/2c6c7fdb2308de98e142618836bdf414df9768c8/Dockerfile#L37>`_.
 
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index fd7a57694d..33a6acdc50 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -1319,6 +1319,7 @@ seealso
 seedlist
 segmentGranularity
 sendgrid
+serde
 serialise
 serializable
 serverless
diff --git a/newsfragments/23647.bugfix.rst b/newsfragments/23647.bugfix.rst
deleted file mode 100644
index d12c1d7046..0000000000
--- a/newsfragments/23647.bugfix.rst
+++ /dev/null
@@ -1 +0,0 @@
-``ExternalTaskSensor`` now supports the ``soft_fail`` flag to skip if external task or DAG enters a failed state.


[airflow] 01/03: Fix cycle bug with attaching label to task group (#24847)

Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7a4869c737e46acb1fe794acef588b7251d2c4a9
Author: Ash Berlin-Taylor <as...@apache.org>
AuthorDate: Tue Jul 5 16:40:00 2022 +0100

    Fix cycle bug with attaching label to task group (#24847)
    
    The problem was specific to EdgeModifiers as they try to be
    "transparent" to upstream/downstream
    
    The fix is to set track the upstream/downstream for the task group
    before making any changes to the EdgeModifiers' relations -- otherwise
    the roots of the TG were added as dependencies to themeslves!
    
    (cherry picked from commit efc05a5f0b3d261293c2efaf6771e4af9a2f324c)
---
 airflow/utils/task_group.py    | 12 ++++++------
 tests/utils/test_task_group.py | 25 +++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/airflow/utils/task_group.py b/airflow/utils/task_group.py
index ed8d380ff0..64c11f79db 100644
--- a/airflow/utils/task_group.py
+++ b/airflow/utils/task_group.py
@@ -283,6 +283,12 @@ class TaskGroup(DAGNode):
         Call set_upstream/set_downstream for all root/leaf tasks within this TaskGroup.
         Update upstream_group_ids/downstream_group_ids/upstream_task_ids/downstream_task_ids.
         """
+        if not isinstance(task_or_task_list, Sequence):
+            task_or_task_list = [task_or_task_list]
+
+        for task_like in task_or_task_list:
+            self.update_relative(task_like, upstream)
+
         if upstream:
             for task in self.get_roots():
                 task.set_upstream(task_or_task_list)
@@ -290,12 +296,6 @@ class TaskGroup(DAGNode):
             for task in self.get_leaves():
                 task.set_downstream(task_or_task_list)
 
-        if not isinstance(task_or_task_list, Sequence):
-            task_or_task_list = [task_or_task_list]
-
-        for task_like in task_or_task_list:
-            self.update_relative(task_like, upstream)
-
     def __enter__(self) -> "TaskGroup":
         TaskGroupContext.push_context_managed_task_group(self)
         return self
diff --git a/tests/utils/test_task_group.py b/tests/utils/test_task_group.py
index 9aacc96b82..864b2fb68a 100644
--- a/tests/utils/test_task_group.py
+++ b/tests/utils/test_task_group.py
@@ -1222,3 +1222,28 @@ def test_add_to_another_group():
             tg.add(task)
 
     assert str(ctx.value) == "cannot add 'section_2.task' to 'section_1' (already in group 'section_2')"
+
+
+def test_task_group_edge_modifier_chain():
+    from airflow.models.baseoperator import chain
+    from airflow.utils.edgemodifier import Label
+
+    with DAG(dag_id="test", start_date=pendulum.DateTime(2022, 5, 20)) as dag:
+        start = EmptyOperator(task_id="sleep_3_seconds")
+
+        with TaskGroup(group_id="group1") as tg:
+            t1 = EmptyOperator(task_id="dummy1")
+            t2 = EmptyOperator(task_id="dummy2")
+
+        t3 = EmptyOperator(task_id="echo_done")
+
+    # The case we are testing for is when a Label is inside a list -- meaning that we do tg.set_upstream
+    # instead of label.set_downstream
+    chain(start, [Label("branch three")], tg, t3)
+
+    assert start.downstream_task_ids == {t1.node_id, t2.node_id}
+    assert t3.upstream_task_ids == {t1.node_id, t2.node_id}
+    assert tg.upstream_task_ids == set()
+    assert tg.downstream_task_ids == {t3.node_id}
+    # Check that we can perform a topological_sort
+    dag.topological_sort()