ephraimbuddy commented on code in PR #41804:
URL: https://github.com/apache/airflow/pull/41804#discussion_r1765875617


##########
airflow/cli/commands/db_command.py:
##########
@@ -136,21 +144,30 @@ def migratedb(args):
         print(f"Performing upgrade to the metadata database 
{settings.engine.url!r}")
     else:
         print("Generating sql for upgrade -- upgrade commands will *not* be 
submitted.")
-
-    db.upgradedb(
-        to_revision=to_revision,
-        from_revision=from_revision,
-        show_sql_only=args.show_sql_only,
-        reserialize_dags=args.reserialize_dags,
-    )
+    if reserialize_dags:
+        command(
+            to_revision=to_revision,
+            from_revision=from_revision,
+            show_sql_only=args.show_sql_only,
+            reserialize_dags=True,
+        )
+    else:
+        command(
+            to_revision=to_revision,
+            from_revision=from_revision,
+            show_sql_only=args.show_sql_only,
+        )

Review Comment:
   The FAB side of the command doesn't have the option to reserialize_dags 
after upgrade, and I think it shouldn't. We should reserve dag reserialization 
to when the airflow db migrate is run. I am happy to change it if we want this 
on the external db commands too, but I don't see much point to it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to