question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend elastic DAG with a binary tree, grid, star

See original GitHub issue

Description

We have “elastic DAG” 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

        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 or/and stars. This will allow us to test more complex cases more easily.

Use case / motivation

N/A

Related Issues

N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mik-lajcommented, Apr 13, 2020

All children of task 1. This is needed to check if the tasks will be performed at the second iteration of the loop. Grid is needed to perform a stress test and at the same time not get lost in all dependencies. Binary tree will allow us to check cases more real to real situations.

0reactions
alexandrecazecommented, Apr 13, 2020

Would we have a second layer for the star ?

Capture d’écran 2020-04-13 à 20 21 59

or all children of task 1 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extended Binary Tree - GeeksforGeeks
Extended binary tree is a type of binary tree in which all the null sub tree of the original tree are replaced with...
Read more >
Cytoscape.js
Cytoscape.js is an open-source graph theory (a.k.a. network) library written in JS. You can use Cytoscape.js for graph analysis and ...
Read more >
Dictionary of Algorithms and Data Structures
D-adjacent; DAG: see directed acyclic graph · DAG shortest paths ... doubly-chained tree: see binary tree representation of trees ...
Read more >
Drawing of a 31-node complete binary tree by the extended ...
In this paper, a polyline grid drawing of free trees on two dimensional grids, bounded by simple polygons, is investigated. To the authors'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found