ashb commented on code in PR #22793:
URL: https://github.com/apache/airflow/pull/22793#discussion_r844914538


##########
airflow/models/dagrun.py:
##########
@@ -217,6 +217,12 @@ def set_state(self, state: DagRunState):
             if state == State.QUEUED:
                 self.queued_at = timezone.utcnow()
 
+    @provide_session
+    def reset_run_type(self, session: Session = None):
+        self.run_type = DagRunType.SCHEDULED
+        self.run_id = self.run_id.replace(DagRunType.BACKFILL_JOB.value, 
DagRunType.SCHEDULED.value)

Review Comment:
   Yeah, run_id is used in the FK of multiple tables. We can't change the 
run_id.



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