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 2022/02/04 20:16:19 UTC

[GitHub] [airflow] ephraimbuddy opened a new pull request #21335: Filter celery stuck task query to exclude completed tasks

ephraimbuddy opened a new pull request #21335:
URL: https://github.com/apache/airflow/pull/21335


   On testing https://github.com/apache/airflow/pull/19769, it was reported that there was a spike in CPU usage https://github.com/apache/airflow/pull/19769#issuecomment-1029755436
   Hopefully, this will fix it
   
   cc: @jedcunningham 
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   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/main/UPDATING.md).
   


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ephraimbuddy commented on pull request #21335: Filter celery stuck task query to exclude completed tasks

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on pull request #21335:
URL: https://github.com/apache/airflow/pull/21335#issuecomment-1031264642


   Thanks, @jedcunningham for spotting this!


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #21335: Filter celery stuck task query to exclude completed tasks

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #21335:
URL: https://github.com/apache/airflow/pull/21335#issuecomment-1030322508


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ephraimbuddy commented on a change in pull request #21335: Filter celery stuck task query to exclude completed tasks

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on a change in pull request #21335:
URL: https://github.com/apache/airflow/pull/21335#discussion_r799819600



##########
File path: tests/executors/test_celery_executor.py
##########
@@ -557,7 +559,9 @@ def test_the_check_interval_to_clear_stuck_queued_task_is_correct_for_db_query(
             mock_backend = DatabaseBackend(app=celery_executor.app, url="sqlite3://")
             with mock.patch('airflow.executors.celery_executor.Celery.backend', mock_backend):
                 mock_session = mock_backend.ResultSession.return_value
-                mock_session.query.return_value.all.return_value = [result_obj("SUCCESS", task_id)]
+                mock_session.query.return_value.filter.return_value.all.return_value = [

Review comment:
       After mocking this query, because the `update_all_task_states` has the same query at BulkStateFetcher, it throws an error. I had to mock the `update_all_task_states` too




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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ephraimbuddy merged pull request #21335: Filter celery stuck task query to exclude completed tasks

Posted by GitBox <gi...@apache.org>.
ephraimbuddy merged pull request #21335:
URL: https://github.com/apache/airflow/pull/21335


   


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org