Skip to content

test: Add app_spaces as a DABs resource type (direct mode only) #5271

Open
andrewnester wants to merge 12 commits into
mainfrom
feat/app-spaces
Open

test: Add app_spaces as a DABs resource type (direct mode only) #5271
andrewnester wants to merge 12 commits into
mainfrom
feat/app-spaces

Conversation

@andrewnester
Copy link
Copy Markdown
Contributor

Changes

This is a test branch / PR for #4982

Why

It's not possible to run the tests on PRs created from forks hence this workaround

Tests

bernardo-rodriguez and others added 12 commits April 22, 2026 08:11
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
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
- 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
- Scope govet lint directive to a specific linter (Jannik)
- Remove fabricated InitializeURL; spaces have no stable UI URL yet (Jannik)
- Opt out of terraform via ValidateDirectOnlyResources (Jannik)
- Replace panic in merge_app_spaces with user-facing diagnostic (Denik)
- Add permissions support for app_spaces using the generic
  /api/2.0/permissions/app-spaces/{name} endpoint
- Use print_requests.py helper in acceptance scripts (Denik)
- Add invariant, drift (via invariant no_drift), and bind/unbind
  acceptance tests (Jannik)
- Exclude app_space from migrate invariant test since the resource is
  direct-only (same pattern as catalog, external_location)
- Regenerate annotations, jsonschema, enum_fields, required_fields
- Fix TestConvertLifecycleForAllResources and state_load tests to
  account for the new resource
- Add NEXT_CHANGELOG.md entry

Note: resources.generated.yml needs make generate-direct to populate
output-only fields (create_time, service_principal_*, status, etc.)
from the OpenAPI spec. Until then, invariant no_drift for app_space
will fail locally; CI pipelines with VPN access will keep it in sync.

Co-authored-by: Isaac
- NEXT_CHANGELOG.md: remove bullets for #4672 and #4941 that were
  accidentally re-added during a stash/pop across a v0.297 release cut
- acceptance/bundle/invariant/{continue_293,migrate,no_drift}/out.test.toml:
  restore job_with_depends_on.yml.tmpl that got dropped during a
  merge-conflict resolution on an earlier rebase

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

30 files changed
Suggested: @denik
Also eligible: @shreyas-goenka, @pietern, @janniklasrose, @anton-107, @lennartkats-db

/bundle/ - needs approval

25 files changed
Suggested: @denik
Also eligible: @shreyas-goenka, @pietern, @janniklasrose, @anton-107, @lennartkats-db

General files (require maintainer)

5 files changed
Based on git history:

  • @denik -- recent work in bundle/direct/dresources/, libs/testserver/, bundle/config/mutator/resourcemutator/

Any maintainer (@anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

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.

2 participants