eladkal opened a new pull request #20178:
URL: https://github.com/apache/airflow/pull/20178


   **Description:**
   In cases where task asks for more pool slots than the total number it has 
the scheduler generates the following warning:
   `[2021-12-09 19:37:51,949] {scheduler_job.py:407} INFO - Not executing 
<TaskInstance: a_pool.my_task scheduled__2021-12-09T19:08:00+00:0│172.18.0.10 
[scheduled]> since it requires 4 slots but there are 2 open slots in the pool 
my_pool. ` 
   
   
https://github.com/apache/airflow/blob/985bb06ba57ab67bb218ca9ca7549a81bea88f87/airflow/jobs/scheduler_job.py#L401-L408
   
   However this message is very confusing as the issue is not with open slots 
but with the total slots of the pool. Waiting for slots will not resolve the 
problem. To make the task run there must be an action from the user:
   
   1.  User to increase the total number of slots in the Pool
   2. User need to change the task code to requests less slots.
   
   This PR add specific log notice for this case.
   
   **Testing:**
   Added test to cover this case where pool is configured with 2 slots when 
task ask for 4 slots.
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to