Skip to content

fix(storage): port the v2 vector and analytics bucket fixes - #2066

Merged
spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-2829-storage-port-v2-vector-analytics-fixes
Nov 16, 2026
Merged

spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-2829-storage-port-v2-vector-analytics-fixes

Conversation

@spydon

@spydon spydon commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Ports three v2 storage fixes to v3 (SDK-2829).

  • VectorIndexScope.query requires topK; the API rejected queries without it.
  • MetadataConfiguration can be built by field name and defaults to None; create_index omits an empty configuration.
  • parse_api_error reads the analytics bucket error body {"error": {"message", "type"}} instead of falling back to InternalError.

v2 references: #1946, #1921, #1894.

Make topK required in VectorIndexScope.query, let MetadataConfiguration be
built by field name with a default of None and omit it from CreateIndex when
empty, and parse the analytics bucket error body in parse_api_error.
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 48462e30-6908-4b93-847f-a8eb1290b7c8
Commits

Reviewing files that changed from the base of the PR and between 0ba628a and 1f5cfb3.

Files selected for processing: 3

  • src/storage/src/storage3/exceptions.py
  • src/storage/src/storage3/types.py
  • src/storage/tests/test_exceptions.py

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Analytics bucket errors now display their message and error type, while retaining the HTTP status.
    • Metadata configuration can be provided using field names or aliases, and may be omitted or left empty when creating an index.
  • Changes
    • Vector queries now require topK; calls that omit it must be updated.
  • Bug Fixes
    • Storage API errors continue to use the error code when available and fall back to the error message when it is not.

The error parser now accepts analytics error bodies with nested message and type fields, while retaining support for storage error bodies. Metadata configuration accepts either field names or aliases, and index creation omits unset or empty configurations. Vector index queries now require topK.

Possibly related PRs

Change: Bug fix

Merge Risk: Minimal · previous review 0ba62

This change ports three storage fixes: analytics error parsing, metadata configuration handling, and a required topK for vector queries. Making topK required is an intentional API change, and callers that omit it will now get a TypeError. No merge-blocking risk was found.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50077d23-1f3c-45d9-9643-d769498b0e22
Commits

Reviewing files that changed from the base of the PR and between 439735e and 0ba628a.

Files selected for processing: 7

  • sdk-compliance.yaml
  • src/storage/src/storage3/exceptions.py
  • src/storage/src/storage3/types.py
  • src/storage/src/storage3/vectors.py
  • src/storage/tests/test_analytics.py
  • src/storage/tests/test_exceptions.py
  • src/storage/tests/test_vector_index.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.

@spydon
spydon merged commit 4efbdbc into main Nov 16, 2026
26 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-2829-storage-port-v2-vector-analytics-fixes branch November 16, 2026 11:55
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