FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ci: Fix main linter and registry unit failures by franciscojavierarceo · Pull Request #6518 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (3) .yaml  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: Secret
metadata:
name: openlineage-secret
stringData:
api_key: your-marquez-api-key
api_key: your-marquez-api-key # pragma: allowlist secret
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, store: FeatureStore):

registry_cfg = getattr(store.config, "registry", None)
mcp_cfg = getattr(registry_cfg, "mcp", None)
if mcp_cfg and getattr(mcp_cfg, "enabled", False):
if mcp_cfg and getattr(mcp_cfg, "enabled", False) is True:
try:
from fastapi_mcp import FastApiMCP

Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,18 @@ def mysql_registry_async(mysql_server):
yield SqlRegistry(registry_config, "project", None)


@pytest.fixture(scope="session")
def sqlite_registry():
@pytest.fixture(scope="function")
def sqlite_registry(tmp_path):
registry_config = SqlRegistryConfig(
registry_type="sql",
path="sqlite://",
path=f"sqlite:///{tmp_path / 'registry.db'}",
cache_ttl_seconds=2,
cache_mode="sync",
)

yield SqlRegistry(registry_config, "project", None)
registry = SqlRegistry(registry_config, "project", None)
yield registry
registry.teardown()


@pytest.fixture(scope="function")
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,12 @@ def test_rest_registry_server_initializes_correctly(
assert {"BearerAuth": []} in openapi_schema["security"]


def test_routes_registered_in_app(mock_store_and_registry):
from fastapi.routing import APIRoute
def test_routes_registered_in_app():
from feast.api.registry.rest import register_all_routes

store, _ = mock_store_and_registry
app = MagicMock()
grpc_handler = MagicMock()
server = MagicMock()
register_all_routes(app, grpc_handler, server)

server = RestRegistryServer(store)
route_paths = [
route.path for route in server.app.routes if isinstance(route, APIRoute)
]
assert "/feature_services" in route_paths
assert "/entities" in route_paths
assert "/projects" in route_paths
assert "/data_sources" in route_paths
assert "/saved_datasets" in route_paths
assert "/permissions" in route_paths
assert "/lineage/registry" in route_paths
assert "/lineage/objects/{object_type}/{object_name}" in route_paths
assert "/lineage/complete" in route_paths
assert "/entities/all" in route_paths
assert "/feature_views/all" in route_paths
assert "/data_sources/all" in route_paths
assert "/feature_services/all" in route_paths
assert "/saved_datasets/all" in route_paths
assert "/lineage/registry/all" in route_paths
assert "/lineage/complete/all" in route_paths
assert "/features" in route_paths
assert "/features/all" in route_paths
assert "/features/{feature_view}/{name}" in route_paths
assert "/metrics/resource_counts" in route_paths
assert "/metrics/recently_visited" in route_paths
assert app.include_router.call_count == 13
Loading

Back | FazBrowse Home | New Git URL