Uh oh!
There was an error while loading. Please reload this page.
Import tableauserverclient lazily in TableauHook - #68971
Merged
potiuk merged 1 commit intoJun 26, 2026
Merged
Conversation
tableauserverclient self-instruments via beartype's import hook on first import, which is slow on a cold runner (~50s observed in CI). The ProvidersManager imports the tableau hook module only to discover provider metadata and never instantiates the hook, yet the module-level 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. Import tableauserverclient lazily inside the methods that actually use it, so importing the hook module no longer loads it at all. 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.
1 task
bugraoz93
approved these changes
Jun 25, 2026
bugraoz93
left a comment
Contributor
There was a problem hiding this comment.
Good import time improvement!
Uh oh!
There was an error while loading. Please reload this page.
karenbraganz pushed a commit
to karenbraganz/airflow
that referenced
this pull request
Jun 30, 2026
tableauserverclient self-instruments via beartype's import hook on first import, which is slow on a cold runner (~50s observed in CI). The ProvidersManager imports the tableau hook module only to discover provider metadata and never instantiates the hook, yet the module-level 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. Import tableauserverclient lazily inside the methods that actually use it, so importing the hook module no longer loads it at all. 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.
75 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tableauserverclientself-instruments via beartype's import hook on first import, which is slow on a cold runner (~50s observed in CI).ProvidersManagerimports the tableau hook module only to discover provider metadata and never instantiates the hook, yet the module-levelfrom 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
tableauserverclientlazily inside the methods that actually use it (Serverin__init__,TableauAuth/JWTAuthin auth,Pageringet_all;Pagerkept underTYPE_CHECKINGfor the annotation). Importing the hook module no longer loadstableauserverclientat all, so the provider-manager scan test drops from ~50s to ~10s. Hook-test patches are retargeted totableauserverclient.*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.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines