rusackas opened a new pull request, #43467: URL: https://github.com/apache/superset/pull/43467
### SUMMARY `superset/daos/tag.py` imports `current_user_can_modify_object` from `superset.commands.tag.utils`, which has never defined or re-exported it — the function only exists in `superset.commands.utils`. This breaks Flask app boot entirely: `superset.commands.utils` itself imports `TagDAO`, so any request path through `ChartRestApi` → `commands/chart/create.py` → `commands/utils.py` → `daos/tag.py` hits the bad import at module load time. Importing it directly from `commands.utils` at module level creates a circular import (`commands.utils` → `daos.tag` → `commands.utils`), so the import is deferred to call time inside `create_tag_relationship`, the one place `daos/tag.py` needs it — matching the existing deferred-import pattern already used elsewhere in this codebase for the same reason. Introduced by #43390. ### TESTING INSTRUCTIONS `pytest tests/unit_tests/tags/ tests/unit_tests/commands/test_utils.py` — updated the two mocks in `tests/unit_tests/tags/commands/update_test.py` that patched the (never-correct) `superset.daos.tag.current_user_can_modify_object` path to patch the real source, `superset.commands.utils.current_user_can_modify_object`, instead. Also ran the full `tests/unit_tests/` suite to confirm nothing else silently depended on the broken import. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
