terraform-provider-databricks icon indicating copy to clipboard operation
terraform-provider-databricks copied to clipboard

WIP: Exporter: initial support for some Unity Catalog resources

Open alexott opened this issue 1 year ago • 1 comments

Changes

Initial support for exporting of the following resources:

  • databricks_catalog
  • databricks_schema
  • databricks_volume
  • databricks_connection
  • databricks_grants
  • databricks_share
  • databricks_recipient
  • databricks_registered_model
  • databricks_metastore
  • databricks_metastore_assignment

Code may emit unsupported resources - support for them will be in the subsequent PRs. ~Grants support depends on the fix for #3245.~ Requires #3247 to correctly resolve references to schemas, etc.

Also, includes a bit of refactoring of the repeatable code for emitting in the incremental mode.

Tests will be added separately when we get support for more resources, such as grants, etc.

Tests

  • [x] make test run locally
  • [x] relevant change in docs/ folder
  • [ ] covered with integration tests in internal/acceptance
  • [ ] relevant acceptance tests are passing
  • [ ] using Go SDK

alexott avatar Feb 09 '24 16:02 alexott

Codecov Report

Attention: 74 lines in your changes are missing coverage. Please review.

Comparison is base (6ae2baf) 83.60% compared to head (7e22fb5) 83.74%. Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3242      +/-   ##
==========================================
+ Coverage   83.60%   83.74%   +0.13%     
==========================================
  Files         173      173              
  Lines       15477    15750     +273     
==========================================
+ Hits        12940    13190     +250     
- Misses       1773     1787      +14     
- Partials      764      773       +9     
Files Coverage Δ
exporter/model.go 83.96% <100.00%> (+0.50%) :arrow_up:
exporter/context.go 82.72% <85.84%> (+0.07%) :arrow_up:
exporter/util.go 77.82% <21.73%> (-1.89%) :arrow_down:
exporter/importables.go 79.47% <86.51%> (+2.96%) :arrow_up:

codecov-commenter avatar Feb 09 '24 18:02 codecov-commenter