dosubot[bot] commented on issue #36549: URL: https://github.com/apache/superset/issues/36549#issuecomment-3644178908
<!-- Greeting --> Hi @diegoscarabelli! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> Your analysis is spot on: both critical FAB 5.0 compatibility issues are still present in Superset master as of the latest commit. - The main requirements file still pins Flask-SQLAlchemy to 2.5.1, which is incompatible with FAB 5.0.0 and SQLAlchemy 1.4+—this will cause the `get_bind()` runtime error you described. See the current [requirements/base.txt](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/requirements/base.txt#L134-L134). - The `superset/cli/main.py` `init()` function still unconditionally calls `security_manager.sync_role_definitions()`, which was removed in FAB 5.0.0, so you'll hit an `AttributeError` unless you patch this yourself. See [superset/cli/main.py](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/cli/main.py#L65-L69). **Workarounds until an official fix:** 1. Manually upgrade Flask-SQLAlchemy to 3.x in your environment after install. 2. Patch `superset/cli/main.py` to only call `sync_role_definitions()` if it exists, or remove the call entirely (since `add_permissions(update_perms=True)` now handles role syncing in FAB 5.0+). No additional migration notes or workarounds are documented in the Superset wiki or docs. The upstream PR you referenced is not yet reflected in the current master branch. If you need to support both FAB 4.x and 5.x, use a conditional check for `sync_role_definitions()`. If you only support FAB 5.x, you can safely remove the call. Let me know if you want a ready-to-apply patch or more details on the workaround steps. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ae70a911-b95b-471f-aefd-38c9664fb8cb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ae70a911-b95b-471f-aefd-38c9664fb8cb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ae70a911-b95b-471f-aefd-38c9664fb8cb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ae70a911-b95b-471f-aefd-38c9664fb8cb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ae70a911-b95b-471f-aefd-38c9664fb8cb?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ae70a911-b95b-471f-aefd-38c9664fb8cb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ae70a911-b95b-471f-aefd-38c9664fb8cb?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Your%20analysis%20is%20spot%20on%3A%20both%20critical%20FAB%205.0%20compatibility%20issues%20are%20still%20present%20in%20Superset%20master%20as%20of%20the%20latest%20commit.%0A%0A-%20The%20main%20requirements%20file%20still%20pins%20Flask-SQLAlchemy%20to%202.5.1%2C%20which%20is%20incompatible%20with%20FAB%205.0.0%20and%20SQLAlchemy%201.4%2B%E2%80%94this%20will%20cause%20the%20%60get_bind%28%29%60%20runtime%20error%20you%20described.%20See%20the%20current%20%5Brequirements/base.txt%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/requirements/base.txt%23L134-L134%29.%0A-%20The%20%60superset/cli/main.py%60%20%60init%28%29%60%20function%20still%20unconditionally%20calls%20%60security_manager.sync_role_definition s%28%29%60%2C%20which%20was%20removed%20in%20FAB%205.0.0%2C%20so%20you%27ll%20hit%20an%20%60AttributeError%60%20unless%20you%20patch%20this%20yourself.%20See%20%5Bsuperset/cli/main.py%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/cli/main.py%23L65-L69%29.%0A%0A%2A%2AWorkarounds%20until%20an%20official%20fix%3A%2A%2A%0A1.%20Manually%20upgrade%20Flask-SQLAlchemy%20to%203.x%20in%20your%20environment%20after%20install.%0A2.%20Patch%20%60superset/cli/main.py%60%20to%20only%20call%20%60sync_role_definitions%28%29%60%20if%20it%20exists%2C%20or%20remove%20the%20call%20entirely%20%28since%20%60add_permissions%28update_perms%3DTrue%29%60%20now%20handles%20role%20syncing%20in%20FAB%205.0%2B%29.%0A%0ANo%20additional%20migration%20notes%20or%20workarounds%20are%20documented%20in%20the%20Superset%20wiki%20or%20docs.%20The%20upstream%20PR%20you%20referenced%20is%20not%20yet%20reflected%20in%20the%20current%20master%20branch.%0A%0AIf%20you%20need%2 0to%20support%20both%20FAB%204.x%20and%205.x%2C%20use%20a%20conditional%20check%20for%20%60sync_role_definitions%28%29%60.%20If%20you%20only%20support%20FAB%205.x%2C%20you%20can%20safely%20remove%20the%20call.%0A%0ALet%20me%20know%20if%20you%20want%20a%20ready-to-apply%20patch%20or%20more%20details%20on%20the%20workaround%20steps.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36549) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
