Vamsi-klu opened a new pull request, #68773:
URL: https://github.com/apache/airflow/pull/68773

   Follow-up to #68148, which was closed as already covered by #65466. I was 
not able to reopen #68148 via the GitHub CLI/API after updating the branch, so 
I am opening this from the same rebased branch with the gap called out 
explicitly.
   
   The referenced coverage does not apply to this PR's target:
   
   - #65466 targets `v2-11-test` / Airflow 2.11 maintenance code.
   - It exercises the legacy Connexion schema path: 
`tests/api_connexion/schemas/test_pool_schemas.py::test_serialize`.
   - This PR targets `main` / Airflow 3.x FastAPI core API routes.
   - `api_connexion` is not present on `main`; the relevant production path is 
`_sanitize_open_slots` in `airflow.api_fastapi.core_api.datamodels.pools`, used 
by `PoolResponse` and `PoolCollectionResponse`.
   
   On `main`, the existing unlimited-slots coverage only exercises the 
POST/create path (`TestPostPool.test_post_pool_allows_unlimited_slots`). It 
does not seed a pre-existing `slots=-1` DB row and read it back through the GET 
routes, which is the read-path regression from #65377.
   
   This test-only PR adds:
   
   - `GET /pools/{name}` regression coverage for an unlimited pool returning 
`open_slots == -1` instead of 500.
   - `GET /pools` regression coverage for `PoolCollectionResponse` containing 
an unlimited pool.
   - Datamodel-level coverage for `_sanitize_open_slots(float("inf")) == -1` 
and `PoolResponse` serialization of a busy unlimited pool with nonzero 
occupied/running/queued slots.
   
   The list test remains self-seeding and does not touch the shared 
`create_pools()` helper, so the existing parametrized list counts/order 
assertions stay unchanged.
   
   No newsfragment: test-only change.
   
   Local validation:
   
   - `ruff check 
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_pools.py 
airflow-core/tests/unit/api_fastapi/core_api/datamodels/test_pools.py` -> passed
   - 
`PYTHONPATH="$PWD/airflow-core/src:$PWD/task-sdk/src:$PWD/airflow-core/tests" 
/Users/nalam/airflow-1/.venv/bin/python -m pytest 
airflow-core/tests/unit/api_fastapi/core_api/datamodels/test_pools.py -q` -> 2 
passed
   - 
`PYTHONPATH="$PWD/airflow-core/src:$PWD/task-sdk/src:$PWD/airflow-core/tests" 
/Users/nalam/airflow-1/.venv/bin/python -m pytest --with-db-init 
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_pools.py::TestGetPool::test_get_unlimited_pool_should_respond_200
 
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_pools.py::TestGetPools::test_get_pools_with_unlimited_pool_should_respond_200
 -q` -> 2 passed
   


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