rusackas opened a new pull request, #45759: URL: https://github.com/apache/superset/pull/45759
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY `superset/mcp_service/utils/retry_utils.py` was a ~230-line standalone reimplementation of retry-with-backoff logic (`exponential_backoff`, `retry_on_exception`, `async_retry_on_exception`, `RetryableOperation`, `retry_database_operation`, `async_retry_database_operation`, `retry_screenshot_operation`), duplicating what `superset/utils/retries.py` already provides via `retry_call()`, a thin wrapper around the `backoff` library. This was scoped as a "migrate real call sites onto `retry_call`" task, but after reading the module in full and grepping the entire repo (production code and tests) for every symbol it exports (`retry_on_exception`, `async_retry_on_exception`, `RetryableOperation`, `retry_database_operation`, `async_retry_database_operation`, `retry_screenshot_operation`, `exponential_backoff`, and both import forms), **there are zero production call sites**. The module was never imported anywhere except by its own dedicated test file, `tests/unit_tests/mcp_service/utils/test_retry_utils.py`. (`superset/mcp_service/auth.py` has an unrelated, independent inline retry helper, `_resolve_user_with_retry`, for stale DB connections during user resolution - it does not use, and never used, this module.) **What was migrated:** nothing, because there was nothing to migrate - no caller to update, no behavior to preserve or risk changing. **What was consolidated/removed:** the entire dead module and its test file, deleting the duplication outright instead of threading a partial migration through call sites that don't exist. **What was deliberately left alone, and why:** `superset/utils/retries.py` itself is untouched - there's no reusable capability to backport since nothing in `mcp_service` was actually exercising `RetryableOperation`'s stateful attempt-tracking or any of the other convenience wrappers in production. As a sanity check on the premise that `retry_call`/`backoff.on_exception` would have been a faithful replacement had a real call site existed, I ran a throwaway script confirming `backoff.on_exception` correctly retries and ultimately awaits an `async def` target that raises N times before succeeding (not checked into this PR - purely a local verification step). ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - no behavior or UI change. ### TESTING INSTRUCTIONS - `python -m pytest tests/unit_tests/mcp_service/utils/ -q` - all 779 remaining tests in that directory pass (the deleted module's 34 tests are gone, nothing else references it). - `python -m pytest tests/unit_tests/mcp_service/ -q --collect-only` - all 13,260 tests across the MCP service suite still collect cleanly, confirming no other test file imports the removed module. - `grep -rn "retry_utils\|retry_on_exception\|RetryableOperation\|retry_database_operation\|async_retry_database_operation\|retry_screenshot_operation" superset/ tests/ --include="*.py"` - returns no results after this change. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [x] Removes existing feature or API (dead, unused internal utility module - never a public API) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
