potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033805856


   I looked up where it could come from, and I came up with likely fix to the 
"blank-out" #21463  - however this is more a "guesswork" based on what I 
"think" happens. I have not much experience with the Role Model of FAB and 
relations there, but it seems that the `blank-out` error might be fixed by 
updating cascade methods on relationships (and the root causes seems to be that 
`sync_roles` is likely removing some related rows in a different order (or not 
taking into account our relationships). 
   
   If the 
https://stackoverflow.com/questions/23699651/dependency-rule-tried-to-blank-out-primary-key-in-sqlalchemy-when-foreign-key-c
 is right - this **might** be solved by declaring cascade dependency including 
"delete-orphan" (however I just try it out it in #21463 without deeper 
understanding how it works, hoping that it will work,  and only now started 
reading about it to try to understand it - but I think summoning those who 
possibly understand more about the FAB/Airlfow model inconsistencies and how 
they are different might actually provide some better fixes (or maybe just 
fixes - I am not even sure if what I proposed makes sense yet).
   


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