Skip to content

fix(storage): preserve vector index creation time - #1701

Merged
o-santi merged 2 commits into
supabase:mainfrom
hsusul:fix/storage-vector-index-creation-time
Oct 7, 2026
Merged

o-santi merged 2 commits into
supabase:mainfrom
hsusul:fix/storage-vector-index-creation-time

Conversation

@hsusul

@hsusul hsusul commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1700. Parse the Storage GetIndex response's creationTime into VectorIndex.creation_time through the shared model used by both public clients.

Problem and solution

The server supplies Unix seconds, but the model silently ignored the camelCase field. Add a validation-only alias accepting both creationTime and the existing creation_time; serialization is unchanged. No sync/async generation changes are needed.

Tests

A MockTransport regression exercises public sync and async get_index(). Both fail on unchanged upstream 837cf3a with None instead of the expected UTC datetime, and pass with the fix. Four compatibility cases cover missing/null values, snake-case construction and existing serialization.

Validation

Run from src/storage, with PYTHONPATH pointing at this worktree's src/storage/src and a pre-existing dependency environment (verified source import; fresh uv setup was blocked by PyPI DNS):

  • python -m pytest -q tests/test_vector_index.py: 6 passed.
  • python -m pytest -q tests/test_vector_index.py tests/test_client.py tests/test_exceptions.py tests/test_utils.py tests/_async/test_bucket.py tests/_sync/test_bucket.py: 76 passed; unchanged upstream service-free baseline: 70 passed.
  • python -m mypy src/storage3 tests: clean, 34 files.
  • Ruff 0.14.0 check src/storage and format --check src/storage from root: clean.
  • git diff --check and staged equivalent: clean.

Full package pytest -q: 76 passed, 50 setup errors (httpx.ConnectError, absent local service). With the source fix removed: 74 passed, the two new regressions failed, and the same 50 service errors. Live integration is not validated: it needs Docker/Supabase CLI, and docker ps returns HTTP 500. uv build --offline --package storage3 is unavailable because the build backend is uncached; network dependency resolution fails DNS.

Compatibility and scope

Storage only; one shared field plus focused tests. Missing/null timestamps remain None, existing snake-case construction and dump keys remain supported. No documentation or generated-code changes are needed for this response parsing correction.

Related work

No matching report/fix found in open/closed issues/PRs, discussions, relevant branches or field history. #1649 concerns errors from resource lookups, not metadata in successful responses.

cc @olirice @silentworks

@hsusul
hsusul requested review from a team and o-santi as code owners October 4, 2026 02:10
the correct name is creationTime, there is no need to add an invalid alternative
@o-santi
o-santi merged commit c5e345d into supabase:main Oct 7, 2026
42 checks passed
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.

storage3 get_index() discards vector index creationTime

2 participants