shahar1 commented on code in PR #74300:
URL: https://github.com/apache/airflow/pull/74300#discussion_r4302995244
##########
providers/snowflake/docs/operators/cortex_agent.rst:
##########
@@ -66,7 +66,7 @@ SnowflakeCortexAgentCreateOperator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Review Comment:
Please add `docs/redirects.txt` entry, otherwise docs may break
##########
providers/snowflake/src/airflow/providers/snowflake/hooks/__init__.py:
##########
@@ -14,3 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+
+from __future__ import annotations
+
+from airflow.utils.deprecation_tools import add_deprecated_classes
+
+__deprecated_classes = {
+ "snowflake_cortex_agent": {
+ "SnowflakeCortexAgentHook": (
+
"airflow.providers.snowflake.hooks.cortex_agent.SnowflakeCortexAgentHook"
Review Comment:
The hook shim maps only `SnowflakeCortexAgentHook`. `CreateMode` and
`JsonResponse` shipped in 6.19.0 but are not mapped. On the PR head, from
`airflow.providers.snowflake.hooks.snowflake_cortex_agent import CreateMode`
raises `ImportError: cannot import name 'CreateMode' ... (unknown location)`.
##########
providers/snowflake/src/airflow/providers/snowflake/hooks/__init__.py:
##########
@@ -14,3 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+
+from __future__ import annotations
+
+from airflow.utils.deprecation_tools import add_deprecated_classes
+
+__deprecated_classes = {
+ "snowflake_cortex_agent": {
+ "SnowflakeCortexAgentHook": (
+
"airflow.providers.snowflake.hooks.cortex_agent.SnowflakeCortexAgentHook"
+ ),
+ },
+ "snowflake_sql_api": {
+ "SnowflakeSqlApiHook":
("airflow.providers.snowflake.hooks.sql_api.SnowflakeSqlApiHook"),
+ },
+}
+
+add_deprecated_classes(__deprecated_classes, __name__)
Review Comment:
Compatibility tests seems to be missing
--
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]