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 2023/08/10 12:43:46 UTC
[airflow] branch v2-7-test updated (c986bc5ec6 -> b6489c2680)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a change to branch v2-7-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
omit c986bc5ec6 Ensure include_deferred is not nullable (#33280)
new b6489c2680 Ensure include_deferred is not nullable (#33280)
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 (c986bc5ec6)
\
N -- N -- N refs/heads/v2-7-test (b6489c2680)
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:
RELEASE_NOTES.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[airflow] 01/01: Ensure include_deferred is not nullable (#33280)
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-7-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit b6489c26802687fad22537c63513cff1b2b06dcf
Author: Tzu-ping Chung <ur...@gmail.com>
AuthorDate: Thu Aug 10 19:13:48 2023 +0800
Ensure include_deferred is not nullable (#33280)
* Ensure include_deferred is not nullable
This uses a multi-step process to introduce the NOT NULL constraint to
the column, needed due to MSSQL restrictions.
* MSSQL does not even support boolean literals
* Postgres does not support 0 as boolean
This is fine. SQL is fun.
* Wrap raw SQL in text()
(cherry picked from commit 4f6d5973589577ffcb7db24c82dd6708b2c00023)
---
RELEASE_NOTES.rst | 2 +-
.../versions/0128_2_7_0_add_include_deferred_column_to_pool.py | 6 +++++-
docs/apache-airflow/img/airflow_erd.sha256 | 2 +-
docs/apache-airflow/img/airflow_erd.svg | 8 ++++----
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index f2ca9f0dc2..61eef230e2 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -21,7 +21,7 @@
.. towncrier release notes start
-Airflow 2.7.0 (2023-08-10)
+Airflow 2.7.0 (2023-08-14)
--------------------------
Significant Changes
diff --git a/airflow/migrations/versions/0128_2_7_0_add_include_deferred_column_to_pool.py b/airflow/migrations/versions/0128_2_7_0_add_include_deferred_column_to_pool.py
index bbafc68057..9e00027670 100644
--- a/airflow/migrations/versions/0128_2_7_0_add_include_deferred_column_to_pool.py
+++ b/airflow/migrations/versions/0128_2_7_0_add_include_deferred_column_to_pool.py
@@ -39,7 +39,11 @@ airflow_version = "2.7.0"
def upgrade():
"""Apply add include_deferred column to pool"""
with op.batch_alter_table("slot_pool") as batch_op:
- batch_op.add_column(sa.Column("include_deferred", sa.Boolean, default=False))
+ batch_op.add_column(sa.Column("include_deferred", sa.Boolean))
+ # Different databases support different literal for FALSE. This is fine.
+ op.execute(sa.text(f"UPDATE slot_pool SET include_deferred = {sa.false().compile(op.get_bind())}"))
+ with op.batch_alter_table("slot_pool") as batch_op:
+ batch_op.alter_column("include_deferred", existing_type=sa.Boolean, nullable=False)
def downgrade():
diff --git a/docs/apache-airflow/img/airflow_erd.sha256 b/docs/apache-airflow/img/airflow_erd.sha256
index a7704c8fc5..0594dd21e8 100644
--- a/docs/apache-airflow/img/airflow_erd.sha256
+++ b/docs/apache-airflow/img/airflow_erd.sha256
@@ -1 +1 @@
-52b0e45032fb1c60274374e0114cf199dfb759adc0a4fe32964136347457506a
\ No newline at end of file
+266a8533dca6d9c7e984341bfe29e99f29217e44529455a49e7c4a5faccdcdf3
\ No newline at end of file
diff --git a/docs/apache-airflow/img/airflow_erd.svg b/docs/apache-airflow/img/airflow_erd.svg
index ba548c60fd..8bf922245e 100644
--- a/docs/apache-airflow/img/airflow_erd.svg
+++ b/docs/apache-airflow/img/airflow_erd.svg
@@ -1228,28 +1228,28 @@
<g id="edge48" class="edge">
<title>task_instance--xcom</title>
<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" d="M1166.17,-482.51C1190.54,-462.01 1215.43,-441.43 1239,-422 1245.31,-416.8 1251.76,-411.48 1258.29,-406.14"/>
-<text text-anchor="start" x="1227.29" y="-394.94" font-family="Times,serif" font-size="14.00">0..N</text>
+<text text-anchor="start" x="1248.29" y="-394.94" font-family="Times,serif" font-size="14.00">1</text>
<text text-anchor="start" x="1166.17" y="-471.31" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- task_instance--xcom -->
<g id="edge49" class="edge">
<title>task_instance--xcom</title>
<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" d="M1166.17,-500.3C1190.54,-480.01 1215.43,-459.43 1239,-440 1245.31,-434.8 1251.76,-429.48 1258.29,-424.12"/>
-<text text-anchor="start" x="1248.29" y="-412.92" font-family="Times,serif" font-size="14.00">1</text>
+<text text-anchor="start" x="1227.29" y="-412.92" font-family="Times,serif" font-size="14.00">0..N</text>
<text text-anchor="start" x="1166.17" y="-489.1" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- task_instance--xcom -->
<g id="edge50" class="edge">
<title>task_instance--xcom</title>
<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" d="M1166.17,-518.08C1190.54,-498.01 1215.43,-477.43 1239,-458 1246.11,-452.14 1253.42,-446.12 1260.79,-440.05"/>
-<text text-anchor="start" x="1229.79" y="-443.85" font-family="Times,serif" font-size="14.00">0..N</text>
+<text text-anchor="start" x="1250.79" y="-443.85" font-family="Times,serif" font-size="14.00">1</text>
<text text-anchor="start" x="1166.17" y="-506.88" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- task_instance--xcom -->
<g id="edge51" class="edge">
<title>task_instance--xcom</title>
<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" d="M1166.17,-535.87C1190.54,-516.01 1215.43,-495.43 1239,-476 1252.96,-464.49 1267.64,-452.42 1282.18,-440.26"/>
-<text text-anchor="start" x="1272.18" y="-444.06" font-family="Times,serif" font-size="14.00">1</text>
+<text text-anchor="start" x="1282.18" y="-444.06" font-family="Times,serif" font-size="14.00">0..N</text>
<text text-anchor="start" x="1166.17" y="-524.67" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- log_template -->