potiuk commented on a change in pull request #6740: [AIRFLOW-6181] Add
InProcessExecutor
URL: https://github.com/apache/airflow/pull/6740#discussion_r354727038
##########
File path: TESTING.rst
##########
@@ -276,3 +276,32 @@ your local sources to the ``/opt/airflow`` location of
the sources within the co
.. image:: images/source_code_mapping_ide.png
:align: center
:alt: Source code mapping
+
+
+DAG testing
+===========
+
+To ease and speed up process of developing DAGs you can use
``InProcessExecutor`` - a single
+threaded executor for debugging purposes. Using this executor you can run and
debug DAGs
+from your IDE.
+
+**IDE setup steps:**
+
+1. Add main at the end of your DAG file to make it runnable:
+
+ .. code-block:: python
+
+ if __name__ == '__main__':
+ dag.clear(reset_dag_runs=True)
+ dag.run()
+
+ By adding this running a DAG file will run a backfill job.
+
+2. Setup ``AIRFLOW__CORE__EXECUTOR=InProcessExecutor`` in run configuration of
your IDE. In
+ this step you should also setup all environment variables required by your
DAG.
+
+3. Run the DAG file.
Review comment:
```suggestion
3. Run/Debug the DAG file (using your favourite IDE method).
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services