-
Notifications
You must be signed in to change notification settings - Fork 174
Add DABs support for Unity Catalog volumes #1762
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
Merged
Merged
Changes from all commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
f772ce4
first comment
shreyas-goenka 8f4f3ae
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka ce5792c
fix convertor and add unit test
shreyas-goenka 7c7abef
run as support
shreyas-goenka d04b6b0
-
shreyas-goenka 9b66cd5
add apply target mode prefix functionality
shreyas-goenka 4b22e2d
add conversion tests
shreyas-goenka 88d0402
add inteprolation for volumes fields
shreyas-goenka 6f9817e
add prompt and crud test for volumes
shreyas-goenka d47b0d6
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka d180bab
add filer
shreyas-goenka fa54577
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka 73826ac
fix test and improve error
shreyas-goenka de7eb94
-
shreyas-goenka f10038a
-
shreyas-goenka df3bbad
add integration tests for artifacts portion:
shreyas-goenka aeab4ef
unit test for comparision of locatoin
shreyas-goenka aa2e16d
cleanup and add test
shreyas-goenka a90eb57
fix unit tests
shreyas-goenka 39cb5e8
fix test on windows
shreyas-goenka 13748f1
cleanup todos
shreyas-goenka bdecd08
-
shreyas-goenka 274fd63
iter
shreyas-goenka d3d5d4c
-
shreyas-goenka 227dfe9
fixes
shreyas-goenka e43f566
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka f919e94
typo fix
shreyas-goenka 9921263
separate GetFilerForLibraries tests
shreyas-goenka 266c26c
fix tesT
shreyas-goenka a9b8575
fmt and fix test
shreyas-goenka c5a02ef
split into filer files
shreyas-goenka eb94cd6
-
shreyas-goenka 3e3ddfd
fix test
shreyas-goenka d241c2b
add integration test for grant on volume
shreyas-goenka 6192835
add custom prefixing behaviour for volumes
shreyas-goenka 701b178
fmt
shreyas-goenka 810da66
-
shreyas-goenka 1a961eb
-
shreyas-goenka 8a2fe49
merge
shreyas-goenka 49b2cf2
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka e32ebd0
use IsVolumesPath
shreyas-goenka 6b12234
better message
shreyas-goenka f9287e0
address comments
shreyas-goenka 250d426
rename to volume
shreyas-goenka 1218178
-
shreyas-goenka 68dc6c1
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka 4cc2790
remove prefixing for uc volumes
shreyas-goenka 0406265
-
shreyas-goenka b0e527e
-
shreyas-goenka e6723de
undo containsUsername
shreyas-goenka f5ea8da
remove other mutator
shreyas-goenka ea6906e
add support for initializeUrl
shreyas-goenka 76092cc
remove todo
shreyas-goenka 039057f
fix renaming test
shreyas-goenka 4f5f9ec
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka 5ec784b
merge
shreyas-goenka fcb8fff
-
shreyas-goenka e9a5544
-
shreyas-goenka 5531e2a
-
shreyas-goenka 3090588
Update bundle/libraries/filer.go
shreyas-goenka 015f8cd
Update bundle/libraries/filer_volume.go
shreyas-goenka d0385a0
add extractVolumeFromPath
shreyas-goenka 5ac2d67
-
shreyas-goenka 9493795
address comments
shreyas-goenka e51b3a1
add const for internal
shreyas-goenka 01c3830
add TestFilerForWorkspace
shreyas-goenka e5f5618
-
shreyas-goenka 23e87d5
-
shreyas-goenka d1ec088
remove defensive bit
shreyas-goenka 42bf6ae
revert bundletest move
shreyas-goenka 5f2db1e
move .internal var
shreyas-goenka 07f888c
remove UC
shreyas-goenka 7d544f4
lowercase volumes
shreyas-goenka 406c073
use apierr.ErrNotFound
shreyas-goenka 3461018
better error message
shreyas-goenka 8e25bb4
Merge remote-tracking branch 'origin' into feature/uc-volumes
shreyas-goenka 8d790ef
address comments
shreyas-goenka d460bd6
fix
shreyas-goenka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| package resources | ||
|
|
||
| import ( | ||
| "context" | ||
| "fmt" | ||
| "net/url" | ||
| "strings" | ||
|
|
||
| "github.com/databricks/databricks-sdk-go" | ||
| "github.com/databricks/databricks-sdk-go/marshal" | ||
| "github.com/databricks/databricks-sdk-go/service/catalog" | ||
| ) | ||
|
|
||
| type Volume struct { | ||
| // List of grants to apply on this volume. | ||
| Grants []Grant `json:"grants,omitempty"` | ||
|
|
||
| // Full name of the volume (catalog_name.schema_name.volume_name). This value is read from | ||
| // the terraform state after deployment succeeds. | ||
| ID string `json:"id,omitempty" bundle:"readonly"` | ||
|
|
||
| *catalog.CreateVolumeRequestContent | ||
|
|
||
| ModifiedStatus ModifiedStatus `json:"modified_status,omitempty" bundle:"internal"` | ||
| URL string `json:"url,omitempty" bundle:"internal"` | ||
| } | ||
|
|
||
| func (v *Volume) UnmarshalJSON(b []byte) error { | ||
| return marshal.Unmarshal(b, v) | ||
| } | ||
|
|
||
| func (v Volume) MarshalJSON() ([]byte, error) { | ||
| return marshal.Marshal(v) | ||
| } | ||
|
|
||
| func (v *Volume) Exists(ctx context.Context, w *databricks.WorkspaceClient, id string) (bool, error) { | ||
| return false, fmt.Errorf("volume.Exists() is not supported") | ||
| } | ||
|
|
||
| func (v *Volume) TerraformResourceName() string { | ||
| return "databricks_volume" | ||
| } | ||
|
|
||
| func (v *Volume) InitializeURL(baseURL url.URL) { | ||
| if v.ID == "" { | ||
| return | ||
| } | ||
| baseURL.Path = fmt.Sprintf("explore/data/volumes/%s", strings.ReplaceAll(v.ID, ".", "/")) | ||
| v.URL = baseURL.String() | ||
| } | ||
|
|
||
| func (v *Volume) GetURL() string { | ||
| return v.URL | ||
| } | ||
|
|
||
| func (v *Volume) GetName() string { | ||
| return v.Name | ||
| } | ||
|
|
||
| func (v *Volume) IsNil() bool { | ||
| return v.CreateVolumeRequestContent == nil | ||
| } | ||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.