GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Handle hyphon in sqlite project name (#5575) (#5749) · feast-dev/feast@b8346ff

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • sdk/python/feast
    • repo_config.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎sdk/python/feast/repo_config.py‎

Copy file name to clipboardExpand all lines: sdk/python/feast/repo_config.py
+16-1Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ def _validate_online_store_config(cls, values: Any) -> Any:
447447
online_config_class(**values["online_store"])
448448
except ValidationError as e:
449449
raise e
450+
450451
return values
451452

452453
@model_validator(mode="before")
@@ -502,14 +503,28 @@ def _validate_feature_server_config(cls, values: Any) -> Any:
502503

503504
@field_validator("project")
504505
@classmethod
505-
def _validate_project_name(cls, v: str) -> str:
506+
def _validate_project_name(cls, v: str, info: ValidationInfo) -> str:
507+
# Deferred import to avoid circular dependency during package initialization.
506508
from feast.repo_operations import is_valid_name
507509

510+
sqlite_compatible = False
511+
512+
online_store = info.data.get("online_store") if info else None
513+
if online_store is None or online_store == {}:
514+
sqlite_compatible = True
515+
elif isinstance(online_store, dict):
516+
sqlite_compatible = online_store.get("type", "sqlite") == "sqlite"
517+
508518
if not is_valid_name(v):
509519
raise ValueError(
510520
f"Project name, {v}, should only have "
511521
f"alphanumerical values, underscores, and hyphens but not start with an underscore or hyphen."
512522
)
523+
524+
if sqlite_compatible and "-" in v:
525+
raise ValueError(
526+
"Project names for SQLite online stores cannot contain hyphens because they are used in table names."
527+
)
513528
return v
514529

515530
@field_validator("flags")

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.