mik-laj opened a new issue #8187: Extend elastic DAG with a binary tree, grid
URL: https://github.com/apache/airflow/issues/8187
 
 
   **Description**
   
   We have ["elastic 
DAG"](https://github.com/apache/airflow/blob/master/scripts/perf/dags/elastic_dag.py#L77)
 which we use in various performance tests. It allows you to generate any DAG 
using environment variables.
   An example test that uses such a DAG looks like this
   ```python
           with mock.patch.dict("os.environ", {
               "PERF_DAGS_COUNT": str(dag_count),
               "PERF_TASKS_COUNT": str(task_count),
               "PERF_START_AGO": start_ago,
               "PERF_SCHEDULE_INTERVAL": schedule_interval,
               "PERF_SHAPE": shape,
           }), conf_vars({
               ('scheduler', 'use_job_schedule'): 'True',
           }):
               dagbag = DagBag(dag_folder=ELASTIC_DAG_FILE, 
include_examples=False)
               with assert_queries_count(expected_query_count):
                   processor = DagFileProcessor([], mock.MagicMock())
                   processor._process_dags(dagbag.dags.values())
   ```
   Source: 
   
https://github.com/apache/airflow/blob/6bd2e59/tests/jobs/test_scheduler_job.py#L1175
   
   This DAG File allows you to generate DAGs that contain all the tasks 
connected in a linear manner or have no connections.
   
   It would be useful to add more complex DAGs, especially binary trees or/and 
grids. This will allow us to test more complex cases more easily.
   
   
![](https://study.com/cimages/multimages/16/0e0646ba-30e5-40d9-b45c-a138f038f05b_full_complete_perfect.png)
   
   **Use case / motivation**
   
   N/A
   
   **Related Issues**
   
   N/A

----------------------------------------------------------------
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

Reply via email to