You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "amoghrajesh (via GitHub)" <gi...@apache.org> on 2025/01/07 19:01:07 UTC
[PR] Fixing return type for azure hook 'run_query' [airflow]
amoghrajesh opened a new pull request, #45470:
URL: https://github.com/apache/airflow/pull/45470
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
New release of https://github.com/Azure/azure-kusto-python couldve introduced this. Tried my hand at a fix for CI failure: https://github.com/apache/airflow/actions/runs/12652631045
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #45470:
URL: https://github.com/apache/airflow/pull/45470#discussion_r1906297490
##########
providers/src/airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -41,7 +41,7 @@
)
if TYPE_CHECKING:
- from azure.kusto.data.response import KustoResponseDataSetV2
+ from azure.kusto.data.response import KustoResponseDataSet
Review Comment:
What is the difference between `KustoResponseDataSetV2` and `KustoResponseDataSet`?
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #45470:
URL: https://github.com/apache/airflow/pull/45470#discussion_r1906089649
##########
providers/src/airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -206,9 +206,9 @@ def get_required_param(name: str) -> str:
return KustoClient(kcsb)
- def run_query(self, query: str, database: str, options: dict | None = None) -> KustoResponseDataSetV2:
+ def run_query(self, query: str, database: str, options: dict | None = None) -> KustoResponseDataSet:
"""
- Run KQL query using provided configuration, and return KustoResponseDataSet instance.
+ Run KQL query using provided configuration, and return ``KustoResponseDataSet`` instance.
See: `azure.kusto.data.response.KustoResponseDataSet`
Review Comment:
Another spelling attempt
```suggestion
Run KQL query using provided configuration, and return KustoResponseDataSet instance.
See: ``azure.kusto.data.response.KustoResponseDataSet``
```
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on PR #45470:
URL: https://github.com/apache/airflow/pull/45470#issuecomment-2576332585
Sorry for the failed attempts :-( Sometimes I hate spell-checking :-(
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #45470:
URL: https://github.com/apache/airflow/pull/45470#discussion_r1906071956
##########
providers/src/airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -206,7 +206,7 @@ def get_required_param(name: str) -> str:
return KustoClient(kcsb)
- def run_query(self, query: str, database: str, options: dict | None = None) -> KustoResponseDataSetV2:
+ def run_query(self, query: str, database: str, options: dict | None = None) -> KustoResponseDataSet:
"""
Run KQL query using provided configuration, and return KustoResponseDataSet instance.
Review Comment:
Attempt to fix spelling error in CI...
```suggestion
Run KQL query using provided configuration, and return ``KustoResponseDataSet`` instance.
```
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #45470:
URL: https://github.com/apache/airflow/pull/45470#discussion_r1906455708
##########
providers/src/airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -41,7 +41,7 @@
)
if TYPE_CHECKING:
- from azure.kusto.data.response import KustoResponseDataSetV2
+ from azure.kusto.data.response import KustoResponseDataSet
Review Comment:
As per the azure-kusto-python repo: https://github.com/Azure/azure-kusto-python/blob/9e86492124db7361d0ba21943f8839d1dc12d6d3/azure-kusto-data/azure/kusto/data/response.py#L139-L151, KustoResponseDataSetV2 is a wrapper on KustoResponseDataSet for some response wise filtering
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on PR #45470:
URL: https://github.com/apache/airflow/pull/45470#issuecomment-2576572307
@jscheffl it was slightly late for me, I slept! Will check now. Thanks 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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh merged PR #45470:
URL: https://github.com/apache/airflow/pull/45470
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #45470:
URL: https://github.com/apache/airflow/pull/45470#discussion_r1906489523
##########
providers/src/airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -41,7 +41,7 @@
)
if TYPE_CHECKING:
- from azure.kusto.data.response import KustoResponseDataSetV2
+ from azure.kusto.data.response import KustoResponseDataSet
Review Comment:
Resolving the comment to merge and unblock CI, please reopen in case you have an issue.
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on PR #45470:
URL: https://github.com/apache/airflow/pull/45470#issuecomment-2576776253
@jscheffl it took me a few tries to fix spellcheck too!
It was the wordlist that needed update:
```
"""
This module contains Azure Data Explorer hook.
.. spelling:word-list::
KustoResponseDataSet
kusto
"""
****
```
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #45470:
URL: https://github.com/apache/airflow/pull/45470#issuecomment-2576994095
Nice :)
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #45470:
URL: https://github.com/apache/airflow/pull/45470#discussion_r1907725231
##########
providers/src/airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -20,7 +20,7 @@
.. spelling:word-list::
- KustoResponseDataSetV
+ KustoResponseDataSet
Review Comment:
Ah, cool did not notice and did not know that spelling wordlists can also be adjusted non-global in a py file locally...
--
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
Re: [PR] Fixing return type for azure hook 'run_query' [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #45470:
URL: https://github.com/apache/airflow/pull/45470#discussion_r1906108200
##########
providers/src/airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -206,11 +206,11 @@ def get_required_param(name: str) -> str:
return KustoClient(kcsb)
- def run_query(self, query: str, database: str, options: dict | None = None) -> KustoResponseDataSetV2:
+ def run_query(self, query: str, database: str, options: dict | None = None) -> KustoResponseDataSet:
"""
Run KQL query using provided configuration, and return KustoResponseDataSet instance.
- See: `azure.kusto.data.response.KustoResponseDataSet`
+ See: ``azure.kusto.data.response.KustoResponseDataSet``
Review Comment:
Reverting my miserable attempt :-(
```suggestion
See: `azure.kusto.data.response.KustoResponseDataSet`
```
--
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