From 45d424efba97d974ff4b3955ddb8ae9032348e85 Mon Sep 17 00:00:00 2001 From: Jacob Weinhold <29459386+jfw-ppi@users.noreply.github.com> Date: Sat, 29 Nov 2025 16:20:38 +0100 Subject: [PATCH 1/2] fix: handle hyphon in sqlite project name (#5575) Signed-off-by: Jacob Weinhold <29459386+jfw-ppi@users.noreply.github.com> --- sdk/python/feast/repo_config.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/repo_config.py b/sdk/python/feast/repo_config.py index ac4383e1142..fc307bd2631 100644 --- a/sdk/python/feast/repo_config.py +++ b/sdk/python/feast/repo_config.py @@ -28,6 +28,7 @@ ) from feast.importer import import_class from feast.permissions.auth.auth_type import AuthType +from feast.repo_operations import is_valid_name warnings.simplefilter("once", RuntimeWarning) @@ -447,6 +448,7 @@ def _validate_online_store_config(cls, values: Any) -> Any: online_config_class(**values["online_store"]) except ValidationError as e: raise e + return values @model_validator(mode="before") @@ -502,14 +504,25 @@ def _validate_feature_server_config(cls, values: Any) -> Any: @field_validator("project") @classmethod - def _validate_project_name(cls, v: str) -> str: - from feast.repo_operations import is_valid_name + def _validate_project_name(cls, v: str, info: ValidationInfo) -> str: + sqlite_compatible = False + + online_store = info.data.get("online_store") if info else None + if online_store is None or online_store == {}: + sqlite_compatible = True + elif isinstance(online_store, dict): + sqlite_compatible = online_store.get("type", "sqlite") == "sqlite" if not is_valid_name(v): raise ValueError( f"Project name, {v}, should only have " f"alphanumerical values, underscores, and hyphens but not start with an underscore or hyphen." ) + + if sqlite_compatible and "-" in v: + raise ValueError( + "Project names for SQLite online stores cannot contain hyphens because they are used in table names." + ) return v @field_validator("flags") From 1ac5c8ea8ca03c4a29e6a297ca890abe0677cbee Mon Sep 17 00:00:00 2001 From: Jacob Weinhold <29459386+jfw-ppi@users.noreply.github.com> Date: Sat, 29 Nov 2025 17:31:15 +0100 Subject: [PATCH 2/2] fix: handle hyphon in sqlite project name ([#5575](https://github.com/feast-dev/feast/issues/5575)) Signed-off-by: Jacob Weinhold <29459386+jfw-ppi@users.noreply.github.com> --- sdk/python/feast/repo_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/repo_config.py b/sdk/python/feast/repo_config.py index fc307bd2631..2cd148edb66 100644 --- a/sdk/python/feast/repo_config.py +++ b/sdk/python/feast/repo_config.py @@ -28,7 +28,6 @@ ) from feast.importer import import_class from feast.permissions.auth.auth_type import AuthType -from feast.repo_operations import is_valid_name warnings.simplefilter("once", RuntimeWarning) @@ -505,6 +504,9 @@ def _validate_feature_server_config(cls, values: Any) -> Any: @field_validator("project") @classmethod def _validate_project_name(cls, v: str, info: ValidationInfo) -> str: + # Deferred import to avoid circular dependency during package initialization. + from feast.repo_operations import is_valid_name + sqlite_compatible = False online_store = info.data.get("online_store") if info else None