potiuk commented on PR #25532:
URL: https://github.com/apache/airflow/pull/25532#issuecomment-1205170997

   I have another hypothesis:
   
   ```
       run_id = Column(StringID(), nullable=False)
   ```
   
   And we are trying to access it in the log:
   ```
               self.log.info(
                   'Hit IntegrityError while creating the TIs for %s- %s',
                   dag_id,
                   self.run_id,
                   exc_info=True,
               )
   ```
   
   Run id is database, sqlalchemy object. And when you access it and It failed 
to be added due to Integrity Error, MAYBE when you access it before rollback, 
SQL Alchemy knows it just failed to add DafRun, it is in a limbo state when it 
is not yet added but not yet detached either, so it will return the error. 
   
   When you do rollback() the DagRun object itself becomes detecched and you 
can access it's run_id. 
   
   It's a long shot - but maybe ? You can test THAT hypothesis by logging a 
bogus string instead of self.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