-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for UC Volumes to DABs #1762
base: main
Are you sure you want to change the base?
Conversation
|
||
// TODO: Are there fields in the edit API or terraform that are not in this struct? | ||
// If so call it out in the PR. | ||
*catalog.CreateVolumeRequestContent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notably OWNER
is missing from the schema here. Terraform allows managing the owner, but it's not available in the create API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do owner assignment elsewhere, can you clarify the significance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real significance for DABs. I just wanted to call this out since it's a divergence from Terraform. In fact, this is nice because it clearly guarantees that the owner of the UC volume is the deploying user. We do not allow modifying the owner of any of our UC resources.
|
||
// We don't need to display any prompts in this case. | ||
if len(dltActions) == 0 && len(schemaActions) == 0 { | ||
if len(schemaActions) == 0 && len(dltActions) == 0 && len(volumeActions) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR introduces yet again interactive flow to DABs. At this point, I think it's worth it to invest some time in adding proper end to end tests for this. I'd like to pick it up in the next ~month.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pick this next quarter as in scope for terminal UX improvements.
Nightlies passed once. Triggered another round after some minor updates. |
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Test Details: go/deco-tests/11897511217 |
} | ||
|
||
// set location of volume definition in config. | ||
bundletest.SetLocation(b, "resources.volumes.foo", []dyn.Location{{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We moved the bundletest package outside the internal
because of it's use here. Otherwise go's import system by design would not let me import bundletest
Hello! Thanks for adding this new feature -- I look forward to adopting it for many future projects. One use-case I have: create a DAB-managed UC Volume for storing checkpoints directories for various Spark structured streams. I expect to to have a bunch of code that looks like this: .option('checkpointLocation', os.path.join('/', 'Volumes', catalog, schema, 'checkpoints', 'my_structured_stream_name')) It would be nice if I could have something like this: .option('checkpointLocation', os.path.join(dbutils.wigest.get('checkpoints_volume'), 'my_structured_stream_name')) The parameters:
- name: checkpoints_volume
default: ${resources.volumes.checkpoints.mount_location} # or similar Is it possible to include a property like Thanks! |
Changes
This PR adds support for UC volumes to DABs.
Can I use a UC Volume managed by DABs in
artifact_path
?Yes, but we require the Volume to exist before being referenced in
artifact_path
. Otherwise you'll see an error that the Volume does not exist. For this case, this PR also adds a warning if we detect that the UC Volume is defined in the DAB itself, which informs the user to deploy the UC Volume in a separate deployment first before using it inartifact_path
.We cannot create the UC Volume and then upload the artifacts to it in the same
bundle deploy
becausebundle deploy
always uploads the artifacts toartifact_path
before materializing any resources defined in the bundle. Supporting this in a single deployment requires us to migrate away from our dependency on the Databricks Terraform provider to manage the CRUD lifecycle of DABs resources.Why do we not support preset.name_prefix for UC Volumes?
UV volumes will not have a
dev_shreyas_goenka
prefix added inmode: development
. Configuringpresets.name_prefix
will be a no-op for UC Volumes. We have decided not to support prefixing for UC resources. This is because:${workspace.current_user.short_name}
to configure the prefixes manually.Customers often manually set up a UC hierarchy for dev and prod, including a schema or catalog per developer. Thus, it's often unnecessary for us to add prefixing in
mode: development
by default for UC resources.In retrospect, supporting prefixing for UC schemas and registered_models was a mistake and will be removed in a future release of DABs.
Tests
Unit, integration test and manually.
Manual Testing cases: