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

Fix dag.clear usages after change from #9824 #9909

Merged
merged 1 commit into from
Jul 21, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion TESTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,8 @@ It will run a backfill job:
.. code-block:: python

if __name__ == '__main__':
dag.clear(reset_dag_runs=True)
from airflow.utils.state import State
dag.clear(dag_run_state=State.NONE)
dag.run()


Expand Down
3 changes: 2 additions & 1 deletion docs/executor/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ It will run a backfill job:
.. code-block:: python

if __name__ == '__main__':
dag.clear(reset_dag_runs=True)
from airflow.utils.state import State
dag.clear(dag_run_state=State.NONE)
dag.run()


Expand Down
3 changes: 2 additions & 1 deletion tests/test_utils/system_tests_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from airflow.models.dagbag import DagBag
from airflow.utils.file import mkdirs
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.state import State
from tests.test_utils import AIRFLOW_MAIN_FOLDER
from tests.utils.logging_command_executor import get_executor

Expand Down Expand Up @@ -149,7 +150,7 @@ def run_dag(self, dag_id: str, dag_folder: str = DEFAULT_DAG_FOLDER) -> None:
)

self.log.info("Attempting to run DAG: %s", dag_id)
dag.clear(reset_dag_runs=True)
dag.clear(dag_run_state=State.NONE)
try:
dag.run(ignore_first_depends_on_past=True, verbose=True)
except Exception:
Expand Down