Skip to content

feat(appkit): migrate files to modular @databricks/sdk-files - #638

Draft
MarioCadenas wants to merge 1 commit into
feat/modular-sdk-integrationfrom
feat/modular-files
Draft

MarioCadenas wants to merge 1 commit into
feat/modular-sdk-integrationfrom
feat/modular-files

Conversation

@MarioCadenas

Copy link
Copy Markdown
Collaborator

Part of the migration off @databricks/sdk-experimental onto the modular @databricks/sdk-* SDK (see #562). Base: feat/modular-sdk-integration.

Changes

feat(appkit): migrate files to modular @databricks/sdk-files

Swap the facade's files accessor to a lazily built FilesClient
(sdk-files 0.52.0, accepts sdk-core/auth/options 0.51.0).

  • list/download/createDirectory/delete use listDirectoryContentsIter,
    downloadFile, createDirectory, deleteFile; results are mapped back to
    the legacy snake_case / header-keyed shapes.
  • metadata uses a raw HEAD via request(): the generated getFileMetadata
    parses the empty HEAD body and drops the metadata headers.
  • Modular ApiError (httpStatusCode) is converted to the wrapper ApiError
    so exists() and the plugin's 4xx mapping keep working.
  • DirectoryEntry / DownloadResponse are now AppKit-owned types with the
    same shape.

Draft: implemented by an agent; needs review and a deployed SP + OBO check before it's marked ready.

This pull request and its description were written by Isaac.

Swap the facade's files accessor to a lazily built FilesClient
(sdk-files 0.52.0, accepts sdk-core/auth/options 0.51.0).

- list/download/createDirectory/delete use listDirectoryContentsIter,
  downloadFile, createDirectory, deleteFile; results are mapped back to
  the legacy snake_case / header-keyed shapes.
- metadata uses a raw HEAD via request(): the generated getFileMetadata
  parses the empty HEAD body and drops the metadata headers.
- Modular ApiError (httpStatusCode) is converted to the wrapper ApiError
  so exists() and the plugin's 4xx mapping keep working.
- DirectoryEntry / DownloadResponse are now AppKit-owned types with the
  same shape.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant