Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIRFLOW-6959] Use NULL as dag.description default value #7593

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ https://developers.google.com/style/inclusive-documentation

-->


### Use NULL as default value for dag.description

Now use NULL as default value for dag.description in dag table

### Assigning task to a DAG using bitwise shift (bit-shift) operators are no longer supported

Previously, you could assign a task to a DAG as follows:
Expand Down
2 changes: 1 addition & 1 deletion airflow/models/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class DAG(BaseDag, LoggingMixin):
def __init__(
self,
dag_id: str,
description: str = '',
description: Optional[str] = None,
schedule_interval: Optional[ScheduleInterval] = timedelta(days=1),
start_date: Optional[datetime] = None,
end_date: Optional[datetime] = None,
Expand Down
3 changes: 2 additions & 1 deletion airflow/www/templates/airflow/dag.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ <h3 class="pull-left">
<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 }} </small>
<span style='color:#AAA;'>DAG: </span> <span> {{ dag.dag_id }}</span>
<small class="text-muted"> {{ dag.description[0:150] + '...' if dag.description and dag.description|length > 150 else dag.description|default('', true) }} </small>
{% endif %}
{% if root %}
<span style='color:#AAA;'>ROOT: </span> <span> {{ root }}</span>
Expand Down
3 changes: 2 additions & 1 deletion airflow/www/templates/airflow/dags.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ <h2>DAGs</h2>
<!-- Column 3: Name -->
<td>
<span>
<a href="{{ url_for('Airflow.'+ dag.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.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>
Expand Down