You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2020/06/05 11:24:02 UTC

[airflow] branch v1-10-test updated (f6b0376 -> d0de41c)

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

kaxilnaik pushed a change to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git.


 discard f6b0376  [AIRFLOW-6959] Use NULL as dag.description default value (#7593)
     new d0de41c  [AIRFLOW-6959] Use NULL as dag.description default value (#7593)

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   (f6b0376)
            \
             N -- N -- N   refs/heads/v1-10-test (d0de41c)

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 1 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:


[airflow] 01/01: [AIRFLOW-6959] Use NULL as dag.description default value (#7593)

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

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit d0de41cd79bee87308b4e6eed11195d99ef61ed2
Author: Jiajie Zhong <zh...@hotmail.com>
AuthorDate: Fri Mar 20 16:00:56 2020 +0800

    [AIRFLOW-6959] Use NULL as dag.description default value (#7593)
    
    (cherry-picked from ff3700d2f)
---
 UPDATING.md                                  | 7 +++++++
 airflow/models/dag.py                        | 2 +-
 airflow/www/templates/airflow/dag.html       | 3 ++-
 airflow/www/templates/airflow/dags.html      | 5 +++--
 airflow/www_rbac/templates/airflow/dag.html  | 3 ++-
 airflow/www_rbac/templates/airflow/dags.html | 3 ++-
 6 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/UPDATING.md b/UPDATING.md
index fbea0b3..336459b 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -25,6 +25,7 @@ assists users migrating to a new version.
 <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
 **Table of contents**
 
+- [Airflow 1.10.11](#airflow-11011)
 - [Airflow 1.10.10](#airflow-11010)
 - [Airflow 1.10.9](#airflow-1109)
 - [Airflow 1.10.8](#airflow-1108)
@@ -59,6 +60,12 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+## Airflow 1.10.11
+
+### Use NULL as default value for dag.description
+
+Now use NULL as default value for dag.description in dag table
+
 ## Airflow 1.10.10
 
 ### Setting Empty string to a Airflow Variable will return an empty string
diff --git a/airflow/models/dag.py b/airflow/models/dag.py
index 4d7eef8..3f46bf6 100644
--- a/airflow/models/dag.py
+++ b/airflow/models/dag.py
@@ -215,7 +215,7 @@ class DAG(BaseDag, LoggingMixin):
     def __init__(
         self,
         dag_id,  # type: str
-        description='',  # type: str
+        description=None,  # type: Optional[str]
         schedule_interval=timedelta(days=1),  # type: Optional[ScheduleInterval]
         start_date=None,  # type: Optional[datetime]
         end_date=None,  # type: Optional[datetime]
diff --git a/airflow/www/templates/airflow/dag.html b/airflow/www/templates/airflow/dag.html
index 583e2c7..89d3ce0 100644
--- a/airflow/www/templates/airflow/dag.html
+++ b/airflow/www/templates/airflow/dag.html
@@ -35,7 +35,8 @@
         <span style='color:#AAA;'>SUBDAG: </span> <span> {{ dag.dag_id }}</span>
       {% else %}
         <input id="pause_resume" dag_id="{{ dag.dag_id }}" type="checkbox" {{ "checked" if not dag.is_paused else "" }} data-toggle="toggle" data-size="mini" method="post">
-        <span style='color:#AAA;'>DAG: </span> <span> {{ dag.dag_id }}</span> <small class="text-muted"> {{ dag.description_unicode }} </small>
+        <span style='color:#AAA;'>DAG: </span> <span> {{ dag.dag_id }}</span>
+        <small class="text-muted"> {{ dag.description_unicode[0:150] + '...' if dag.description_unicode and dag.description_unicode|length > 150 else dag.description_unicode|default('', true) }} </small>
       {% endif %}
       {% if root %}
         <span style='color:#AAA;'>ROOT: </span> <span> {{ root }}</span>
diff --git a/airflow/www/templates/airflow/dags.html b/airflow/www/templates/airflow/dags.html
index 5c3806d..ec4e4d0 100644
--- a/airflow/www/templates/airflow/dags.html
+++ b/airflow/www/templates/airflow/dags.html
@@ -81,8 +81,9 @@
 
                 <!-- Column 3: Name -->
                 <td>
-                  <a href="{{ url_for('airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}" title="{{ dag.description[0:80] + '...' if dag.description|length > 80 else dag.description }}">
-                      {{ dag.dag_id }}
+                  <a href="{{ url_for('airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}"
+                         title="{{ dag.description[0:80] + '...' if dag.description and dag.description|length > 80 else dag.description|default('', true) }}">
+                          {{ dag.dag_id }}
                   </a>
                 </td>
 
diff --git a/airflow/www_rbac/templates/airflow/dag.html b/airflow/www_rbac/templates/airflow/dag.html
index 2f604db..dda7cf9 100644
--- a/airflow/www_rbac/templates/airflow/dag.html
+++ b/airflow/www_rbac/templates/airflow/dag.html
@@ -32,7 +32,8 @@
         <span style='color:#AAA;'>SUBDAG: </span> <span> {{ dag.dag_id }}</span>
       {% else %}
         <input id="pause_resume" dag_id="{{ dag.dag_id }}" type="checkbox" {{ "checked" if not dag.is_paused else "" }} data-toggle="toggle" data-size="mini" method="post">
-        <span style='color:#AAA;'>DAG: </span> <span> {{ dag.dag_id }}</span> <small class="text-muted"> {{ dag.description_unicode }} </small>
+        <span style='color:#AAA;'>DAG: </span> <span> {{ dag.dag_id }}</span>
+        <small class="text-muted"> {{ dag.description_unicode[0:150] + '...' if dag.description_unicode and dag.description_unicode|length > 150 else dag.description_unicode|default('', true) }} </small>
       {% endif %}
       {% if root %}
         <span style='color:#AAA;'>ROOT: </span> <span> {{ root }}</span>
diff --git a/airflow/www_rbac/templates/airflow/dags.html b/airflow/www_rbac/templates/airflow/dags.html
index ce5c559..91ac604 100644
--- a/airflow/www_rbac/templates/airflow/dags.html
+++ b/airflow/www_rbac/templates/airflow/dags.html
@@ -102,7 +102,8 @@
             <!-- Column 3: Name -->
                 <td>
                   <span>
-                    <a href="{{ url_for('Airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}" title="{{ dag.description[0:80] + '...' if dag.description|length > 80 else dag.description }}">
+                    <a href="{{ url_for('Airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}"
+                       title="{{ dag.description[0:80] + '...' if dag.description and dag.description|length > 80 else dag.description|default('', true) }}">
                         {{ dag.dag_id }}
                     </a>
                   </span>