potiuk commented on a change in pull request #20151:
URL: https://github.com/apache/airflow/pull/20151#discussion_r765952468



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -145,6 +145,12 @@ def __init__(
 
         self.dagbag = DagBag(dag_folder=self.subdir, read_dags_from_db=True, 
load_op_links=False)
 
+        if conf.getboolean('smart_sensor', 'use_smart_sensor'):
+            warnings.warn(
+                'Smart sensors are deprecated. Please use Deferrable Operators 
instead.',

Review comment:
       Yep . As described in the devlist. We definitely need a place in the doc 
(and linked from here) where we explain (shortly):
   
   1) why we cannot provide precise migration instructions
   2) what should be general approach of the user who has to migrate. Something 
alongside "For every smart sensor you use, you have to either use or write your 
own defferable operator if want to achieve similar results. If you want to know 
how to write your own operator - find it [here]" (another link)
   
   We should simply assume that the users have not read the docs, know nothing 
about deferrable operators and they should understand that they need to write 
they own deferrable operator instead BEFORE they read the whole documentation 
(which we shoudl helpfuly link so that they do not have to google it or search 
the documentation).
   
   That's teh "approach I 'd use for any deprecation" . I think those two 
pieces are crucial:
   
   1) Explaining "why" we cannot give them instructions
   2) Explaining 'what" they need to do before actually reading the 
documentation is crucial.
   
   The 1) prevents questions "Please give me exact instructions on how to 
remove the deprecation?"
   The 2) prevents questions "What do I need to to do now?".
   
   That's it. No more, no less. 
   
   It's simply giving the right answers to the anticipated questions straight 
there when you see the problem.




-- 
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]


Reply via email to