You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by el...@apache.org on 2022/07/03 16:33:35 UTC

[airflow] branch main updated: Remove Tableau from Salesforce provider (#23747)

This is an automated email from the ASF dual-hosted git repository.

eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 9c995523f2 Remove Tableau from Salesforce provider (#23747)
9c995523f2 is described below

commit 9c995523f28150de3153d7cb16d605a43dbed09d
Author: eladkal <45...@users.noreply.github.com>
AuthorDate: Sun Jul 3 19:33:13 2022 +0300

    Remove Tableau from Salesforce provider (#23747)
    
    * Remove Tableau from Salesforce provider
    Tableau was split from Salesforce provider a year+ ago in https://github.com/apache/airflow/pull/14030
    We kept Tableau in Salesforce to preserve backward compatibility, it's time to remove the deprecated dependency.
---
 airflow/providers/salesforce/CHANGELOG.rst         | 11 ++++++++
 airflow/providers/salesforce/hooks/tableau.py      | 26 -------------------
 .../operators/tableau_refresh_workbook.py          | 28 ---------------------
 airflow/providers/salesforce/provider.yaml         | 10 --------
 airflow/providers/salesforce/sensors/__init__.py   | 16 ------------
 .../salesforce/sensors/tableau_job_status.py       | 29 ----------------------
 .../tableau/operators/tableau_refresh_workbook.py  |  2 +-
 docs/apache-airflow-providers-salesforce/index.rst | 20 ---------------
 generated/provider_dependencies.json               |  7 ++----
 scripts/in_container/verify_providers.py           |  5 +---
 10 files changed, 15 insertions(+), 139 deletions(-)

diff --git a/airflow/providers/salesforce/CHANGELOG.rst b/airflow/providers/salesforce/CHANGELOG.rst
index 40c5320752..7e7c22dcb5 100644
--- a/airflow/providers/salesforce/CHANGELOG.rst
+++ b/airflow/providers/salesforce/CHANGELOG.rst
@@ -24,6 +24,17 @@
 Changelog
 ---------
 
+5.0.0
+.....
+
+Breaking changes
+~~~~~~~~~~~~~~~~
+
+* ``Remove Tableau from Salesforce provider (#23747)``
+
+.. warning:: Due to tableau extra removal, ``pip install apache-airflow-providers-salesforce[tableau]``
+   will not work. You can install Tableau provider directly via ``pip install apache-airflow-providers-tableau``.
+
 4.0.0
 .....
 
diff --git a/airflow/providers/salesforce/hooks/tableau.py b/airflow/providers/salesforce/hooks/tableau.py
deleted file mode 100644
index 8dcfe82a8e..0000000000
--- a/airflow/providers/salesforce/hooks/tableau.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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.
-
-import warnings
-
-from airflow.providers.tableau.hooks.tableau import TableauHook, TableauJobFinishCode  # noqa
-
-warnings.warn(
-    "This module is deprecated. Please use `airflow.providers.tableau.hooks.tableau`.",
-    DeprecationWarning,
-    stacklevel=2,
-)
diff --git a/airflow/providers/salesforce/operators/tableau_refresh_workbook.py b/airflow/providers/salesforce/operators/tableau_refresh_workbook.py
deleted file mode 100644
index 007575caad..0000000000
--- a/airflow/providers/salesforce/operators/tableau_refresh_workbook.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-import warnings
-
-from airflow.providers.tableau.operators.tableau_refresh_workbook import (  # noqa
-    TableauRefreshWorkbookOperator,
-)
-
-warnings.warn(
-    "This module is deprecated. Please use `airflow.providers.tableau.operators.tableau_refresh_workbook`.",
-    DeprecationWarning,
-    stacklevel=2,
-)
diff --git a/airflow/providers/salesforce/provider.yaml b/airflow/providers/salesforce/provider.yaml
index 5e1d2dee04..f21af24570 100644
--- a/airflow/providers/salesforce/provider.yaml
+++ b/airflow/providers/salesforce/provider.yaml
@@ -39,7 +39,6 @@ versions:
 dependencies:
   - apache-airflow>=2.2.0
   - simple-salesforce>=1.0.0
-  - tableauserverclient
   - pandas>=0.17.1
 
 integrations:
@@ -54,17 +53,8 @@ operators:
   - integration-name: Salesforce
     python-modules:
       - airflow.providers.salesforce.operators.salesforce_apex_rest
-      - airflow.providers.salesforce.operators.tableau_refresh_workbook
-
-sensors:
-  - integration-name: Salesforce
-    python-modules:
-      - airflow.providers.salesforce.sensors.tableau_job_status
 
 hooks:
-  - integration-name: Tableau
-    python-modules:
-      - airflow.providers.salesforce.hooks.tableau
   - integration-name: Salesforce
     python-modules:
       - airflow.providers.salesforce.hooks.salesforce
diff --git a/airflow/providers/salesforce/sensors/__init__.py b/airflow/providers/salesforce/sensors/__init__.py
deleted file mode 100644
index 13a83393a9..0000000000
--- a/airflow/providers/salesforce/sensors/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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.
diff --git a/airflow/providers/salesforce/sensors/tableau_job_status.py b/airflow/providers/salesforce/sensors/tableau_job_status.py
deleted file mode 100644
index 09e2a373ea..0000000000
--- a/airflow/providers/salesforce/sensors/tableau_job_status.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-
-import warnings
-
-from airflow.providers.tableau.sensors.tableau import (  # noqa
-    TableauJobFailedException,
-    TableauJobStatusSensor,
-)
-
-warnings.warn(
-    "This module is deprecated. Please use `airflow.providers.tableau.sensors.tableau_job_status`.",
-    DeprecationWarning,
-    stacklevel=2,
-)
diff --git a/airflow/providers/tableau/operators/tableau_refresh_workbook.py b/airflow/providers/tableau/operators/tableau_refresh_workbook.py
index 306c3ded62..79f82af330 100644
--- a/airflow/providers/tableau/operators/tableau_refresh_workbook.py
+++ b/airflow/providers/tableau/operators/tableau_refresh_workbook.py
@@ -25,7 +25,7 @@ if TYPE_CHECKING:
 
 
 warnings.warn(
-    """This operator is deprecated. Please use `airflow.providers.tableau.operators.tableau`.""",
+    "This module is deprecated. Please use `airflow.providers.tableau.operators.tableau`.",
     DeprecationWarning,
     stacklevel=2,
 )
diff --git a/docs/apache-airflow-providers-salesforce/index.rst b/docs/apache-airflow-providers-salesforce/index.rst
index 8d50dade33..113d5d4c89 100644
--- a/docs/apache-airflow-providers-salesforce/index.rst
+++ b/docs/apache-airflow-providers-salesforce/index.rst
@@ -89,28 +89,8 @@ PIP package              Version required
 ``apache-airflow``       ``>=2.2.0``
 ``pandas``               ``>=0.17.1``
 ``simple-salesforce``    ``>=1.0.0``
-``tableauserverclient``
 =======================  ==================
 
-Cross provider package dependencies
------------------------------------
-
-Those are dependencies that might be needed in order to use all the features of the package.
-You need to install the specified provider packages in order to use them.
-
-You can install such cross-provider dependencies when installing from PyPI. For example:
-
-.. code-block:: bash
-
-    pip install apache-airflow-providers-salesforce[tableau]
-
-
-======================================================================================================  ===========
-Dependent package                                                                                       Extra
-======================================================================================================  ===========
-`apache-airflow-providers-tableau <https://airflow.apache.org/docs/apache-airflow-providers-tableau>`_  ``tableau``
-======================================================================================================  ===========
-
 Downloading official packages
 -----------------------------
 
diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json
index 6226703df3..47ed7c83ee 100644
--- a/generated/provider_dependencies.json
+++ b/generated/provider_dependencies.json
@@ -551,12 +551,9 @@
     "deps": [
       "apache-airflow>=2.2.0",
       "pandas>=0.17.1",
-      "simple-salesforce>=1.0.0",
-      "tableauserverclient"
+      "simple-salesforce>=1.0.0"
     ],
-    "cross-providers-deps": [
-      "tableau"
-    ]
+    "cross-providers-deps": []
   },
   "samba": {
     "deps": [
diff --git a/scripts/in_container/verify_providers.py b/scripts/in_container/verify_providers.py
index fa4f759dec..e3d0220178 100755
--- a/scripts/in_container/verify_providers.py
+++ b/scripts/in_container/verify_providers.py
@@ -149,7 +149,6 @@ KNOWN_DEPRECATED_MESSAGES: Set[Tuple[str, str]] = {
         " for alternative uses",
         "hdfs",
     ),
-    ("This operator is deprecated. Please use `airflow.providers.tableau.operators.tableau`.", "salesforce"),
     (
         "You have an incompatible version of 'pyarrow' installed (4.0.1), please install a version that"
         " adheres to: 'pyarrow<3.1.0,>=3.0.0; extra == \"pandas\"'",
@@ -211,9 +210,7 @@ KNOWN_DEPRECATED_DIRECT_IMPORTS: Set[str] = {
     "This module is deprecated. Please use `airflow.providers.microsoft.azure.sensors.cosmos`.",
     "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.dynamodb`.",
     "This module is deprecated. Please use `airflow.providers.microsoft.azure.transfers.local_to_wasb`.",
-    "This module is deprecated. Please use `airflow.providers.tableau.operators.tableau_refresh_workbook`.",
-    "This module is deprecated. Please use `airflow.providers.tableau.sensors.tableau_job_status`.",
-    "This module is deprecated. Please use `airflow.providers.tableau.hooks.tableau`.",
+    "This module is deprecated. Please use `airflow.providers.tableau.operators.tableau`.",
     "This module is deprecated. Please use `kubernetes.client.models.V1Volume`.",
     "This module is deprecated. Please use `kubernetes.client.models.V1VolumeMount`.",
     (