databricks / terraform-provider-databricks

Databricks Terraform Provider
https://registry.terraform.io/providers/databricks/databricks/latest
Other
456 stars 393 forks source link

[Feature] Update databricks_permissions resource to support vector-search-endpoints #4209

Closed zgcalebp closed 1 week ago

zgcalebp commented 1 week ago

Changes

Databricks permissions API has been updated to support vector-search-endpoints. This corresponding change to the permissions_definitions would enable the use of the databricks_permissions resource to manage ACLs for Vector Search Endpoints leveraging the existing APIs under the hood.

Example CLI call confirming support:

databricks permissions get vector-search-endpoints {endpoint-id} --debug
18:56:25  INFO start pid=77800 version=0.224.1 args="databricks, permissions, get, vector-search-endpoints, {endpoint-id}, --debug"
18:56:25  INFO Ignoring pat auth, because databricks-cli is preferred pid=77800 sdk=true
18:56:25  INFO Ignoring basic auth, because databricks-cli is preferred pid=77800 sdk=true
18:56:25  INFO Ignoring oauth-m2m auth, because databricks-cli is preferred pid=77800 sdk=true
18:56:25  INFO Refreshed OAuth token from Databricks CLI, expires on 2024-11-11 19:00:53.515729 -0500 EST pid=77800 sdk=true
18:56:25 DEBUG Using Databricks CLI authentication with Databricks OAuth tokens pid=77800 sdk=true
18:56:25  INFO Refreshed OAuth token from Databricks CLI, expires on 2024-11-11 19:00:53.515729 -0500 EST pid=77800 sdk=true
18:56:26 DEBUG GET /api/2.0/permissions/vector-search-endpoints/{endpoint-id}
< HTTP/2.0 200 OK
< {
<   "access_control_list": [
....

Tests

alexott commented 1 week ago

And please do make fmt

zgcalebp commented 1 week ago

Sorry for the typos on that last commit 😅 . Working through getting these integration tests to run locally now. Thanks for the quick review too!

zgcalebp commented 1 week ago

Was able to validate the MR updates locally, should be good to merge upon review and Git action completions. Let me know if any further input is needed!

zgcalebp commented 1 week ago

Thanks @alexott for the test update. Should've more strongly considered the provisioning time for a permissions test.

alexott commented 1 week ago

It's very specific for vector search endpoint - I realised that test was running too long, and made the update. I'll merge as soon as tests are passing

thank you for your contribution!

zgcalebp commented 1 week ago

Is there some way to view the output of the integration tests? Surprised they aren't passing, happy to update to fix.

alexott commented 1 week ago

@zgcalebp The tests were failing because I ran the original patch with full-blown permissions test, but VS requires UC, and the test name wasn't adjusted for running only on UC-enabled workspaces

github-actions[bot] commented 1 week ago

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger: go/deco-tests-run/terraform

Inputs:

Checks will be approved automatically on success.

eng-dev-ecosystem-bot commented 1 week ago

Test Details: go/deco-tests/11813686757