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/10/12 07:31:11 UTC

[GitHub] [airflow] potiuk opened a new issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

potiuk opened a new issue #11454:
URL: https://github.com/apache/airflow/issues/11454


   Seems that this test fails randomly
   
   Example here:
   
   https://github.com/apache/airflow/runs/1239572585#step:6:421
   
   
   ```
   _______ TestSchedulerJobQueriesCount.test_process_dags_queries_count_02 ________
   
   a = (<tests.jobs.test_scheduler_job.TestSchedulerJobQueriesCount testMethod=test_process_dags_queries_count_02>,)
   
       @wraps(func)
       def standalone_func(*a):
   >       return func(*(a + p.args), **p.kwargs)
   
   /usr/local/lib/python3.6/site-packages/parameterized/parameterized.py:530: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
   tests/jobs/test_scheduler_job.py:3668: in test_process_dags_queries_count
       job._do_scheduling(session)
   /usr/local/lib/python3.6/contextlib.py:88: in __exit__
       next(self.gen)
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
   
   expected_count = 14
   >           raise AssertionError(message)
   E           AssertionError: The expected number of db queries is 14. The current number is 23.
   ```
   
   
   **Apache Airflow version**:
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**:
   - **OS** (e.g. from /etc/os-release):
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md style of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


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



[GitHub] [airflow] ashb commented on issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #11454:
URL: https://github.com/apache/airflow/issues/11454#issuecomment-706955316


   I think they are isolated (in regards to other DB state, other tests etc) but my HA change I think has introduced some timing related instability now.
   
   (Kamil's query count test decorator only counts queries made while the decorator is in scope, so it's not that)


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



[GitHub] [airflow] potiuk commented on issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #11454:
URL: https://github.com/apache/airflow/issues/11454#issuecomment-706934941


   cc: @mik-laj @ashb - maybe we can find a way to fully Isolate those query tests and make them rock solid? I wonder why they are sometimes producing such  wild results - seems that this must be some race that is not cleaning the counter. I think it would be great to move out those queries out of quarantine (there are two I think now) before we release Airflow 2.


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



