Skip to content

feat: Add project delete command to CLI#6212

Open
crawfordxx wants to merge 1 commit intofeast-dev:masterfrom
crawfordxx:feat-cli-project-delete
Open

feat: Add project delete command to CLI#6212
crawfordxx wants to merge 1 commit intofeast-dev:masterfrom
crawfordxx:feat-cli-project-delete

Conversation

@crawfordxx
Copy link
Copy Markdown

@crawfordxx crawfordxx commented Apr 1, 2026

What this PR does / why we need it:

Exposes project deletion via the CLI. The registry already supports delete_project() programmatically, but there was no corresponding CLI command. This adds:

  • FeatureStore.delete_project(name) — thin wrapper around registry.delete_project()
  • feast projects delete <name> CLI command with a confirmation prompt
  • --yes / -y flag to skip the confirmation (useful for scripting)

Which issue(s) this PR fixes:

Fixes #5095

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

  • Manual tests
  • Unit tests

Misc

Usage:

# Interactive (prompts for confirmation)
feast projects delete my_project

# Non-interactive
feast projects delete my_project --yes

Open with Devin

Expose project deletion via `feast projects delete <name>` CLI command.
The registry already supports deleting projects programmatically, but
there was no CLI command for it.

- Add `delete_project` method to `FeatureStore`
- Add `feast projects delete` CLI command with confirmation prompt
- Support `--yes/-y` flag to skip confirmation

Fixes feast-dev#5095

Signed-off-by: majianhan <majianhan@kylinos.cn>
@crawfordxx crawfordxx requested a review from a team as a code owner April 1, 2026 15:08
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment on lines +3399 to +3400
Raises:
ProjectObjectNotFoundException: The project could not be found.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Docstring documents wrong exception type (ProjectObjectNotFoundException vs actual ProjectNotFoundException)

The FeatureStore.delete_project docstring states it raises ProjectObjectNotFoundException, but all registry implementations (registry.py:1519, sql.py:1667, snowflake.py:1330) actually raise ProjectNotFoundException. These are different classes with different inheritance: ProjectObjectNotFoundException extends FeastObjectNotFoundException (line 553 in errors.py), while ProjectNotFoundException extends FeastError directly (line 548 in errors.py). A caller writing except ProjectObjectNotFoundException based on this docstring would fail to catch the actual ProjectNotFoundException, resulting in an unhandled exception. The CLI code at sdk/python/feast/cli/projects.py:77-81 avoids this issue by catching the exception only around get_project (which correctly raises ProjectObjectNotFoundException), not around delete_project.

Suggested change
Raises:
ProjectObjectNotFoundException: The project could not be found.
Raises:
ProjectNotFoundException: The project could not be found.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

Expose project deletion to CLI

1 participant