Skip to content

feat(cli): Add feast projects delete command#6302

Closed
mailtoboggavarapu-coder wants to merge 2 commits intofeast-dev:masterfrom
mailtoboggavarapu-coder:feat/expose-project-delete-cli
Closed

feat(cli): Add feast projects delete command#6302
mailtoboggavarapu-coder wants to merge 2 commits intofeast-dev:masterfrom
mailtoboggavarapu-coder:feat/expose-project-delete-cli

Conversation

@mailtoboggavarapu-coder
Copy link
Copy Markdown

@mailtoboggavarapu-coder mailtoboggavarapu-coder commented Apr 20, 2026

Summary

Closes #5095

Exposes project deletion through the CLI by adding a new feast projects delete <name> subcommand to the existing projects group.

What's changed

Added project_delete command to sdk/python/feast/cli/projects.py:

Usage: feast projects delete [OPTIONS] NAME

  Delete a project and all its resources from the registry.

  This removes the project entry from the registry. Individual objects
  (feature views, entities, data sources) that belong to the project
  are also purged when commit=True (the default).

Options:
  -y, --yes  Skip confirmation prompt and delete immediately.
  --help     Show this message and exit.

Design notes

  • Uses store._registry.delete_project(name, commit=True) directly since FeatureStore does not yet expose a delete_project public method (the abstract method exists in BaseRegistry and is implemented in all concrete registries)
  • Adds an interactive confirmation prompt with click.confirm — can be skipped with --yes / -y for scripting
  • Raises SystemExit(1) on FeastObjectNotFoundException to match the pattern used by describe

Example

# Interactive (prompts for confirmation)
feast projects delete my-project

# Non-interactive
feast projects delete my-project --yes

Checklist

  • Added delete command to projects_cmd group
  • Confirmation prompt with --yes bypass flag
  • Error handling for non-existent projects
  • Follows existing CLI patterns in projects.py

Open in Devin Review

@mailtoboggavarapu-coder mailtoboggavarapu-coder requested a review from a team as a code owner April 20, 2026 23:10
@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Hi team! 👋

This adds the feast projects delete CLI command requested in #5095.

The implementation directly calls store._registry.delete_project() since the abstract method is already fully implemented in all concrete registries (SQL, file, GCS, etc.) — there just wasn't a CLI surface for it yet.

A few design choices I'd love feedback on:

  1. Confirmation prompt — I added an interactive click.confirm that can be bypassed with --yes/-y. Is this the right UX, or would you prefer a different safety mechanism?
  2. Registry access — I call store._registry.delete_project() directly since there's no public FeatureStore.delete_project() method yet. Happy to add a public wrapper on FeatureStore if that's preferred.

Would appreciate a review when you get a chance! Happy to adjust based on feedback. 🙏

devin-ai-integration[bot]

This comment was marked as resolved.

@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Thanks for the thorough review, @devin-ai-integration!

Fix applied in the latest commit:

  • Imported ProjectNotFoundException from feast.errors
  • Updated the except clause to catch both FeastObjectNotFoundException and ProjectNotFoundException, since registry implementations raise the latter when a project does not exist.

@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Hi team! 👋 Friendly ping on this PR adding feast projects delete CLI command. Happy to address any feedback!

@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Hi team! 👋 Friendly ping on this PR adding feast projects delete CLI command (issue #5095). Happy to address any feedback!

@ntkathole ntkathole changed the title feat(cli): add feast projects delete command feat(cli): Add feast projects delete command Apr 22, 2026
@ntkathole
Copy link
Copy Markdown
Member

@mailtoboggavarapu-coder please fix the linting pr checks

devin-ai-integration[bot]

This comment was marked as resolved.

@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Hi team! Checking in on this PR adding the feast projects delete CLI command. The branch has been updated with the latest from master. Let me know if you'd like any changes!

Exposes project deletion via the CLI. The new `feast projects delete <name>`
command calls `store._registry.delete_project()` which is already implemented
in all concrete registries. Adds an interactive confirmation prompt that can
be bypassed with --yes/-y for scripted workflows.

- Adds type guard (`assert store._registry is not None`) for mypy.
- Catches both FeastObjectNotFoundException and ProjectNotFoundException so
  the CLI exits cleanly (exit code 1) for either variant raised by concrete
  registry implementations.

Squashed history: this commit consolidates the previous unsigned commits on
the branch into a single DCO-signed commit, per DCO requirements.

Signed-off-by: Venkateswarlu Boggavarapu <mailtoboggavarapu@gmail.com>
@mailtoboggavarapu-coder mailtoboggavarapu-coder force-pushed the feat/expose-project-delete-cli branch from 544d892 to 686a55c Compare April 22, 2026 17:24
@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Hi @ntkathole — thanks for the nudge! The PR checks have now been addressed:

  • DCO: The branch has been rebased onto the latest master and squashed into a single DCO-signed commit (Signed-off-by: Venkateswarlu Boggavarapu <mailtoboggavarapu@gmail.com>). DCO is now ✅ passing.
  • Lint / ruff: The projects.py changes pass ruff format --check and ruff check locally. The integration/unit-test lanes are currently gated skipped on this PR (path filters), but the code itself is formatter-clean.
  • mypy: The store._registry is not None guard was already added in the previous round to satisfy the union-attr error.

Ready for another look whenever you have time — thanks again!

…t_delete

store._registry is always None until accessed via the lazy-init registry
property. Using store._registry directly caused project_delete to always
crash with an AssertionError.

Fixes: Devin Review finding in feast-dev#6302
Signed-off-by: Venkateswarlu Boggavarapu <mailtoboggavarapu@gmail.com>
@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Thanks for the Devin review! Fixed the store._registry crash in the latest commit:

  • Removed the assert store._registry is not None guard (would always fail)
  • Changed store._registry.delete_project(...)store.registry.delete_project(...) to use the lazy-init property

The registry property in feature_store.py handles initialization on first access, so this now works correctly.

@mailtoboggavarapu-coder
Copy link
Copy Markdown
Author

Closing this PR in favour of #6318 which has a clean single-commit history with a properly matched DCO sign-off (author name = Signed-off-by name). The DCO check was failing here because one commit had mailtoboggavarapu-coder as the git author name while the Signed-off-by said Venkateswarlu Boggavarapu. PR #6318 fixes this with a fresh single commit. All the same changes are included.

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

2 participants