potiuk commented on pull request #17545:
URL: https://github.com/apache/airflow/pull/17545#issuecomment-897123893


   > @kaxil so the issue is how @uranusjr put it, that subclassing isn't 
necessarily a natural thing in this situation – why would I subclass an 
`OracleOperator` if I just want to skip running it on Saturdays?
   > 
   > I do think that `BaseOperator` has a lot of parameters already, but at the 
same time, it makes sense if the scheduler could avoid running a task in the 
first place if there's a skip condition that applies.
   
   I have a feeling that skip_condition is a bit too "narrow" - you'd anyhow 
need to pass a callable to it, so why not handle all kinds of exceptions (also 
future ones that we might add).
   
   I think we should either make `pre_execute` override'able via parameter or 
add a new generic kind of "pre-execute" (with different name) callable 
parameter that can throw any exception, rather than boolean skip/no-skip (maybe 
that's what you thought @malthe and we are only now discussing about naming :)  
- which is obviously the hardest part of it. 


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