You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/08 18:34:25 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #19471: Add cli command for 'airflow dags reserialize`

kaxil commented on a change in pull request #19471:
URL: https://github.com/apache/airflow/pull/19471#discussion_r744991850



##########
File path: airflow/cli/cli_parser.py
##########
@@ -977,6 +977,17 @@ class GroupCommand(NamedTuple):
             ARG_SAVE_DAGRUN,
         ),
     ),
+    ActionCommand(
+        name='reserialize',
+        help="Reserialize all DAGs by parsing the DagBag files",
+        description=(
+            "Drop all serialized dags from the metadata DB. This will cause all DAGs to be reserialized "
+            "from the DagBag folder. This can be helpful if your serialized DAGs get out of sync with the "
+            "version of Airflow that you are running."
+        ),
+        func=lazy_load_command('airflow.cli.commands.dag_command.dag_reserialize'),

Review comment:
       I think this needs to be thought through.
   
   1) It should be nested under `airflow dags reserialize`
   2) For actual `reserialize` we should serialize after deleting too rather than waiting for dag parsing process _I think_
   3) Needs some unit tests




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org