shan-zeeshan786 opened a new issue, #65377:
URL: https://github.com/apache/airflow/issues/65377
### Under which category would you file this issue?
Airflow Core
### Apache Airflow version
2.11.0
### What happened and how to reproduce it?
When calling the Airflow Stable REST API endpoint /api/v1/pools, the API
returns a 500 Internal Server Error if any pool has infinite slots configured
(represented internally as inf).
Steps to Reproduce:
1. Create or configure an Airflow pool with infinite slots / unlimited slots.
2. Call the Stable REST API endpoint:
Request:
curl -X GET "http://<airflow-webserver>/api/v1/pools?offset=0&limit=100" \
-H "accept: application/json" \
-H "Authorization: Basic <base64-auth>"
Response:
{
"detail": "inf is not of type 'integer'\n\nFailed validating 'type' in
schema['allof'][0]['properties']['pools']['items']['properties']['open_slots']:\n{'type':'integer',
\n 'readonly' :True, \n 'description':'The number of free slots at the
moment.')\n\nOn instance['pool'][0]['open_slot']:\n inf",
"status": 500,
"title": "Response body does not conform to specification",
"type":
"https://airflow.apache.org/docs/apache-airflow/2.11.0/stable-rest-api-ref.html#section/Errors/Unknown"
}
### What you think should happen instead?
The /api/v1/pools endpoint should return a valid successful response even
when a pool has infinite/unlimited slots configured.
Currently, the API breaks because the serialized response does not conform
to its own schema definition.
### Operating System
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux"
VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian
HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
### Deployment
Official Apache Airflow Helm Chart
### Apache Airflow Provider(s)
_No response_
### Versions of Apache Airflow Providers
_No response_
### Official Helm Chart version
Not Applicable
### Kubernetes Version
Not Applicable
### Helm Chart configuration
Not Applicable
### Docker Image customizations
Not Applicable
### Anything else?
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.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]