You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/01 17:02:43 UTC

[GitHub] [airflow] mik-laj opened a new pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

mik-laj opened a new pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602
 
 
   
   
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [X] Description above provides context of the change
   - [X] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
   - [X] Unit tests coverage for changes (not needed for documentation changes)
   - [X] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [X] Relevant documentation is updated including usage instructions.
   - [X] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   <sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389255632
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,113 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class DagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   Should we add `Test` as a suffix or prefix?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389257705
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,113 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class DagFileProcessorQueriesCount(unittest.TestCase):
+    """
+    These tests are designed to detect changes in the number of queries for different DAG files.
+
+    Each test has saved queries count in the table/spreadsheets. If you make a change that affected the number
+    of queries, please update the tables.
+
+    These tests allow easy detection when a change is made that affects the performance of the
+    DagFileProcessor.
+    """
+    def setUp(self) -> None:
+        clear_db_runs()
+        clear_db_pools()
+        clear_db_dags()
+        clear_db_sla_miss()
+        clear_db_errors()
+
+    @parameterized.expand(
+        [
+            # pylint: disable=bad-whitespace
+            # expected, dag_count, task_count, start_ago, schedule_interval, shape
+            # One DAG with one task per DAG file
+            ( 1,  1,  1, "1d",  "None",  "no_structure"),  # noqa
+            ( 1,  1,  1, "1d",  "None",        "linear"),  # noqa
+            ( 3,  1,  1, "1d", "@once",  "no_structure"),  # noqa
+            ( 3,  1,  1, "1d", "@once",        "linear"),  # noqa
+            ( 3,  1,  1, "1d",   "30m",  "no_structure"),  # noqa
+            ( 3,  1,  1, "1d",   "30m",        "linear"),  # noqa
+            # One DAG with five tasks per DAG  file
+            ( 1,  1,  5, "1d",  "None",  "no_structure"),  # noqa
+            ( 1,  1,  5, "1d",  "None",        "linear"),  # noqa
+            ( 3,  1,  5, "1d", "@once",  "no_structure"),  # noqa
+            ( 3,  1,  5, "1d", "@once",        "linear"),  # noqa
+            ( 3,  1,  5, "1d",   "30m",  "no_structure"),  # noqa
+            ( 3,  1,  5, "1d",   "30m",        "linear"),  # noqa
+            # 10 DAGs with 10 tasks per DAG file
+            ( 1, 10, 10, "1d",  "None",  "no_structure"),  # noqa
+            ( 1, 10, 10, "1d",  "None",        "linear"),  # noqa
+            (21, 10, 10, "1d", "@once",  "no_structure"),  # noqa
+            (21, 10, 10, "1d", "@once",        "linear"),  # noqa
+            (21, 10, 10, "1d",   "30m",  "no_structure"),  # noqa
+            (21, 10, 10, "1d",   "30m",        "linear"),  # noqa
+            # pylint: enable=bad-whitespace
+        ]
+    )
+    def test_process_dags_queries_count(
+        self, expected_query_count, dag_count, task_count, start_ago, schedule_interval, shape
+    ):
+        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',
+        }):
+
 
 Review comment:
   Fixed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj merged pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
