Taragolis commented on PR #39752: URL: https://github.com/apache/airflow/pull/39752#issuecomment-2127624540
Yeah I've already I found information: https://cloud.google.com/vision/automl/docs/deprecations - Service Deprecated from January 23, 2023 - Service Shutdown from March 31, 2024 We never deprecate this operators before, so we can't deprecate it now, as I mention before deprecate mean "you still could use by your risk but it remove in some time in the future" What we could do it is raise an error on class initialise (what you already done) or on attempt to import this operators by utilise [PEP-562](https://peps.python.org/pep-0562/) ```python # airflow/providers/google/cloud/operators/automl.py ... def __getattr__(name: str): # PEP-562: Lazy loaded attributes on python modules if name == "AutoMLTablesUpdateDatasetOperator": # Don't forget to remove class AutoMLTablesUpdateDatasetOperator, so it would be also gone from else where raise ImportError("Here the message why we pending to remove this operator") elif ...: ... else: raise AttributeError(f"module {__name__!r} has no attribute {name!r}") ``` Now it is more about wording and timeframe when we could deprecate operators. We could deprecate them before March 31, 2024, it's too late now 😞 So we should change error message to something like that. It is necessary to mention that the reason for deletion is that the service is no longer available ```text Operator/Hook/Sensor/Class FooBar has been removed due to shutdown a legacy version of AutoML Vision on March 31, 2024. see: https://cloud.google.com/vision/automl/docs/deprecations Suggestion to switch to another Operator/Hook/Sensor/Class if there is any exists or steps what end users could also do. ``` And finally we should add information about removals in provider [CHANGELOG.rst](https://github.com/apache/airflow/blob/97e867f1701fae287a20dff7e0f9e9ecbdc38f27/airflow/providers/google/CHANGELOG.rst). https://github.com/apache/airflow/blob/97e867f1701fae287a20dff7e0f9e9ecbdc38f27/airflow/providers/google/CHANGELOG.rst?plain=1#L229-L237 https://github.com/apache/airflow/blob/fe4605a10e26f1b8a180979ba5765d1cb7fb0111/airflow/providers/slack/CHANGELOG.rst?plain=1#L37-L52 https://github.com/apache/airflow/blob/97e867f1701fae287a20dff7e0f9e9ecbdc38f27/airflow/providers/microsoft/azure/CHANGELOG.rst?plain=1#L458-L463 The same valid for the operators with already removed functional but it could be done by the 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. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org