test: Add app_spaces as a DABs resource type (direct mode only) #5271
Open
andrewnester wants to merge 12 commits into
Open
test: Add app_spaces as a DABs resource type (direct mode only) #5271andrewnester wants to merge 12 commits into
andrewnester wants to merge 12 commits into
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
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
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
…oUpdate Co-authored-by: Isaac
Co-authored-by: Isaac
Contributor
Approval status: pending
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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