Uh oh!
There was an error while loading. Please reload this page.
Switch to use GET workspaces-files/{name} instead of workspace/export for state files - #2423
Conversation
| // We don't use the same API for read because it doesn't correct get the file content for notebooks and returns | ||
| // "File Not Found" error instead. | ||
| func StateFiler(b *bundle.Bundle) (filer.Filer, error) { | ||
| return filer.NewWorkspaceFilesClient(b.WorkspaceClient(), b.Config.Workspace.StatePath) |
There was a problem hiding this comment.
We're still using NewWorkspaceFilesClient directly in other places, why? Cannot we switch to this new filer everywhere? (any maybe merge the implementation instead of doing an add-on).
There was a problem hiding this comment.
Yes, we still use WorkspaceFiles filer everywhere else. We don't use the same API for read in other places and fully replacing existing Filer because it doesn't correct get the file content for notebooks and returns "File Not Found" error instead.
shreyas-goenka
left a comment
There was a problem hiding this comment.
Code looks good to me, could you add an acceptance test for this? Record the API requests and assert that the GET workspaces-files/{name} is indeed called for state files.
CLI: * Upgrade Go SDK to 0.59.0 ([#2425](#2425)). Bundles: * Added a warning when `config` section is used in apps ([#2416](#2416)). * Switch to use GET workspaces-files/{name} instead of workspace/export for state files to avoid 10MB limit ([#2423](#2423)). * Use schema field for pipeline in builtin template ([#2347](#2347)). * Add warning when variable interpolation is used for auth fields ([#2399](#2399)). * Add warning when include is used in config files other than databricks.yml ([#2389](#2389)). * Add support for schemas in deployment bind/unbind commands ([#2406](#2406)). * Do not modify/create .gitignore in bundle root ([#2429](#2429)). * Raise an error when there are multiple local libraries with the same basename used ([#2382](#2382)). * Upgrade TF provider to 1.68.0 ([#2426](#2426)). API Changes: * Changed `databricks experiments log-inputs` command with new required argument order. * Added `databricks genie get-space` command. * Added `databricks providers list-provider-share-assets` command. * Changed `databricks shares update-permissions` command return type to become non-empty. OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
CLI: * Upgrade Go SDK to 0.59.0 ([#2425](#2425)). Bundles: * Added a warning when `config` section is used in apps ([#2416](#2416)). * Switch to use GET workspaces-files/{name} instead of workspace/export for state files to avoid 10MB limit ([#2423](#2423)). * Use schema field for pipeline in builtin template ([#2347](#2347)). * Add warning when variable interpolation is used for auth fields ([#2399](#2399)). * Add warning when include is used in config files other than databricks.yml ([#2389](#2389)). * Add support for schemas in deployment bind/unbind commands ([#2406](#2406)). * Do not modify/create .gitignore in bundle root ([#2429](#2429)). * Raise an error when there are multiple local libraries with the same basename used ([#2382](#2382)). * Upgrade TF provider to 1.68.0 ([#2426](#2426)). API Changes: * Changed `databricks experiments log-inputs` command with new required argument order. * Added `databricks genie get-space` command. * Added `databricks providers list-provider-share-assets` command. * Changed `databricks shares update-permissions` command return type to become non-empty. OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
… for state files (#2423) ## Changes Switch to use GET workspaces-files/{name} instead of workspace/export for state files. ## Why `/api/2.0./workspaces-files/{name}` has a higher limit which allows to export state files larger than 10 MBs (which is the current limit for `workspace/export`). We don't use the same API for read in other places and fully replacing existing Filer because it doesn't correct get the file content for notebooks and returns "File Not Found" error instead. ## Tests All existing tests pass
CLI: * Upgrade Go SDK to 0.59.0 ([#2425](#2425)). Bundles: * Added a warning when `config` section is used in apps ([#2416](#2416)). * Switch to use GET workspaces-files/{name} instead of workspace/export for state files to avoid 10MB limit ([#2423](#2423)). * Use schema field for pipeline in builtin template ([#2347](#2347)). * Add warning when variable interpolation is used for auth fields ([#2399](#2399)). * Add warning when include is used in config files other than databricks.yml ([#2389](#2389)). * Add support for schemas in deployment bind/unbind commands ([#2406](#2406)). * Do not modify/create .gitignore in bundle root ([#2429](#2429)). * Raise an error when there are multiple local libraries with the same basename used ([#2382](#2382)). * Upgrade TF provider to 1.68.0 ([#2426](#2426)). API Changes: * Changed `databricks experiments log-inputs` command with new required argument order. * Added `databricks genie get-space` command. * Added `databricks providers list-provider-share-assets` command. * Changed `databricks shares update-permissions` command return type to become non-empty. OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
Changes
Switch to use GET workspaces-files/{name} instead of workspace/export for state files.
Why
/api/2.0./workspaces-files/{name}has a higher limit which allows to export state files larger than 10 MBs (which is the current limit forworkspace/export). We don't use the same API for read in other places and fully replacing existing Filer because it doesn't correct get the file content for notebooks and returns "File Not Found" error instead.Tests
All existing tests pass