-
Notifications
You must be signed in to change notification settings - Fork 472
Update databricks_metastore_data_access implementation to match databricks_storage_credential
#3431
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3431 +/- ##
==========================================
+ Coverage 82.34% 82.48% +0.14%
==========================================
Files 190 191 +1
Lines 19323 19331 +8
==========================================
+ Hits 15911 15946 +35
+ Misses 2480 2456 -24
+ Partials 932 929 -3
|
mgyucht
left a comment
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.
Should we do the same for the create method as well?
ae2d595 to
f84e7aa
Compare
Refactoring Create is a bit tricky since we need |
alexott
left a comment
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.
looks good, we just need to resolve conflicts
…tabricks_storage_credential`
Co-authored-by: Miles Yucht <[email protected]>
741be55 to
009255b
Compare
alexott
left a comment
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.
in general - lgtm, but we need to discuss how we report errors during rollback, without losing the original error that triggered rollback.
@mgyucht wdyt?
| // Rollback | ||
| rollback_err := acc.StorageCredentials.DeleteByMetastoreIdAndStorageCredentialName(ctx, metastoreId, dac.CredentialInfo.Name) | ||
| if rollback_err != nil { | ||
| return fmt.Errorf("failed to rollback: %v", rollback_err) |
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.
Here we're hiding original error - should we put it here as well?
| // Rollback | ||
| rollback_err := w.StorageCredentials.DeleteByName(ctx, dac.Name) | ||
| if rollback_err != nil { | ||
| return fmt.Errorf("failed to rollback: %v", rollback_err) |
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.
same
|
@nkvuong do we still need it? |
Changes
databricks_metastore_data_accessTests
make testrun locallydocs/folder