mik-laj merged pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389260376
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,112 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class TestDagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   Performance tests are run, for example, daily, and then the results are collected into one central system to detect performance regression. They do not have identical results every time. **Each time you run a pefomance test, you may have a different result.**

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389260376
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,112 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class TestDagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   Performance tests are run, for example, daily, and then the results are collected into one central system to detect performance regression. They do not have identical results every time. Each time you run a test, you may have a different result.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io edited a comment on issue #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#issuecomment-596085337
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=h1) Report
   > Merging [#7602](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/f3abd340826289dec23e96b79a6ed9b6a1955027?src=pr&el=desc) will **decrease** coverage by `0.27%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7602/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7602      +/-   ##
   ==========================================
   - Coverage   86.83%   86.55%   -0.28%     
   ==========================================
     Files         897      897              
     Lines       42805    42805              
   ==========================================
   - Hits        37170    37051     -119     
   - Misses       5635     5754     +119
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0%> (-45.08%)` | :arrow_down: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.69% <0%> (-25.26%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=footer). Last update [f3abd34...9af4567](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io edited a comment on issue #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#issuecomment-596085337
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=h1) Report
   > Merging [#7602](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/f3abd340826289dec23e96b79a6ed9b6a1955027?src=pr&el=desc) will **decrease** coverage by `54.22%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7602/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #7602       +/-   ##
   ===========================================
   - Coverage   86.83%   32.61%   -54.23%     
   ===========================================
     Files         897      896        -1     
     Lines       42805    42796        -9     
   ===========================================
   - Hits        37170    13956    -23214     
   - Misses       5635    28840    +23205
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...low/contrib/operators/wasb\_delete\_blob\_operator.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy93YXNiX2RlbGV0ZV9ibG9iX29wZXJhdG9yLnB5) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/contrib/hooks/vertica\_hook.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL2hvb2tzL3ZlcnRpY2FfaG9vay5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/contrib/sensors/\_\_init\_\_.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL3NlbnNvcnMvX19pbml0X18ucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/hooks/mssql\_hook.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9tc3NxbF9ob29rLnB5) | `0% <0%> (-100%)` | :arrow_down: |
   | [...viders/docker/example\_dags/example\_docker\_swarm.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZG9ja2VyL2V4YW1wbGVfZGFncy9leGFtcGxlX2RvY2tlcl9zd2FybS5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/hooks/webhdfs\_hook.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy93ZWJoZGZzX2hvb2sucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/contrib/sensors/emr\_base\_sensor.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL3NlbnNvcnMvZW1yX2Jhc2Vfc2Vuc29yLnB5) | `0% <0%> (-100%)` | :arrow_down: |
   | [...irflow/contrib/operators/slack\_webhook\_operator.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9zbGFja193ZWJob29rX29wZXJhdG9yLnB5) | `0% <0%> (-100%)` | :arrow_down: |
   | [...providers/google/cloud/example\_dags/example\_dlp.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2V4YW1wbGVfZGFncy9leGFtcGxlX2RscC5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/hooks/jdbc\_hook.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9qZGJjX2hvb2sucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | ... and [765 more](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=footer). Last update [f3abd34...d9ef45f](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389255657
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,113 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class DagFileProcessorQueriesCount(unittest.TestCase):
+    """
+    These tests are designed to detect changes in the number of queries for different DAG files.
+
+    Each test has saved queries count in the table/spreadsheets. If you make a change that affected the number
+    of queries, please update the tables.
+
+    These tests allow easy detection when a change is made that affects the performance of the
+    DagFileProcessor.
+    """
+    def setUp(self) -> None:
+        clear_db_runs()
+        clear_db_pools()
+        clear_db_dags()
+        clear_db_sla_miss()
+        clear_db_errors()
+
+    @parameterized.expand(
+        [
+            # pylint: disable=bad-whitespace
+            # expected, dag_count, task_count, start_ago, schedule_interval, shape
+            # One DAG with one task per DAG file
+            ( 1,  1,  1, "1d",  "None",  "no_structure"),  # noqa
+            ( 1,  1,  1, "1d",  "None",        "linear"),  # noqa
+            ( 3,  1,  1, "1d", "@once",  "no_structure"),  # noqa
+            ( 3,  1,  1, "1d", "@once",        "linear"),  # noqa
+            ( 3,  1,  1, "1d",   "30m",  "no_structure"),  # noqa
+            ( 3,  1,  1, "1d",   "30m",        "linear"),  # noqa
+            # One DAG with five tasks per DAG  file
+            ( 1,  1,  5, "1d",  "None",  "no_structure"),  # noqa
+            ( 1,  1,  5, "1d",  "None",        "linear"),  # noqa
+            ( 3,  1,  5, "1d", "@once",  "no_structure"),  # noqa
+            ( 3,  1,  5, "1d", "@once",        "linear"),  # noqa
+            ( 3,  1,  5, "1d",   "30m",  "no_structure"),  # noqa
+            ( 3,  1,  5, "1d",   "30m",        "linear"),  # noqa
+            # 10 DAGs with 10 tasks per DAG file
+            ( 1, 10, 10, "1d",  "None",  "no_structure"),  # noqa
+            ( 1, 10, 10, "1d",  "None",        "linear"),  # noqa
+            (21, 10, 10, "1d", "@once",  "no_structure"),  # noqa
+            (21, 10, 10, "1d", "@once",        "linear"),  # noqa
+            (21, 10, 10, "1d",   "30m",  "no_structure"),  # noqa
+            (21, 10, 10, "1d",   "30m",        "linear"),  # noqa
+            # pylint: enable=bad-whitespace
+        ]
+    )
+    def test_process_dags_queries_count(
+        self, expected_query_count, dag_count, task_count, start_ago, schedule_interval, shape
+    ):
+        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',
+        }):
+
 
 Review comment:
   Unnecessary blank line :)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389258918
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,112 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class TestDagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   I think it's better to have it like it is now - > this way it will be executed for various DBs and pythons. And It is very fast

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389260376
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,112 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class TestDagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   Performance tests are run, for example, daily, and then the results are collected into one central system to detect performance regression. They do not have identical results every time. **Each time you run a test, you may have a different result.**

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389257704
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,113 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class DagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   Fixed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389260207
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,112 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class TestDagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   Yes. These are very quick tests.  In the future, when we will work on tests that analyze complex cases, we can add markers and describe the principles on the basis of which we conclude that the test is a performance test. Then we will also have to think about the environment in which we want to run these tests and how often. These tests are very static tests and contain simple assertions for values.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io commented on issue #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#issuecomment-596085337
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=h1) Report
   > Merging [#7602](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/f3abd340826289dec23e96b79a6ed9b6a1955027?src=pr&el=desc) will **decrease** coverage by `0.27%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7602/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7602      +/-   ##
   ==========================================
   - Coverage   86.83%   86.55%   -0.28%     
   ==========================================
     Files         897      897              
     Lines       42805    42805              
   ==========================================
   - Hits        37170    37051     -119     
   - Misses       5635     5754     +119
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0%> (-45.08%)` | :arrow_down: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.69% <0%> (-25.26%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7602/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=footer). Last update [f3abd34...9af4567](https://codecov.io/gh/apache/airflow/pull/7602?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #7602: [AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor
URL: https://github.com/apache/airflow/pull/7602#discussion_r389258767
 
 

 ##########
 File path: tests/jobs/test_scheduler_job.py
 ##########
 @@ -1059,6 +1067,112 @@ def test_process_file_should_failure_callback(self):
             os.remove(callback_file.name)
 
 
+class TestDagFileProcessorQueriesCount(unittest.TestCase):
 
 Review comment:
   I am just wondering if we want to mark this test as `performance` and have a separate build for performance-only tests? In this way, it will be easier to spot PR / builds that change the performance. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services