borismo commented on PR #41206:
URL: https://github.com/apache/airflow/pull/41206#issuecomment-2266648312

   Here's what I did:
   - tweaked the existing `deferrable_operator` fixture so it waits for 
completion. The `test_execute_defer` test was failing with my fix. I think this 
test should use an operator configured to wait.
   - added a test which verifies that if we don't want to wait for completion, 
the operator should not check whether the statement has completed and also 
shouldn't enter deferred mode.
   
   Not sure if it's a good idea to iterate over `deferrable`. I did so to keep 
it DRY, since if separate, the 2 two tests would be almost identical. And I 
intend the test to really emphasize on the fact that the `deferrable` value 
doesn't matter.
   
   > [!WARNING]  
   > I realize now that this fix will change the operator's behavior: for folks 
who have been using it with `deferrable = True` and `wait_for_completion = 
False` to make it go into deferrable mode (a workaround IMO), the task instance 
will now immediately be marked as success without waiting. Could break 
downstream tasks that expect the statement to be completed.


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