Skip to content

direct: make vector_search_indexes RemapState a dumb copy via a remote type - #6811

Draft
denik wants to merge 2 commits into
mainfrom
denik/vsi-remote-reshape-prep
Draft

denik wants to merge 2 commits into
mainfrom
denik/vsi-remote-reshape-prep

Conversation

@denik

@denik denik commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Prep toward replacing hand-written RemapState with the automatic copier.

vector_search_indexes' RemapState reshaped delta_sync_index_spec from *DeltaSyncVectorIndexSpecResponse (on the raw vectorsearch.VectorIndex the remote embedded) to the *DeltaSyncVectorIndexSpecRequest the state uses — the copier can't convert between those two SDK struct types (Response carries the output-only pipeline_id).

Fix: the remote embeds CreateVectorIndexRequest (so delta_sync_index_spec is *Request and the copier can copy it whole) and additionally carries the output-only VectorIndex fields — creator, endpoint_id, status — as explicit fields so remote information is not discarded. A new shared newVectorSearchIndexRemote constructor (used by DoRead, DoCreate, WaitAfterCreate) maps the raw index in, doing the Response→Request spec mapping. RemapState is now a plain copy of the embedded state struct + endpoint_uuid.

Refschema keeps creator/endpoint_id/status.* as REMOTE and unifies delta_sync_index_spec to *Request for INPUT/STATE/REMOTE. The recreate/with_endpoint golden is unchanged vs main (behavior-preserving).

Known residual: delta_sync_index_spec.pipeline_id is the one Response-only field not retained — it lives only on *Response, but the remote's spec must be *Request for the whole-field copier. Retaining it under delta_sync_index_spec would require a nested subset-copy in the copier (structcopy), which is out of scope for this prep.

Verified: go build, go test ./bundle/direct/dresources/ (round-trip + type tests), TestAccept/bundle/resources/vector_search_indexes (all variants), and ./task generate-check all pass.

This pull request and its description were written by Isaac.

@github-actions github-actions Bot added the DABs DABs related issues label Sep 23, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 8a99fb2

Run: 35869999180

Env 🔄​flaky ✅​pass 🙈​skip Time
🔄​ aws linux 5 271 16 11:23
🔄​ aws windows 1 277 14 6:37
✅​ azure linux 275 16 8:00
✅​ azure windows 277 14 6:10
🔄​ gcp linux 1 275 16 8:10
✅​ gcp windows 278 14 7:15
7 interesting tests: 7 flaky
Test Name aws linux aws windows gcp linux
🔄​ TestFsCpDirToDirFileNotOverwritten 🔄​f ✅​p ✅​p
🔄​ TestFsCpDirToDirFileNotOverwritten/local_to_local 🔄​f ✅​p ✅​p
🔄​ TestFsCpFileToFileFileNotOverwritten/dbfs_to_dbfs 🔄​f ✅​p ✅​p
🔄​ TestFsCpFileToFileFileNotOverwritten/dbfs_to_local 🔄​f ✅​p ✅​p
🔄​ TestFsCpFileToFileFileNotOverwritten/local_to_dbfs 🔄​f ✅​p ✅​p
🔄​ TestSyncIncrementalFileSync ✅​p 🔄​f ✅​p
🔄​ TestSyncNestedFolderDoesntFailOnNonEmptyDirectory ✅​p ✅​p 🔄​f
Top 7 slowest tests (at least 2 minutes):
duration env testname
4:03 gcp windows TestAccept
3:40 aws linux TestFilerWorkspaceFilesExtensionsRead
3:31 aws windows TestAccept
3:16 azure windows TestAccept
2:48 aws linux TestFilerWorkspaceFilesExtensionsDelete
2:28 aws linux TestImportDirDoesNotOverwrite
2:27 azure linux TestFilerWorkspaceFilesExtensionsReadDir

denik and others added 2 commits September 23, 2026 15:49
…e type

VectorSearchIndexRemote embedded the raw vectorsearch.VectorIndex, whose
delta_sync_index_spec is *DeltaSyncVectorIndexSpecResponse (with the output-only
pipeline_id), while the state uses *DeltaSyncVectorIndexSpecRequest — so RemapState
had to reshape it and the auto-copier could not.

Mirror the state's shape instead: embed CreateVectorIndexRequest plus endpoint_uuid,
and map the raw index into it in a new shared newVectorSearchIndexRemote constructor
(used by DoRead, DoCreate, WaitAfterCreate). RemapState is now a plain field copy.

The remote no longer carries output-only VectorIndex fields (status, creator,
pipeline_id, endpoint_id); they were never compared for drift. Refschema and the
recreate/with_endpoint golden regenerated to drop them from remote_state.

Co-authored-by: Isaac <[email protected]>
Address review: the previous revision embedded only CreateVectorIndexRequest and
dropped every Response-only field. Carry creator, endpoint_id, and status through
as explicit remote fields so remote information is not discarded (refschema keeps
them as REMOTE). delta_sync_index_spec stays *Request so the copier can copy it.

The one field still not retained is delta_sync_index_spec.pipeline_id: it lives only
on *DeltaSyncVectorIndexSpecResponse, and the remote's spec must be *Request for the
whole-field copier to handle it. Retaining it there needs a nested subset-copy in the
copier (structcopy), out of scope for this prep.

Co-authored-by: Isaac <[email protected]>
@denik
denik force-pushed the denik/vsi-remote-reshape-prep branch from 675ea2a to 8a99fb2 Compare September 23, 2026 13:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants