Fix silent no-op when destroying the Vertex AI Feature Store - #68
Merged
Conversation
destroy_resources.sh guarded its deletes with `if gcloud ai feature-online-stores describe ... >/dev/null 2>&1`. That command group is beta-only and absent from a stock gcloud install, so gcloud exits 2 with "Invalid choice" — which the guard misread as "resource doesn't exist". The script printed "not found — skipping" and "Feature Store torn down" while ml_online_store kept running a Bigtable node and billing. Talk to the Vertex AI REST API directly instead, matching how the store is created (feature_store/setup.py uses the Python SDK, not gcloud). Deletes now poll the returned LRO to completion rather than returning before the resource is actually gone. Also delete every feature view in the store instead of only the hardcoded $FEATURE_VIEW_ID — any leftover view blocks the store delete with FAILED_PRECONDITION. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
./scripts/destroy_resources.shreported success but leftml_online_storealive and billing a Bigtable node.The feature-store deletes were guarded by:
gcloud ai feature-online-storesis a beta-only command group and isn't present in a stock gcloud install. gcloud exits 2 withERROR: (gcloud.ai) Invalid choice: 'feature-online-stores', but stderr goes to/dev/null— so the guard reads "command failed" as "resource doesn't exist" and prints:No delete was ever attempted. The asymmetry is that creation goes through the Python SDK (
setup_feature_store.sh→python -m feature_store.setup→aiplatform_v1), which hits the REST API directly and works fine.Fix
fs_get/fs_deletehelpers), matching how the store is created. No dependency on thebetagcloud component.fs_getsucceeds only on HTTP 200, so a broken call can no longer masquerade as "not found".fs_deletepolls the returned long-running operation to completion instead of returning before the resource is actually gone.$FEATURE_VIEW_ID— a leftover view blocks the store delete withFAILED_PRECONDITION.Verification
bash -npasses. Dry run against the live project now discovers both resources it previously missed:Not yet run for real —
ml_online_storeis still up.🤖 Generated with Claude Code