potiuk opened a new pull request, #68971: URL: https://github.com/apache/airflow/pull/68971
`tableauserverclient` self-instruments via beartype's import hook on first import, which is slow on a cold runner (**~50s** observed in CI). `ProvidersManager` imports the tableau hook module only to discover provider metadata and **never instantiates the hook**, yet the module-level `from tableauserverclient import ...` forced that whole cost onto the provider scan — enough to hit the 60s per-test timeout on the cold-cache Pendulum2 special-test job (`Tests (AMD)`, v3-3-test). Import `tableauserverclient` lazily inside the methods that actually use it (`Server` in `__init__`, `TableauAuth`/`JWTAuth` in auth, `Pager` in `get_all`; `Pager` kept under `TYPE_CHECKING` for the annotation). Importing the hook module no longer loads `tableauserverclient` at all, so the provider-manager scan test drops from **~50s to ~10s**. Hook-test patches are retargeted to `tableauserverclient.*` since the names are now imported there at call time. Verified locally: 18/18 tableau hook tests pass; importing the hook module no longer imports `tableauserverclient`; the provider-manager test is ~10s; `breeze run mypy` + ruff clean. > Should be backported to `v3-3-test` (where the timeout surfaced). --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
