amoghrajesh commented on code in PR #73889:
URL: https://github.com/apache/airflow/pull/73889#discussion_r4248256902


##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -2296,6 +2296,9 @@ def schedule_tis(
                         state=TaskInstanceState.SCHEDULED,
                         scheduled_dttm=timezone.utcnow(),
                         try_number=next_try_number,
+                        # Already archived with the finished try; the new one 
must not inherit it.
+                        retry_reason=None,

Review Comment:
   Good catch, that path did skip the fix entirely. schedule_tis does elif not 
ti.defer_task(...), so a deferred TI never reaches the UPDATE.
   
   Both columns are now cleared in defer_task() where it sets DEFERRED, plus a 
start_from_trigger test: an up_for_retry TI comes out DEFERRED with both null.



##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -2296,6 +2296,9 @@ def schedule_tis(
                         state=TaskInstanceState.SCHEDULED,
                         scheduled_dttm=timezone.utcnow(),
                         try_number=next_try_number,
+                        # Already archived with the finished try; the new one 
must not inherit it.
+                        retry_reason=None,

Review Comment:
   Good catch, that path skipped the fix entirely. defer_task() now clears 
both, with a start_from_trigger test: an up_for_retry TI comes out DEFERRED 
with both null.
   
   



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