GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — fix: Avoid importing feast.feature_store at mcp_server import time by larrysingleton007 · Pull Request #6634 · feast-dev/feast Conversation
Contributor
What this PR does / why we need it:
Under parallel unit-test collection ( Moving the import under Which issue(s) this PR fixes:Fixes #6633 Checks
Testing Strategy
MiscRelease note: NONE. As an outside contributor I can't apply labels, so a maintainer will need to add
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
4 of 7 tasks
|
There was an error while loading. Please reload this page.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## master #6634 +/- ## ========================================== - Coverage 45.75% 45.75% -0.01% ========================================== Files 414 414 Lines 49701 49700 -1 Branches 7087 7087 ========================================== - Hits 22739 22738 -1 Misses 25377 25377 Partials 1585 1585
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
mcp_server used a module-level `from feast.feature_store import FeatureStore` solely for a type annotation on add_mcp_support_to_app. Because the feast.infra.mcp_servers package __init__ eagerly imports mcp_server, importing the package pulled in the entire feature_store import graph. Under parallel unit-test collection (pytest -n) this intermittently raced with an in-progress feature_store import and failed collection of test_mcp_server.py with `KeyError: 'feast.infra.mcp_servers.mcp_server'`. Move the import under TYPE_CHECKING and use a forward reference, so importing mcp_server no longer triggers the feature_store graph. Public API and the annotation are unchanged. Signed-off-by: Larry Singleton <[email protected]>
9578b51 to
47c89b6
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Flaky unit-test collection: KeyError importing feast.infra.mcp_servers.mcp_server under pytest -n
There was an error while loading. Please reload this page.