[GitHub] [airflow] potiuk commented on issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #11454:
URL: https://github.com/apache/airflow/issues/11454#issuecomment-707056131


   Closed automaticaly :( 
   


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



[GitHub] [airflow] potiuk closed issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #11454:
URL: https://github.com/apache/airflow/issues/11454


   


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



[GitHub] [airflow] potiuk commented on issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #11454:
URL: https://github.com/apache/airflow/issues/11454#issuecomment-707056854


   Another example:  https://github.com/apache/airflow/pull/11459/checks?check_run_id=1241474559#step:6:417
   
   ```
   _______ TestSchedulerJobQueriesCount.test_process_dags_queries_count_00 ________
   
   a = (<tests.jobs.test_scheduler_job.TestSchedulerJobQueriesCount testMethod=test_process_dags_queries_count_00>,)
   
       @wraps(func)
       def standalone_func(*a):
   >       return func(*(a + p.args), **p.kwargs)
   
   /usr/local/lib/python3.7/site-packages/parameterized/parameterized.py:530: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
   tests/jobs/test_scheduler_job.py:3668: in test_process_dags_queries_count
       job._do_scheduling(session)
   /usr/local/lib/python3.7/contextlib.py:119: in __exit__
       next(self.gen)
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
   
   expected_count = 10
   message_fmt = 'The expected number of db queries is {expected_count}. The current number is {current_count}.\n\nRecorded query locations:'
   
       @contextmanager
       def assert_queries_count(expected_count, message_fmt=None):
           with count_queries() as result:
               yield None
       
           count = sum(result.values())
           if expected_count != count:
               message_fmt = message_fmt or "The expected number of db queries is {expected_count}. " \
                                            "The current number is {current_count}.\n\n" \
                                            "Recorded query locations:"
               message = message_fmt.format(current_count=count, expected_count=expected_count)
       
               for location, count in result.items():
                   message += f'\n\t{location}:\t{count}'
       
   >           raise AssertionError(message)
   E           AssertionError: The expected number of db queries is 10. The current number is 20.
   E           
   E           Recorded query locations:
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1461:	1
   E           	dagbag.py:get_dag>dagbag.py:_add_dag_from_db>serialized_dag.py:get:222:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_create_dag_runs>dag.py:create_dagrun:1671:	1
   E           	dag.py:create_dagrun>dagrun.py:verify_integrity>dagrun.py:get_task_instances:301:	1
   E           	scheduler_job.py:_create_dag_runs>dag.py:create_dagrun>dagrun.py:verify_integrity:584:	1
   Coverage.py warning: Data file '/opt/airflow/.coverage.77104022ba35.2188.070665' doesn't seem to be a coverage data file: Couldn't use data file '/opt/airflow/.coverage.77104022ba35.2188.070665': no such table: coverage_schema
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_create_dag_runs>scheduler_job.py:_update_dag_next_dagruns:1586:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1464:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1486:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1488:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1490:	1
   E           	scheduler_job.py:_schedule_dag_run>scheduler_job.py:_verify_integrity_if_dag_changed>serialized_dag.py:get_latest_version_hash:281:	1
   E           	scheduler_job.py:_schedule_dag_run>dagrun.py:update_state>dagrun.py:get_task_instances:301:	1
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_schedule_dag_run:1687:	1
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_schedule_dag_run:1700:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1493:	1
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_change_state_for_tis_without_dagrun:886:	2
   E           	scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued>pool.py:slots_stats:109:	1
   E           	scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued>pool.py:slots_stats:116:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued:969:	1
   ```


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



[GitHub] [airflow] potiuk closed issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #11454:
URL: https://github.com/apache/airflow/issues/11454


   


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



[GitHub] [airflow] ashb commented on issue #11454: [QUARANTINE] TestSchedulerJobQueriesCount.test_process_dags_queries_count_02

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #11454:
URL: https://github.com/apache/airflow/issues/11454#issuecomment-706956325


   I'm capturing the queries from the two example failing examples here for a "permanent" record.
   
   https://github.com/apache/airflow/runs/1239572585#step:6:421
   
   ```
   E           AssertionError: The expected number of db queries is 14. The current number is 23.
   E           
   E           Recorded query locations:
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1461:	1
   E           	dagbag.py:get_dag>dagbag.py:_add_dag_from_db>serialized_dag.py:get:222:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_create_dag_runs>dag.py:create_dagrun:1671:	1
   E           	dag.py:create_dagrun>dagrun.py:verify_integrity>dagrun.py:get_task_instances:301:	1
   E           	scheduler_job.py:_create_dag_runs>dag.py:create_dagrun>dagrun.py:verify_integrity:584:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_create_dag_runs>scheduler_job.py:_update_dag_next_dagruns:1586:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1464:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1486:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1488:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1490:	1
   E           	scheduler_job.py:_schedule_dag_run>scheduler_job.py:_verify_integrity_if_dag_changed>serialized_dag.py:get_latest_version_hash:281:	2
   E           	scheduler_job.py:_schedule_dag_run>dagrun.py:update_state>dagrun.py:get_task_instances:301:	2
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_schedule_dag_run:1687:	2
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_schedule_dag_run:1700:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1493:	1
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_change_state_for_tis_without_dagrun:860:	2
   E           	scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued>pool.py:slots_stats:109:	1
   E           	scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued>pool.py:slots_stats:116:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued:969:	1
   ```
   
   https://github.com/apache/airflow/pull/11453/checks?check_run_id=1240589774#step:6:414
   
   ```
   E           AssertionError: The expected number of db queries is 10. The current number is 20.
   E           
   E           Recorded query locations:
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1461:	1
   E           	dagbag.py:get_dag>dagbag.py:_add_dag_from_db>serialized_dag.py:get:222:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_create_dag_runs>dag.py:create_dagrun:1671:	1
   E           	dag.py:create_dagrun>dagrun.py:verify_integrity>dagrun.py:get_task_instances:301:	1
   E           	scheduler_job.py:_create_dag_runs>dag.py:create_dagrun>dagrun.py:verify_integrity:584:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_create_dag_runs>scheduler_job.py:_update_dag_next_dagruns:1586:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1464:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1486:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1488:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1490:	1
   E           	scheduler_job.py:_schedule_dag_run>scheduler_job.py:_verify_integrity_if_dag_changed>serialized_dag.py:get_latest_version_hash:281:	1
   E           	scheduler_job.py:_schedule_dag_run>dagrun.py:update_state>dagrun.py:get_task_instances:301:	1
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_schedule_dag_run:1687:	1
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_schedule_dag_run:1700:	1
   E           	parameterized.py:standalone_func>test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling:1493:	1
   E           	test_scheduler_job.py:test_process_dags_queries_count>scheduler_job.py:_do_scheduling>scheduler_job.py:_change_state_for_tis_without_dagrun:886:	2
   E           	scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued>pool.py:slots_stats:109:	1
   E           	scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued>pool.py:slots_stats:116:	1
   E           	scheduler_job.py:_do_scheduling>scheduler_job.py:_critical_section_execute_task_instances>scheduler_job.py:_executable_task_instances_to_queued:969:	1
   ```
   
   
   


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