diff --git a/internal/cli/dataset_rm.go b/internal/cli/dataset_rm.go index 761750c..60d009a 100644 --- a/internal/cli/dataset_rm.go +++ b/internal/cli/dataset_rm.go @@ -46,9 +46,8 @@ func newDatasetRmCmd() *cobra.Command { for a table: the MySQL table in ` + push.IngestionDatabase + ` and the dataset's directories on the shared PVC. Destructive and not undoable. -NOTE: the central tracebloc backend catalog entry is NOT removed — the -CLI has no direct line to that backend. Full cleanup of a successfully -ingested dataset needs the server-side delete path (tracebloc/cli#39). +The dataset's catalog metadata on the tracebloc backend is removed +automatically after deletion — no manual step required. Exit codes: 0 artifacts removed (or --dry-run, or the user declined) @@ -195,5 +194,6 @@ undone — re-pushing the data is the only way back.`) } p.Successf("Deleted %s.%s and %d PVC path(s).", plan.Database, plan.Table, len(res.RemovedPaths)) + p.Infof("The dataset's catalog metadata will be removed automatically — no further action needed.") return nil } diff --git a/internal/cli/root.go b/internal/cli/root.go index 311c826..69e1438 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -34,7 +34,7 @@ type BuildInfo struct { func NewRootCmd(info BuildInfo) *cobra.Command { root := &cobra.Command{ Use: "tracebloc", - Short: "tracebloc — declarative data ingestion for your cluster", + Short: "tracebloc — interactive data ingestion for your cluster", Long: `tracebloc is the customer-facing CLI for the tracebloc declarative ingestion path. It wraps the same POST /internal/submit-ingestion-run protocol the tracebloc/ingestor Helm chart uses, so any cluster running @@ -90,7 +90,7 @@ what's planned next.`, return cmd.Help() // an arg that wasn't a known subcommand } p := printerFor(cmd) - p.Banner("tracebloc", "declarative data ingestion for your cluster") + p.Banner("tracebloc", "interactive data ingestion for your cluster") p.Section("Get started") p.Infof("tracebloc dataset push ./data — stage + ingest a dataset (guided if you omit flags)") p.Infof("tracebloc dataset rm — delete a pushed dataset (its table + files)") diff --git a/internal/push/teardown.go b/internal/push/teardown.go index 6f3a9c9..5d30ccf 100644 --- a/internal/push/teardown.go +++ b/internal/push/teardown.go @@ -23,10 +23,9 @@ const IngestionDatabase = "training_test_datasets" // // It deliberately does NOT include the central tracebloc backend // catalog entry: the CLI has no direct line to that backend (only the -// in-cluster ingestor does, with its own creds), so removing it is the -// cross-repo follow-up (tracebloc/cli#39). A successfully-ingested -// dataset torn down this way leaves a stale catalog entry until #39 -// lands. +// in-cluster ingestor does, with its own creds). The backend removes +// the dataset's catalog metadata automatically once these in-cluster +// artifacts are gone, so there's no CLI-side catalog teardown to do. type TeardownPlan struct { Database string // MySQL schema (IngestionDatabase) Table string // table name — MUST have passed ValidateTableName @@ -59,11 +58,10 @@ type TeardownResult struct { // - rm -rf the PVC dirs by exec-ing inside the jobs-manager pod, // which mounts the shared PVC at SharedRoot. // -// DESIGN NOTE (under review): this exec-into-existing-pods approach is -// the "CLI-direct teardown". The alternative under discussion is a -// server-side jobs-manager delete endpoint that could also remove the -// backend catalog entry (#39) in one place. It assumes (a) a pod whose -// name contains "mysql" exposes $MYSQL_ROOT_PASSWORD, and (b) the +// DESIGN NOTE: this exec-into-existing-pods approach is the +// "CLI-direct teardown" (the alternative considered was a server-side +// jobs-manager delete endpoint). It assumes (a) a pod whose name +// contains "mysql" exposes $MYSQL_ROOT_PASSWORD, and (b) the // jobs-manager pod mounts the shared PVC at SharedRoot — both true for // the current parent chart, but worth confirming before this ships. func Teardown(ctx context.Context, cs kubernetes.Interface, cfg *rest.Config, namespace string, plan TeardownPlan) (TeardownResult, error) { diff --git a/internal/submit/summary.go b/internal/submit/summary.go index 32d2adb..2be7772 100644 --- a/internal/submit/summary.go +++ b/internal/submit/summary.go @@ -358,7 +358,7 @@ func RenderSummary(p *ui.Printer, s *Summary) { p.Field("success rate", fmt.Sprintf("%.1f%%", s.SuccessRate())) p.Section("What's next") - p.Infof("View it in the dashboard: https://ai.tracebloc.io") + p.Infof("View it in the dashboard: https://ai.tracebloc.io/metadata") p.Hintf("The table is staged and ready for training jobs.") }