Add app_spaces as a DABs resource type (direct mode only)#4982
Add app_spaces as a DABs resource type (direct mode only)#4982bernardo-rodriguez wants to merge 5 commits intodatabricks:mainfrom
Conversation
Adds support for declaring Databricks App Spaces in bundle YAML via the `app_spaces` resource type. Spaces are containers for apps that provide shared resources, OAuth scopes, and a service principal. Implements direct mode CRUD with async operation waiting, a merge mutator for the space resources array, run_as validation, and test server handlers for the fake workspace. Co-authored-by: Isaac
Approval status: pending
|
The Spaces API rejects wildcard update masks. Use the explicit list of updatable fields: description, resources, user_api_scopes, usage_policy_id. Co-authored-by: Isaac
andrewnester
left a comment
There was a problem hiding this comment.
Could you please add acceptance test for the new resource, see for example
https://github.com/databricks/cli/tree/main/acceptance/bundle/resources/apps/update
| if err != nil { | ||
| return "", nil, err | ||
| } | ||
| space, err := waiter.Wait(ctx) |
There was a problem hiding this comment.
There's a separate WaitAfterCreate / Update method to wait fo this resources to be created
- Add nolint comment for Id field collision between BaseResource and apps.Space (same pattern as App resource) - Regenerate annotations.yml and jsonschema.json via make schema - Add acceptance tests: basic (with nested resources), recreate (name immutability), update (create/update/rename/destroy lifecycle) Co-authored-by: Isaac
Previous golden files were generated with Python 3.6 which doesn't support f-string self-documenting expressions used in update_file.py, causing bogus SyntaxError output that would fail in CI. Co-authored-by: Isaac
Previously DoCreate and DoUpdate blocked on waiter.Wait, preventing the direct engine from parallelizing operations across resources. Move the wait into dedicated WaitAfterCreate/WaitAfterUpdate methods that poll GetSpace until the space reaches SPACE_ACTIVE state. Addresses review feedback from @andrewnester. Co-authored-by: Isaac
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Changes
Adds support for declaring Databricks App Spaces in bundle YAML via the
app_spacesresource type. Spaces are containers for apps that provide shared resources, OAuth scopes, and a service principal.Implements direct mode CRUD with async operation waiting, a merge mutator for the space resources array, run_as validation, and test server handlers for the fake workspace.
Why
App spaces are are in private preview, we want to add support for the developer ecosystem.
Tests
Tested with local CLI build.
Test databricks.yml file:
Commands:
New app space:
New App: