feast init accepts project names incompatible with the local SQLite template
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 1.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
## Expected Behavior
A repository successfully created by `feast init` should work with its generated configuration, or the CLI should reject a project name that is incompatible with the selected template.
## Current Behavior
The default local template accepts a hyphenated repository/project name:
```bash
feast init feast-smoke -t local
```
The command exits successfully and generates a repository whose `feature_store.yaml` contains:
```yaml
project: feast-smoke
```
However, loading that generated repository fails because the local template uses the SQLite online store:
```text
Value error, Project names for SQLite online stores cannot contain hyphens because they are used in table names.
at feature_store.yaml
```
This means `feast init` successfully generates a repository that cannot be used without manually editing its configuration.
## Steps to Reproduce
```bash
feast init feast-smoke -t local
cd feast-smoke/feature_repo
python test_workflow.py
```
The failure occurs when `FeatureStore(repo_path=".")` loads the generated configuration.
Using an underscore succeeds through the complete local workflow:
```bash
feast init feast_smoke -t local
cd feast_smoke/feature_repo
python test_workflow.py
```
## Existing Test Behavior
`sdk/python/tests/unit/test_repo_operations_validate_feast_project_name.py` explicitly considers `hyphen-name` valid, while the generated SQLite-backed local repository rejects it later.
## Related History
- #1545 previously tracked SQLite failures caused by hyphens in project names.
- #5561 and #5562 added support for hyphens in repository/project names.
- The current validation allows hyphens, but the generated SQLite-backed local repository remains incompatible.
- This issue supersedes closed #6807, which was accidentally submitted through the wrong connected GitHub account.
## Possible Solutions
Either:
1. Make SQLite table-name generation safely support hyphenated Feast project names; or
2. Reject hyphenated names early when `feast init` uses a SQLite-backed template, with a clear error; or
3. Preserve the requested directory name while normalizing the generated Feast project name (for example, `feast-smoke` → `feast_smoke`).
I would be happy to contribute the fix once maintainers confirm the preferred behavior.
## Environment
- Feast: `0.66.1.dev6+g5ad559239`
- Python: `3.10.12`
- OS: Ubuntu 22.04.5 LTS
Contributor guide
Research direction
Start with the `feast init` local-template flow and `feature_store.yaml`, then reproduce the failure with `feast-smoke` and `test_workflow.py`. Read `sdk/python/tests/unit/test_repo_operations_validate_feast_project_name.py` and the related history to understand the existing validation. Done means the generated local repository works end to end or rejects incompatible names with a clear error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100