Skip to content

fix: Validate SQLite project names during init - #6809

Open
angelo-lacson wants to merge 1 commit into
feast-dev:masterfrom
angelo-lacson:fix/sqlite-init-project-name
Open

angelo-lacson wants to merge 1 commit into
feast-dev:masterfrom
angelo-lacson:fix/sqlite-init-project-name

Conversation

@angelo-lacson

Copy link
Copy Markdown

What this PR does / why we need it:

feast init currently accepts a hyphenated project name for the default local template, then generates a repository that cannot load because its SQLite online store rejects that name.

This change validates the project name against the selected built-in template before creating the target directory. SQLite-backed templates now return the existing SQLite-specific error immediately, while the general project-name validator continues to allow hyphens.

The PR implements option 2 proposed in the issue and is a draft pending maintainer confirmation of that behavior.

Which issue(s) this PR fixes:

Fixes #6808

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change
pytest sdk/python/tests/unit/local_feast_tests/test_init.py -q
4 passed

Also verified the changed files with Ruff formatting and lint checks.

Misc

The regression test confirms that feast init hyphen-name fails with the SQLite-specific message and does not leave a partially generated directory.

@angelo-lacson
angelo-lacson marked this pull request as ready for review September 2, 2026 10:37
@angelo-lacson
angelo-lacson requested a review from a team as a code owner September 2, 2026 10:37

@angelo-lacson angelo-lacson left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, maintainers, this PR is ready for review and the workflows are awaiting approval, Thanks!

@codecov-commenter

codecov-commenter commented Sep 16, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.11%. Comparing base (922db5c) to head (c374b50).

Files with missing lines Patch % Lines
sdk/python/feast/repo_operations.py 33.33% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6809      +/-   ##
==========================================
- Coverage   47.11%   47.11%   -0.01%     
==========================================
  Files         419      419              
  Lines       51886    51889       +3     
  Branches     7528     7529       +1     
==========================================
  Hits        24448    24448              
- Misses      25688    25690       +2     
- Partials     1750     1751       +1     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 48.42% <33.33%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
sdk/python/feast/repo_operations.py 39.14% <33.33%> (-0.06%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 922db5c...c374b50. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ntkathole
ntkathole force-pushed the fix/sqlite-init-project-name branch from 46ff878 to c374b50 Compare September 16, 2026 06:51

if "-" in repo_name and template.lower() in _SQLITE_ONLINE_STORE_TEMPLATES:
raise BadParameter(
message="Project names for SQLite online stores cannot contain hyphens because they are used in table names.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angelo-lacson Thanks for PR, this looks good!

Can you also consider a shared helper with repo_config._validate_project_name so the error message and SQLite rule stay in one place ? Currently there is duplication of error messages between this and #5749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feast init accepts project names incompatible with the local SQLite template

3 participants