Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix bug with no SqlRegistryConfig class #3586

Merged
merged 3 commits into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion sdk/python/feast/infra/registry/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from threading import Lock
from typing import Any, Callable, List, Optional, Set, Union

from pydantic import StrictStr
from sqlalchemy import ( # type: ignore
BigInteger,
Column,
Expand Down Expand Up @@ -178,10 +179,19 @@ class FeastMetadataKeys(Enum):
)


class SqlRegistryConfig(RegistryConfig):
registry_type: StrictStr = "sql"
""" str: Provider name or a class name that implements Registry."""

path: StrictStr = ""
""" str: Path to metadata store.
If registry_type is 'sql', then this is a database URL as expected by SQLAlchemy """


class SqlRegistry(BaseRegistry):
def __init__(
self,
registry_config: Optional[RegistryConfig],
registry_config: Optional[Union[RegistryConfig, SqlRegistryConfig]],
project: str,
repo_path: Optional[Path],
):
Expand Down