Skip to content

Add enum for volume grant privileges - #3395

Merged
kanterov merged 4 commits into
mainfrom
volume-grant-privilege
Aug 14, 2025
Merged

Add enum for volume grant privileges#3395
kanterov merged 4 commits into
mainfrom
volume-grant-privilege

Conversation

@kanterov

@kanterovkanterov commented Aug 12, 2025

Copy link
Copy Markdown
Collaborator

Changes

Add an enum for volume grant privileges.

Possible values are:

  • ALL_PRIVILEGES
  • APPLY_TAG (missing in Terraform docs but supported)
  • MANAGE
  • READ_VOLUME
  • WRITE_VOLUME

It follows documented privileges in Terraform documentation: https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/grants#volume-grants

I will add APPLY_TAG to Terraform as a follow-up.

Why

Using enums gives better typing in JSON schema and allows generating enums in Python code

Tests

By inspecting the resulting JSON schema

@kanterov
kanterov marked this pull request as ready for review August 12, 2025 08:10
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 12, 2025

Copy link
Copy Markdown
Collaborator

Run: 16958772408

Env✅‌pass🔄‌flaky🙈‌skip
🔄‌aws linux3053469
✅‌aws windows309468
🔄‌aws-ucws linux40410369
🔄‌aws-ucws windows40510368
🔄‌azure linux3053468
🔄‌azure windows3045467
🔄‌azure-ucws linux4079366
🔄‌azure-ucws windows4098365
✅‌gcp linux307470
✅‌gcp windows308469
19 failing tests:
Test Nameaws linuxaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windows
TestAccept🔄‌flaky✅‌pass✅‌pass🔄‌flaky✅‌pass✅‌pass✅‌pass
TestAccept/bundle/deploy/dashboard/detect-change✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky🔄‌flaky
TestAccept/bundle/deploy/dashboard/generate_inplace✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky🔄‌flaky
TestAccept/bundle/deploy/dashboard/nested-folders✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky🔄‌flaky
TestAccept/bundle/deploy/dashboard/simple✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky🔄‌flaky
TestAccept/bundle/deploy/dashboard/simple_outside_bundle_root✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky🔄‌flaky
TestAccept/bundle/deploy/dashboard/simple_syncroot✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky🔄‌flaky
TestAccept/bundle/deploy/files/no-snapshot-sync🔄‌flaky✅‌pass✅‌pass✅‌pass✅‌pass✅‌pass✅‌pass
TestAccept/bundle/deploy/files/no-snapshot-sync/DATABRICKS_CLI_DEPLOYMENT=direct-exp🔄‌flaky✅‌pass✅‌pass✅‌pass✅‌pass✅‌pass✅‌pass
TestAccept/bundle/deployment/bind/dashboard✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky✅‌pass
TestAccept/bundle/deployment/bind/dashboard/recreation✅‌pass🔄‌flaky🔄‌flaky✅‌pass🔄‌flaky🔄‌flaky🔄‌flaky
TestAccept/bundle/templates/default-python/combinations/classic✅‌pass✅‌pass✅‌pass🔄‌flaky✅‌pass✅‌pass✅‌pass
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_CLI_DEPLOYMENT=terraform/DLT=yes/NBOOK=yes/PY=yes✅‌pass✅‌pass✅‌pass🔄‌flaky✅‌pass✅‌pass✅‌pass
TestAccept/bundle/templates/default-python/combinations/serverless✅‌pass✅‌pass✅‌pass✅‌pass🔄‌flaky✅‌pass✅‌pass
TestAccept/bundle/templates/default-python/integration_classic✅‌pass✅‌pass✅‌pass✅‌pass🔄‌flaky✅‌pass✅‌pass
TestAccept/bundle/templates/default-python/integration_classic/DATABRICKS_CLI_DEPLOYMENT=direct-exp/UV_PYTHON=3.10✅‌pass✅‌pass✅‌pass✅‌pass🔄‌flaky✅‌pass✅‌pass
TestCreateJob🙈‌skip🙈‌skip🙈‌skip✅‌pass🔄‌flaky✅‌pass✅‌pass
TestDashboardAssumptions_WorkspaceImport✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass🔄‌flaky🔄‌flaky
TestFetchRepositoryInfoAPI_FromRepo✅‌pass🔄‌flaky🔄‌flaky✅‌pass✅‌pass✅‌pass✅‌pass


type VolumeGrantPrivilege string

const (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add the Values function for this type? That'll enable automatic enum validation:

func (ArtifactType) Values() []ArtifactType {

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL. Thanks, I will do

@kanterov
kanterovforce-pushed the volume-grant-privilege branch from 9dd4ed7 to a909b3dCompareAugust 14, 2025 07:27
@kanterov
kanterov enabled auto-merge August 14, 2025 07:36
@kanterov
kanterov added this pull request to the merge queueAug 14, 2025
Merged via the queue into main with commit c8ab19dAug 14, 2025
13 checks passed
@kanterov
kanterov deleted the volume-grant-privilege branch August 14, 2025 08:01
deco-sdk-taggingBot added a commit that referenced this pull request Aug 14, 2025
## Release v0.264.1
### Notable Changes
* Fixed regression in databricks auth login for OAuth redirect URL ([#3417](#3417))
### Bundles
* Add supported enum values to JSON schema for volume grant privileges ([#3395](#3395))
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
Add an enum for volume grant privileges.
Possible values are:
- `ALL_PRIVILEGES`
- `APPLY_TAG` (missing in Terraform docs but supported)
- `MANAGE`
- `READ_VOLUME`
- `WRITE_VOLUME`
It follows documented privileges in Terraform documentation:
https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/grants#volume-grants
I will add `APPLY_TAG` to Terraform as a follow-up.
## Why
Using enums gives better typing in JSON schema and allows generating
enums in Python code
## Tests
By inspecting the resulting JSON schema
denik pushed a commit that referenced this pull request May 20, 2026
## Release v0.264.1
### Notable Changes
* Fixed regression in databricks auth login for OAuth redirect URL ([#3417](#3417))
### Bundles
* Add supported enum values to JSON schema for volume grant privileges ([#3395](#3395))
Sign up for freeto 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.

4 participants

@kanterov@eng-dev-ecosystem-bot@pietern@shreyas-goenka