You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/08 01:10:08 UTC

[GitHub] [airflow] pingzh opened a new issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

pingzh opened a new issue #21407:
URL: https://github.com/apache/airflow/issues/21407


   ### Apache Airflow version
   
   main (development)
   
   ### What happened
   
   airflow webserver cannot start due to error
   
   ```
   AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '
   ```
   
   ### What you expected to happen
   
   airflow webserver cannot start due to error
   
   ### How to reproduce
   
   Error in CI:
   https://github.com/apache/airflow/runs/5101435727?check_suite_focus=true#step:7:2424
   
   Error from my local:
   
   i have the latest airflow main commit: `471e368eacbcae1eedf9b7e1cb4290c385396ea9`
   
   python version: `3.9.7`
   Flask related pkg:
   
   ```
   ❯ pip list | grep Flas
   Flask                           1.1.4
   Flask-AppBuilder                3.4.4
   Flask-Babel                     2.0.0
   Flask-Caching                   1.10.1
   Flask-JWT-Extended              3.25.1
   Flask-Login                     0.4.1
   Flask-OpenID                    1.3.0
   Flask-SQLAlchemy                2.5.1
   Flask-WTF                       0.14.3
   ```
   
   database: mysql
   
   mysql version:
   
   ```
   ❯ mysql -V
   mysql  Ver 8.0.28 for macos12.0 on arm64 (Homebrew)
   ```
   
   
   the aiflow.cfg and webserver conf are auto generated, i did not change except `sql_alchemy_conn`
   
   
   ### Operating System
   
   Apple M1 Max, version: 12.2
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   local dev
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1034292187


   @ashb @potiuk thanks for looking at this


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1032125080


   i think it should be related to this PR https://github.com/apache/airflow/pull/21296
   
   after I reseted to a commit before that PR. it worked.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033812991


   BTW. My "blind" attempt to fix it, did not work of course.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033849642


   It looks that it helped to revert it - I had to rebase as static tests were failing but it looks like reverting @19294 via #21464  solves at least the "blank-out" problem.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033010604


   > > i am not using `breeze` somehow my breeze is super slow on my Mac even i have allocate lots of CPU and memory.
   > 
   > If you have M1 then yes. it is super slow (still) but ARM support is coming (it's emulated for now due to dependencies)- but we are closer and closer to get M1 native images.
   
   yes, mine is M1.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033817912


   Attempted to rever it and see it here https://github.com/apache/airflow/pull/21464 @pingzh - maybe you can try to revert it as well and see if it helps in your case? 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1034801767


   I think the problem **was** indeed caused by the backref reference blanked out. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033812423


   Hmm. Actually I looked at the history, and I think it's nott the SQLAlchemy.
   
   
   U think the root cause was this: #19294 - @jhtimmins @ashb - it was merged 4 days ago and those relationships have been changed into lazy relationships which seems to break `sync`, Should we revert this change and rework it? 
   
   
   ![image](https://user-images.githubusercontent.com/595491/153220094-9f52f155-8565-41e0-95a5-ac06c8aa0d5c.png)
   
   
   
   
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1032416323


   Looking.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033619255


   > @ashb ah, i know how to reproduce it in the local.
   > 
   > If i don't do `airflow users create -e admin@local -u admin -p admin -r Admin -f Admin -l Admin` after I init the db, `airflow webserver` won't start, due to: `AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '`
   > 
   > but, if i created a user, it worked fine.
   
   No luck -- doesn't work for me :/ Webserver still launches. This is what I see in the output
   
   
   ```
   /usr/local/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'DagRun.serialized_dag' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'BaseXCom.dag_run' (copies xcom.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
   /usr/local/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'SerializedDagModel.dag_runs' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'BaseXCom.dag_run' (copies xcom.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
   /opt/airflow/airflow/www/fab_security/sqla/manager.py:102 SADeprecationWarning: The from_engine() method on Inspector is deprecated and will be removed in a future release.  Please use the sqlalchemy.inspect() function on an Engine or Connection in order to acquire an Inspector. (deprecated since: 1.4)
   [2022-02-09 10:42:51,209] {manager.py:792} WARNING - No user yet created, use flask fab command to do it.
   [2022-02-09 10:42:51,339] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Permissions.menu_access Admin
   [2022-02-09 10:42:51,495] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create Admin
   [2022-02-09 10:42:51,610] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Task Instances.can_edit Admin
   ```


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #21407:
URL: https://github.com/apache/airflow/issues/21407


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh edited a comment on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh edited a comment on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033010394


   @ashb ah, i know how to reproduce it in the local.
   
   If i don't do `airflow users create -e admin@local -u admin -p admin -r Admin -f Admin -l Admin` after I init the db, `airflow webserver` won't start, due to: `AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '`
   
   but, if i created a user, it worked fine.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1032419250


   I'm unable to reproduce this on commit 8f81b9a01 with a totally empty breeze + mysql 5.7 environment.
   
   What version of FAB and SQLA do you have @pingzh ?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jhtimmins commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1034410406


   @ashb for some unclear reason, removing the primaryjoin argument fixed this problem https://github.com/apache/airflow/pull/21482/commits/73cf8829f051a14ca124c4eba1e1fadf47858644#diff-ca9167167af7221fcb832084b435603b76c7ccdf32dc36d822585853e7c3c98bL143


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1034802723


   Many thanks @jhtimmins ! That was a bummer.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033785763


   I guess it is also related to https://github.com/apache/airflow/pull/21167#issuecomment-1031743721 @dstandish @blag @ashb  ? I have not been too involved in the FAB "extraction" but mybe those issue can be handled at the same time? Seems they are releated. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1032473648


   Steps I ran:
   
   ```
   ./breeze stop
   ./breeze -b mysql
   ```
   
   
   Then in container I ran:
   
   ```
   airflow db init
   airflow users create -e admin@local -u admin -p admin -r Admin -f Admin -l Admin
   airflow webserver
   ```
   
   And that launched Without error.
   
   I do see these in the log though
   
   
   ```
   [2022-02-08 10:51:59,436] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Permissions.menu_access Admin
   [2022-02-08 10:51:59,461] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Permissions.menu_access Admin
   [2022-02-08 10:51:59,474] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Permissions.menu_access Admin
   [2022-02-08 10:51:59,529] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Permissions.menu_access Admin
   [2022-02-08 10:51:59,593] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create Admin
   [2022-02-08 10:51:59,621] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create Admin
   [2022-02-08 10:51:59,658] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create Admin
   [2022-02-08 10:51:59,708] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create Admin
   [2022-02-08 10:51:59,723] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Task Instances.can_edit Admin
   [2022-02-08 10:51:59,756] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Task Instances.can_edit Admin
   [2022-02-08 10:51:59,791] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Task Instances.can_edit Admin
   [2022-02-08 10:51:59,834] {manager.py:534} WARNING - Refused to delete permission view, assoc with role exists Task Instances.can_edit Admin
   ```)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033778653


   Yes. I just started to look at it - a lot of docker-compose's is actually failing on that one. We also have a warning generated due to the sqlalchemy 1.4 when we run `breeze start-ariflow` which I have a feeling is related to the 1.4 + FAB migration + fact that we are using copied version of security manager from fab + that we have the workaround for SQLAlchemy 1.4 problems with MSSQL implemented #21303 
   
   I think all this compounds to the warnings/errors we have. and `Dependency rule tried to blank-out primary key column 'ab_permission.id'` is just one of the manifestations of the same problem:
   
   ![image](https://user-images.githubusercontent.com/595491/153213516-ec4b9f8d-a4d6-46f4-843c-be0c3541f7bd.png)
   
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh edited a comment on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh edited a comment on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1032125080


   i think it should be related to this PR https://github.com/apache/airflow/pull/21296
   
   after I reseted to a commit before that PR. it worked.
   
   How to reproduce:
   
   1. drop my mysql database
   2. pull latest main branch
   3. `airflow db init`
   4. `airflow webserver` --> will fail
   5. `git reset --hard e1a2717dae4614dbd3523bb1baacdecbdeadfcac` # reset commit back to that pr.
   6. `airflow webserver` --> fails again
   7. `git reset --hard 40d3a76a9bce2360b951f2e990cba571c5f51a76` # 1 commit before that pr
   8. `airflow webserver` --> works


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033339217


   @ashb @potiuk looks like lots of PR's CIs are blocked by this error. for example:
   
   https://github.com/apache/airflow/pull/21442
   https://github.com/apache/airflow/pull/21332
   https://github.com/apache/airflow/pull/21441
   
   can you share some insights on how to fix this? (starting webserver without needing to create a user first)
   
   or 
   
   can we update the CI to ensure a user is created before trying to start the webserver?
   
   thanks
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033817912


   Attempted to revert it and see it here https://github.com/apache/airflow/pull/21464 
   
   @pingzh - maybe you can try to revert it as well and see if it helps in your case? 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033001166


   thanks for checking @ashb 
   
   i am not using `breeze` somehow my breeze is super slow on my Mac even i have allocate lots of CPU and memory.
   
   Did you see `Deleted %s faulty permissions` in your websever log? since the error came up in the `sesh.delete(perm)` when it tries to `clean_perms` 
   
   ```
   ❯ pip list | grep Flas
   Flask                           1.1.4
   Flask-AppBuilder                3.4.4
   Flask-Babel                     2.0.0
   Flask-Caching                   1.10.1
   Flask-JWT-Extended              3.25.1
   Flask-Login                     0.4.1
   Flask-OpenID                    1.3.0
   Flask-SQLAlchemy                2.5.1
   Flask-WTF                       0.14.3
   
   ❯ pip list | grep SQ
   Flask-SQLAlchemy                2.5.1
   SQLAlchemy                      1.4.9
   SQLAlchemy-JSONField            1.0.0
   SQLAlchemy-Utils                0.38.2
   ```


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033010394


   @ashb ah, i know how to reproduce it in the local.
   
   If i don't do `airflow users create -e admin@local -u admin -p admin -r Admin -f Admin -l Admin` after I inited the db, `airflow webserver` won't start, due to: `AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '`
   
   but, if i created a user, it worked fine.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033008891


   > i am not using `breeze` somehow my breeze is super slow on my Mac even i have allocate lots of CPU and memory.
   
   If you have M1 then yes. it is super slow (still) but ARM support is coming (it's emulated for now due to dependencies)- but we are closer and closer  to get M1 native images.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1034802003


   Closing the issue  then :)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pingzh edited a comment on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
pingzh edited a comment on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033339217


   @ashb @potiuk looks like lots of PR's CIs are blocked by this error. for example:
   
   https://github.com/apache/airflow/pull/21442
   https://github.com/apache/airflow/pull/21332
   https://github.com/apache/airflow/pull/21441
   
   can you share some insights on how to fix this? (starting webserver without needing to create a user first)
   
   or 
   
   ~can we update the CI to ensure a user is created before trying to start the webserver?~
   
   --- update
   
   i saw the user was created https://github.com/apache/airflow/runs/5119349678?check_suite_focus=true#step:7:1491
   
   thanks
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21407: AssertionError: Dependency rule tried to blank-out primary key column 'ab_permission.id' on instance '

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21407:
URL: https://github.com/apache/airflow/issues/21407#issuecomment-1033012328


   > yes, mine is M1.
   
   I feel your pain on my new ARM Mac I bought in December :) . I bought it specifically to feel the pain and have more incentive to fix it :) 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org