potiuk commented on pull request #16:
URL:
https://github.com/apache/airflow-client-python/pull/16#issuecomment-841056197
Nope. It does not work for me :(.
Reproduction steps:
1) checkout this PR
2) clean build artifacts of `apache-airflow-client` wheel: `rm -rf *egg-info
build
3) `python setup.py bdist_wheel`
4) copy dist/apache-airflow-client*.whl and dev/test_python_client.py to
<AIRFLOW_SOURCES>/files
5) in AIRFLOW_SOURCES (contains master)
6) ./breeze build-image
7) ./breeze start-airflow
8) stop webserver, update /root/airflow/airflow.cfg to use basic_auth
instead of deny_all
9) start webserver
10) python /files/test_python_client.py (should fail with 'No module named
'airlfow_client' - this is expected)
10) pip install '/files/apache_airflow_client-2.0.0-py3-none-any.whl'
11) python /files/test_python_client.py:
```
root@9dbe1a29dcad:/opt/airflow# python test_api.py
Traceback (most recent call last):
File "test_api.py", line 47, in <module>
api_response = dag_api_instance.get_dags()
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py",
line 789, in __call__
return self.callable(self, *args, **kwargs)
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/api/dag_api.py",
line 486, in __get_dags
return self.call_with_http_info(**kwargs)
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py",
line 851, in call_with_http_info
return self.api_client.call_api(
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py",
line 426, in call_api
return self.__call_api(resource_path, method,
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py",
line 241, in __call_api
return_data = self.deserialize(
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py",
line 342, in deserialize
deserialized_data = validate_and_convert_types(
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py",
line 1412, in validate_and_convert_types
converted_instance = attempt_convert_item(
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py",
line 1287, in attempt_convert_item
valid_classes_ordered = order_response_types(valid_classes)
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py",
line 918, in order_response_types
sorted_types = sorted(
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py",
line 920, in <lambda>
key=lambda class_or_instance: index_getter(class_or_instance)
File
"/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py",
line 916, in index_getter
raise ApiValueError("Unsupported type: %s" % class_or_instance)
airflow_client.client.exceptions.ApiValueError: Unsupported type: <class
'object'>
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]