Skip to content

Conversation

@nkvuong
Copy link
Contributor

@nkvuong nkvuong commented Apr 3, 2024

Changes

  • Add update method for databricks_metastore_data_access
  • Roll back when default storage credential assignment failed
  • Add notes to documentation

Tests

  • make test run locally
  • relevant change in docs/ folder
  • relevant acceptance tests are passing
  • using Go SDK

@nkvuong nkvuong requested review from a team as code owners April 3, 2024 17:40
@nkvuong nkvuong requested review from mgyucht and removed request for a team April 3, 2024 17:40
@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 71.21212% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 82.48%. Comparing base (93f131c) to head (e419e73).

Additional details and impacted files

Impacted file tree graph

@@            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     
Files Coverage Δ
catalog/resource_storage_credential.go 82.75% <100.00%> (+21.91%) ⬆️
catalog/resource_metastore_data_access.go 69.67% <47.82%> (-3.57%) ⬇️
catalog/storage_credential.go 75.70% <75.70%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@mgyucht mgyucht left a 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?

@nkvuong nkvuong force-pushed the doc/metastore_dac branch from ae2d595 to f84e7aa Compare April 5, 2024 13:50
@nkvuong
Copy link
Contributor Author

nkvuong commented Apr 5, 2024

Should we do the same for the create method as well?

Refactoring Create is a bit tricky since we need AccountOrWorkspaceRequest to return an object to set the Id appropriately

Copy link
Contributor

@alexott alexott left a 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

@nkvuong nkvuong force-pushed the doc/metastore_dac branch from 741be55 to 009255b Compare May 17, 2024 14:21
Copy link
Contributor

@alexott alexott left a 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)
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@alexott
Copy link
Contributor

alexott commented Jun 28, 2025

@nkvuong do we still need it?

Sign up for free to 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.

5 participants