Skip to content

Commit

Permalink
Temporarily remove support for dags reserialize command (apache#45337)
Browse files Browse the repository at this point in the history
As we work toward getting bundle parsing support in main (apache#42289), it'll be
easier for reviewers to review the new `dags reserialize` command
separate from the rest of the parsing changes (that PR will be rather
large already). But in the meantime, simply using DagBag on a single
directory won't continue working.

Tracking issue to add it back: apache#45336
  • Loading branch information
jedcunningham authored and agupta01 committed Jan 6, 2025
1 parent 664c1f6 commit bdf991e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions airflow/cli/commands/remote_commands/dag_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,5 +537,7 @@ def dag_test(args, dag: DAG | None = None, session: Session = NEW_SESSION) -> No
@provide_session
def dag_reserialize(args, session: Session = NEW_SESSION) -> None:
"""Serialize a DAG instance."""
dagbag = DagBag(process_subdir(args.subdir))
dagbag.sync_to_db(session=session)
# TODO: AIP-66 bundle centric reserialize
raise NotImplementedError(
"AIP-66: This command is not implemented yet - use `dag-processor --num-runs 1` in the meantime."
)
2 changes: 2 additions & 0 deletions tests/cli/commands/remote_commands/test_dag_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def teardown_class(cls) -> None:
def setup_method(self):
clear_db_runs() # clean-up all dag run before start each test

@pytest.mark.skip("AIP-66: reserialize is not implemented yet")
def test_reserialize(self, session):
# Assert that there are serialized Dags
serialized_dags_before_command = session.query(SerializedDagModel).all()
Expand All @@ -99,6 +100,7 @@ def test_reserialize(self, session):
dag_version_after_command = session.query(DagVersion).all()
assert len(dag_version_after_command)

@pytest.mark.skip("AIP-66: reserialize is not implemented yet")
def test_reserialize_should_support_subdir_argument(self, session):
# Run clear of serialized dags
session.query(DagVersion).delete()
Expand Down

0 comments on commit bdf991e

Please sign in to comment.