Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/cli/dataset_rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <table> — delete a pushed dataset (its table + files)")
Expand Down
16 changes: 7 additions & 9 deletions internal/push/teardown.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/submit/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}

Expand Down
Loading