Reworks the `fs` command's UC Volumes filer (also used by bundle library
uploads) to run on the new `sdk-go/files/v2` client instead of hand-rolled
Files API calls plus a separate CLI-side multipart upload engine.
`files/v2` is not published to the Go proxy yet, so it is vendored under
`libs/tmp/` along with the two unpublished sibling modules it needs (`auth`
and `options`); the published `sdk-go/core` module stays a normal dependency.
The only edits to the vendored copy are the import-path rewrite and two fixes
to the generated client (see below). `libs/tmp/README.md` records the copy and
the swap-and-delete steps for when the module is published.
The filer now delegates upload, download, listing, mkdir, delete, and stat to
`files/v2`, which brings its own multipart/resumable engine. The CLI's own
`libs/upload` engine is therefore removed. `DATABRICKS_EXPERIMENTAL_MULTIPART_UPLOAD`
still gates whether large Volumes uploads are split into parts, but now selects
multipart-vs-single-shot within files/v2 rather than a separate engine.
This pull request and its description were written by Isaac.
Co-authored-by: Isaac
What
The
fscommand's UC Volumes filer now runs on the newsdk-go/files/v2client instead of hand-written Files API calls. This filer is shared, so bundle library uploads to Volumes go through the same path.files/v2is not published to the Databricks Go proxy yet, so it is vendored underlibs/tmp/together with the two unpublished sibling modules it needs (authandoptions). The already-publishedsdk-go/coremodule stays a normal dependency and is not copied.libs/tmp/README.mdrecords where the copy came from and how to remove it once the module is published (rewrite the import prefix back and delete the directory).files/v2ships its own multipart/resumable upload engine, so the CLI's separatelibs/uploadengine is removed. TheDATABRICKS_EXPERIMENTAL_MULTIPART_UPLOADflag still gates whether large Volumes uploads are split into parts; it now selects multipart-vs-single-shot withinfiles/v2rather than switching engines. Default behavior (single-shot PUT) is unchanged.Why
Groundwork for the CLI to consume
sdk-go/files/v2as a real dependency once it is published. Vendoring lets us build and dogfood the client, and its own upload engine replaces the CLI-side one so there is a single implementation to maintain.Notable in the diff
libs/tmp/is a verbatim vendored copy. The only edits are the import-path rewrite and two fixes to the generated client (empty response bodies and HTTP method casing); both are upstream generator bugs and are listed inlibs/tmp/README.md. It is excluded from lint/format in.golangci.yamlso it stays byte-for-byte with upstream.libs/filer/files_client.gois rewritten onto*files.Client.NewFilesClientgains actxparameter (threaded through its callers).fsandbundle/libraries, so bundle Volumes uploads are affected..github/OWNERSretargets the removed/libs/upload/entry to/libs/tmp/.go.mod/NOTICEgainsdk-go/coreas a direct dependency.Out of scope
files/v2only backs the UC Volumes path.sdk-go/files/v2is separate work;libs/tmp/is the interim copy.This pull request and its description were written by Isaac.