eladkal commented on code in PR #40132: URL: https://github.com/apache/airflow/pull/40132#discussion_r1631883009
########## tests/providers/microsoft/azure/hooks/test_adx.py: ########## @@ -279,20 +279,28 @@ def test_run_query(self, mock_execute, mocked_connection): assert args[1]["properties"]._options["option1"] == "option_value" @pytest.mark.parametrize( - "mocked_connection", + "mocked_connection, warning", [ pytest.param( "a://usr:pw@host?extra__azure_data_explorer__tenant=my-tenant" "&extra__azure_data_explorer__auth_method=AAD_APP", + True, id="prefix", ), - pytest.param("a://usr:pw@host?tenant=my-tenant&auth_method=AAD_APP", id="no-prefix"), + pytest.param("a://usr:pw@host?tenant=my-tenant&auth_method=AAD_APP", False, id="no-prefix"), ], - indirect=True, + indirect=["mocked_connection"], ) - def test_backcompat_prefix_works(self, mocked_connection): + def test_backcompat_prefix_works(self, mocked_connection, warning): hook = AzureDataExplorerHook(azure_data_explorer_conn_id=mocked_connection.conn_id) - assert hook.connection._kcsb.data_source == "host" + if warning: + with pytest.warns( + AirflowProviderDeprecationWarning, + match="`extra__azure_data_explorer__.*` is deprecated in azure connection extra, please use `.*` instead", + ): + assert hook.connection._kcsb.data_source == "host" + else: + assert hook.connection._kcsb.data_source == "host" Review Comment: I don't know if we need it? https://github.com/apache/airflow/pull/27219/files suggets that that this was to preserve backward compatbility with min Airflow 2.5.0 now that we are on 2.7.0 maybe we can safely remove the backported code? cc @dstandish -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org