Skip to content

Conversation

@austin-denoble
Copy link
Collaborator

@austin-denoble austin-denoble commented Feb 10, 2026

Problem

@bradumbaugh reported an issue with the aliasing in the pc vector upsert command. --file and --body flags are meant to be aliases, but --file is configured as required making --body unusable due to cobra error'ing when --file is not passed.

Solution

Make sure --file is not configured as a required flag to vector upsert since --body is an alias, add custom validation / error handling for the empty file/body case.

Additionally, I cleaned up a .cache folder that was incorrectly committed to source previously, along with removing the claude-code-review workflows from the repo. We've been using cursorbot generally, and I'll get this repo setup with that in a follow-up PR.

Before

./dist/pc_darwin_arm64_v8.0/pc index vector upsert --index-name test-cps --body /Users/austin/workspace/go-pinecone-consumer/dense_dim_3_x4.json
Error: required flag(s) "file" not set
Usage:
  pc index vector upsert [flags]

Examples:
  $ pc index vector upsert --index-name my-index --namespace my-namespace --body ./vectors.json
  $ pc index vector upsert --index-name my-index --namespace my-namespace --body ./vectors.jsonl
  $ cat payload.json | pc index vector upsert --index-name my-index --namespace my-namespace --body -

Flags:
  -b, --batch-size int      size of batches to upsert (default: 500) (default 500)
      --body string         alias for --file
      --file string         request body JSON or JSONL (inline, ./path.json[l], or '-' for stdin; only one argument may use stdin)
  -h, --help                help for upsert
  -n, --index-name string   name of index to upsert into
  -j, --json                output as JSON
      --namespace string    namespace to upsert into (default "__default__")

Global Flags:
  -q, --quiet              suppress output
      --timeout duration   timeout for commands, defaults to 60s (0 to disable) (default 1m0s)

###After

./dist/pc_darwin_arm64_v8.0/pc index vector upsert --index-name test-cps --body /Users/austin/workspace/go-pinecone-consumer/dense_dim_3_x4.json
[SUCCESS] Upserted 4 vectors into namespace __default__ (batch 1 of 1)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Test corrected flow by calling pc index vector upsert --index-name my-index --body my-file.json and observe no errors.


…t since --body is an alias, add custom validation / error handling for the empty file/body case
@claude
Copy link

claude bot commented Feb 10, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@austin-denoble austin-denoble merged commit 1654bb0 into main Feb 10, 2026
7 checks passed
@austin-denoble austin-denoble deleted the adenoble/fix-upsert-alias branch February 10, 2026 19:53
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.

1 participant