diff --git a/sdk/python/feast/repo_config.py b/sdk/python/feast/repo_config.py index bf0bde6fcb..1b991d058b 100644 --- a/sdk/python/feast/repo_config.py +++ b/sdk/python/feast/repo_config.py @@ -158,9 +158,9 @@ class RepoConfig(FeastBaseModel): """Repo config. Typically loaded from `feature_store.yaml`""" project: StrictStr - """ str: Feast project id. This can be any alphanumeric string up to 16 characters. + """ str: This acts as a Feast unique project identifier. This can be any alphanumeric string and can have '_' but can not start with '_'. You can have multiple independent feature repositories deployed to the same cloud - provider account, as long as they have different project ids. + provider account, as long as they have different project identifier. """ provider: StrictStr = "local" diff --git a/sdk/python/tests/unit/sdk/python/feast/test_repo_operations_validate_feast_project_name.py b/sdk/python/tests/unit/sdk/python/feast/test_repo_operations_validate_feast_project_name.py new file mode 100644 index 0000000000..ba4a60ddc0 --- /dev/null +++ b/sdk/python/tests/unit/sdk/python/feast/test_repo_operations_validate_feast_project_name.py @@ -0,0 +1,26 @@ +from sdk.python.feast.repo_operations import is_valid_name + + +def test_is_valid_name(): + test_cases = [ + # Valid project name cases + ("valid_name1", True), + ("username_1234", True), + ("valid123", True), + ("1234567890123456", True), + ("invalid_name_", True), + ("12345678901234567", True), + ("too_long_name_123", True), + # Invalid project name cases + ("_invalidName", False), + ("invalid-Name", False), + ("invalid name", False), + ("invalid@name", False), + ("invalid$name", False), + ("__", False), + ] + + for name, expected in test_cases: + assert ( + is_valid_name(name) == expected + ), f"Failed for project invalid name: {name}"