airflow-client-python
airflow-client-python copied to clipboard
Pools API broken using airflow 2.1.2
Calling pool_client.get_pools() I get this error:
Invalid inputs given to generate an instance of 'PoolCollectionAllOf'. The input data was invalid for the allOf schema 'PoolCollectionAllOf' in the composed schema 'PoolCollection'. Error=Pool has no attribute 'running_slots' at ['received_data']['pools'][0]['running_slots']
Here is the response debug
DEBUG:airflow_client.client.rest: response body: b'{\n "pools": [\n {\n "name": "default_pool",\n "occupied_slots": 1,\n "open_slots": 47,\n "queued_slots": 0,\n "running_slots": 1,\n "slots": 48\n },\n ],\n "total_entries": 1\n}\n'
cc @ephraimbuddy @msumit
hey @byingyang is the issue still happens on latest version?
@eladkal We chose to call the API manually using the Requests lib for now, but we can check again soon.
Cool. please let us know
Working as expected on latest client version (2.5.1):
# Get pool list
pool_api_instance = pool_api.PoolApi(api_client)
try:
api_response = pool_api_instance.get_pools()
pprint(api_response)
except airflow_client.client.OpenApiException as e:
print("Exception when calling PoolApi->get_pools: %s\n" % e)
Response:

Closing for now, feel free to reopen if needed.