You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/13 07:13:50 UTC
[GitHub] [airflow-client-python] msumit opened a new pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
msumit opened a new pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16
Upstream change https://github.com/apache/airflow/pull/15816
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841110173
@potiuk rebase with master is not possible, cause master is ahead of 2.0.0/1 code. Tried to fetch & reinstall with master's setup.py + setup.cfg, but no luck. Not sure, but seems like we have to wait for Airflow's 2.1.0 release to fix this, which means releasing the 2.1.0 version of the client.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841156464
So I'd tested the dag list API (prolly with airflow master) https://github.com/msumit/airflow-cli.. given the older version of client is also not working for such APIs, that means that with Airflow 2.0.1, the client was never working properly.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-842178595
I am not sure to be honest. I think the error was introduced in this commit - https://github.com/apache/airflow-client-python/commit/a650058c9742d9e37b0657532fc76c4bbb364b1a this was the big change auto-generated code, and the problem was already in that commit I am afraid.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit closed pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit closed pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow-client-python] ephraimbuddy commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r633153915
##########
File path: airflow_client/docs/DAGApi.md
##########
@@ -549,25 +549,7 @@ with client.ApiClient(configuration) as api_client:
api_instance = dag_api.DAGApi(api_client)
dag_id = "dag_id_example" # str | The DAG ID.
dag = DAG(
- dag_id="dag_id_example",
- root_dag_id="root_dag_id_example",
is_paused=True,
- is_subdag=True,
- fileloc="fileloc_example",
- file_token="file_token_example",
- owners=[
- "owners_example",
- ],
- description="description_example",
- schedule_interval=ScheduleInterval(
- type="CronExpression",
- value="value_example",
- ),
- tags=[
- Tag(
- name="name_example",
Review comment:
Looks like the new version respects read-only fields? If it is then there's no need for my current PR that's changing things inside the model.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r631791516
##########
File path: airflow_client/docs/DAGApi.md
##########
@@ -549,25 +549,7 @@ with client.ApiClient(configuration) as api_client:
api_instance = dag_api.DAGApi(api_client)
dag_id = "dag_id_example" # str | The DAG ID.
dag = DAG(
- dag_id="dag_id_example",
- root_dag_id="root_dag_id_example",
is_paused=True,
- is_subdag=True,
- fileloc="fileloc_example",
- file_token="file_token_example",
- owners=[
- "owners_example",
- ],
- description="description_example",
- schedule_interval=ScheduleInterval(
- type="CronExpression",
- value="value_example",
- ),
- tags=[
- Tag(
- name="name_example",
Review comment:
Indeed that's a bit strange. I wonder where the examples are generated from :(
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841042883
Let me double check and make sure I rebuild airlfow fully. I could run it on the older version. Stay tuned.
Do I get it right that we also need to fix Airflow to get the API to work ? I.e. the API will only work for 2.1+ (seems so, looking at https://github.com/apache/airflow/pull/15816 )
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841078741
Ok, so I installed client's master code and the test script is working fine. Not sure if the error lies in the Openapi specification in Airflow?
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
[GitHub] [airflow-client-python] ephraimbuddy commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r633153915
##########
File path: airflow_client/docs/DAGApi.md
##########
@@ -549,25 +549,7 @@ with client.ApiClient(configuration) as api_client:
api_instance = dag_api.DAGApi(api_client)
dag_id = "dag_id_example" # str | The DAG ID.
dag = DAG(
- dag_id="dag_id_example",
- root_dag_id="root_dag_id_example",
is_paused=True,
- is_subdag=True,
- fileloc="fileloc_example",
- file_token="file_token_example",
- owners=[
- "owners_example",
- ],
- description="description_example",
- schedule_interval=ScheduleInterval(
- type="CronExpression",
- value="value_example",
- ),
- tags=[
- Tag(
- name="name_example",
Review comment:
Looks like the new version respects read-only fields? If it is then there's no need for my current PR that's changing things inside the model.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r632307721
##########
File path: airflow_client/docs/DAGApi.md
##########
@@ -549,25 +549,7 @@ with client.ApiClient(configuration) as api_client:
api_instance = dag_api.DAGApi(api_client)
dag_id = "dag_id_example" # str | The DAG ID.
dag = DAG(
- dag_id="dag_id_example",
- root_dag_id="root_dag_id_example",
is_paused=True,
- is_subdag=True,
- fileloc="fileloc_example",
- file_token="file_token_example",
- owners=[
- "owners_example",
- ],
- description="description_example",
- schedule_interval=ScheduleInterval(
- type="CronExpression",
- value="value_example",
- ),
- tags=[
- Tag(
- name="name_example",
Review comment:
Ok, did a quick check and the change seems to be correct. In patch dag `is_paused` is the only editable field.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r631754150
##########
File path: airflow_client/docs/PoolApi.md
##########
@@ -405,10 +401,6 @@ with client.ApiClient(configuration) as api_client:
pool = Pool(
name="name_example",
slots=1,
- occupied_slots=1,
- used_slots=1,
- queued_slots=1,
- open_slots=1,
Review comment:
@kaxil I'm not sure, as this is auto-generated code.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-842178595
I am not sure to be honest. I think the error was introduced in this commit - https://github.com/apache/airflow-client-python/commit/a650058c9742d9e37b0657532fc76c4bbb364b1a this was the big change: auto-generated code, and the problem was already in that commit I am afraid.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841068528
Hmm. I did. I even have "2.0.1" in the header coming to Airflow:
`GET /api/v1/dags HTTP/1.1" 200 39 "-" "OpenAPI-Generator/2.0.1/python" `
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841056941
@potiuk I think it is not dependent on the Airflow version. I tried with Airflow master and it's working. Just make sure that you delete the old client code and install the new one.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841083875
Ah no. ALL GOOD. Simply rebase the PR . The setup.py used in this PR is not good, but when you rebase, all seems to be working fine.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841042883
Let me double check and make sure I rebuild airlfow fully. I could run it on the older version. Stay tuned.
Do I get it right that we also need to fix Airflow to get the API to work ? I.e. the API will only work for 2.1+ (seems so looking at https://github.com/apache/airflow/pull/15816 )
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841078337
> @potiuk I also did a fresh install of everything & now I can reproduce the error.
Yeah. I also tested just the client package in a separate venv (outside of the docker client) and have the same error as well.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] kaxil commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r631734945
##########
File path: airflow_client/docs/DAGApi.md
##########
@@ -549,25 +549,7 @@ with client.ApiClient(configuration) as api_client:
api_instance = dag_api.DAGApi(api_client)
dag_id = "dag_id_example" # str | The DAG ID.
dag = DAG(
- dag_id="dag_id_example",
- root_dag_id="root_dag_id_example",
is_paused=True,
- is_subdag=True,
- fileloc="fileloc_example",
- file_token="file_token_example",
- owners=[
- "owners_example",
- ],
- description="description_example",
- schedule_interval=ScheduleInterval(
- type="CronExpression",
- value="value_example",
- ),
- tags=[
- Tag(
- name="name_example",
Review comment:
Same here
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-842178595
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841056197
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841149251
Just rebase & push --force ( I think I've done that locally). Let met try to do it in a separate PR :)
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841083875
Ah no. ALL GOOD. Simply rebase the PR to latest `master`. The setup.py used in this PR is not good, but when you rebase, all seems to be working fine.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-842168297
@potiuk didn't understand the comment `When I JUST rebased the three last commits`. What should be the fix here?
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-842168297
@potiuk didn't understand the comment `When I JUST rebased the three last commits`. What should be the fix here?
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-842178595
I am not sure to be honest. I think the error was introduced in this commit - https://github.com/apache/airflow-client-python/commit/a650058c9742d9e37b0657532fc76c4bbb364b1a this was the big change: auto-generated code, and the problem was already in that commit I am afraid.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841151105
Ah I see now. ... so maybe the old version was working fine for 2.0.0 Airlfow ?
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841042883
Let me double check and make sure I rebuild airlfow fully. I could run it on the older version. Stay tuned.
Do I get it right that we also need to fix Airflow to get the API to work ? I.e. the API will only work for 2.1 (seems so looking at https://github.com/apache/airflow/pull/15816 )
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841084251
Or merge it simply :D
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841078337
> @potiuk I also did a fresh install of everything & now I can reproduce the error.
Yeah. I also tested just the client package in a separate venv (outside of the docker container) and have the same error as well.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841161168
I think the bug is somewhere else I looked at the differences between master and i think the problem was introduced in a650058c9742d9e37b0657532fc76c4bbb364b1a. When I JUST rebased the three last commits
```
commit f2b6ca86ad080d61b1c425e16e855cb8883082fa (msumit/r2.0-dev)
Author: Sumit Maheshwari <su...@astronomer.io>
Date: Fri May 14 13:03:00 2021 +0530
Fix version
commit b06f9540852508ac6f6a9e5f00bd1741b609ba5b
Author: Jarek Potiuk <ja...@potiuk.com>
Date: Fri May 14 08:14:28 2021 +0200
fixup! Prepare release 2.0.1 due to Openapi generator upgrade
commit 44ce9ef1695da5e11ae9cead8cfbb61b14dd5cdb
Author: Sumit Maheshwari <su...@astronomer.io>
Date: Thu May 13 12:41:16 2021 +0530
Prepare release 2.0.1 due to Openapi generator upgrade
```
everything works
But adding a650058c9742d9e37b0657532fc76c4bbb364b1a breaks everything. - I think it just supposed to change version to 2.0.0 but It looks like it's much more than this.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841076231
@potiuk I also did a fresh install of everything & now I can reproduce the error.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] kaxil commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r631756435
##########
File path: airflow_client/docs/DAGApi.md
##########
@@ -549,25 +549,7 @@ with client.ApiClient(configuration) as api_client:
api_instance = dag_api.DAGApi(api_client)
dag_id = "dag_id_example" # str | The DAG ID.
dag = DAG(
- dag_id="dag_id_example",
- root_dag_id="root_dag_id_example",
is_paused=True,
- is_subdag=True,
- fileloc="fileloc_example",
- file_token="file_token_example",
- owners=[
- "owners_example",
- ],
- description="description_example",
- schedule_interval=ScheduleInterval(
- type="CronExpression",
- value="value_example",
- ),
- tags=[
- Tag(
- name="name_example",
Review comment:
This is weird, as the new example does not contain the `dag_id` so
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841073469
Yeah. Version of the package was still 2.0.0 - but the headers changed
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-845299024
@potiuk I'm waiting for Airflow 2.1.0 to be released, so we can release 2.1.0 for the client as well.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-842179228
So I think something went wrong when that code was auto-generated. Not sure what the fix it though.
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-840539734
I think that would be helpful to extend the "test_client.py" to run a bit more meanigful tests. I think that was the problem with the previous testing that we only run the "config" API and it's nowhere near representative. Happy to add it later today (I want to do a bit more testing later today).
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841034307
I tested it with master airflow and still get the same error :(
```
Traceback (most recent call last): │ Entrypoint mini-css-extract-plugin = *
File "test_api.py", line 47, in <module> │ [./node_modules/css-loader/dist/cjs.js!./static/css/graph.css] 3.6 KiB {mini-css-extract-plugin} [built]
api_response = dag_api_instance.get_dags() │ + 1 hidden module
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py", line 789, in __call__ │Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!static/css/loading-dots.css:
return self.callable(self, *args, **kwargs) │ Entrypoint mini-css-extract-plugin = *
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/api/dag_api.py", line 486, in __get_dags │ [./node_modules/css-loader/dist/cjs.js!./static/css/loading-dots.css] 1.64 KiB {mini-css-extract-plugin} [built]
return self.call_with_http_info(**kwargs) │ + 1 hidden module
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py", line 851, in call_with_http_info │Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!static/css/main.css:
return self.api_client.call_api( │ Entrypoint mini-css-extract-plugin = *
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py", line 426, in call_api │ [./node_modules/css-loader/dist/cjs.js!./static/css/main.css] 11.1 KiB {mini-css-extract-plugin} [built]
return self.__call_api(resource_path, method, │ [./static/sort_asc.png] 255 bytes {mini-css-extract-plugin} [built]
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py", line 241, in __call_api │ [./static/sort_both.png] 307 bytes {mini-css-extract-plugin} [built]
return_data = self.deserialize( │ [./static/sort_desc.png] 251 bytes {mini-css-extract-plugin} [built]
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/api_client.py", line 342, in deserialize │ + 2 hidden modules
deserialized_data = validate_and_convert_types( │Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!static/css/material-icons.css:
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py", line 1412, in validate_and_convert_types │ Entrypoint mini-css-extract-plugin = *
converted_instance = attempt_convert_item( │ [./node_modules/css-loader/dist/cjs.js!./static/css/material-icons.css] 110 KiB {mini-css-extract-plugin} [built]
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py", line 1287, in attempt_convert_item │ + 1 hidden module
valid_classes_ordered = order_response_types(valid_classes) │Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!static/css/switch.css:
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py", line 918, in order_response_types │ Entrypoint mini-css-extract-plugin = *
sorted_types = sorted( │ [./node_modules/css-loader/dist/cjs.js!./static/css/switch.css] 2.69 KiB {mini-css-extract-plugin} [built]
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py", line 920, in <lambda> │ + 1 hidden module
key=lambda class_or_instance: index_getter(class_or_instance) │Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!static/css/tree.css:
File "/usr/local/lib/python3.8/site-packages/airflow_client/client/model_utils.py", line 916, in index_getter │ Entrypoint mini-css-extract-plugin = *
raise ApiValueError("Unsupported type: %s" % class_or_instance) │ [./node_modules/css-loader/dist/cjs.js!./static/css/tree.css] 2.2 KiB {mini-css-extract-plugin} [built]
airflow_client.client.exceptions.ApiValueError: Unsupported type: <class 'object'>
```
I will push a fixup with the test client that produces it
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r631759957
##########
File path: airflow_client/docs/DAGApi.md
##########
@@ -549,25 +549,7 @@ with client.ApiClient(configuration) as api_client:
api_instance = dag_api.DAGApi(api_client)
dag_id = "dag_id_example" # str | The DAG ID.
dag = DAG(
- dag_id="dag_id_example",
- root_dag_id="root_dag_id_example",
is_paused=True,
- is_subdag=True,
- fileloc="fileloc_example",
- file_token="file_token_example",
- owners=[
- "owners_example",
- ],
- description="description_example",
- schedule_interval=ScheduleInterval(
- type="CronExpression",
- value="value_example",
- ),
- tags=[
- Tag(
- name="name_example",
Review comment:
will try executing some of these before merging
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] kaxil commented on a change in pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#discussion_r631734468
##########
File path: airflow_client/docs/PoolApi.md
##########
@@ -405,10 +401,6 @@ with client.ApiClient(configuration) as api_client:
pool = Pool(
name="name_example",
slots=1,
- occupied_slots=1,
- used_slots=1,
- queued_slots=1,
- open_slots=1,
Review comment:
Why is this all being removed?
--
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:
users@infra.apache.org
[GitHub] [airflow-client-python] potiuk edited a comment on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment 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 dist\`
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:
users@infra.apache.org
[GitHub] [airflow-client-python] msumit commented on pull request #16: Prepare release 2.0.1 due to Openapi generator upgrade
Posted by GitBox <gi...@apache.org>.
msumit commented on pull request #16:
URL: https://github.com/apache/airflow-client-python/pull/16#issuecomment-841038570
@potiuk but its working fine for me
`>>> api_response.__dict__['_composed_instances'][0]`
`{'total_entries': 33}`
--
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:
users@infra.apache.org