terraform-provider-databricks
terraform-provider-databricks copied to clipboard
Jobs GoSDK schema migration
Changes
- Make
typeToSchemacheck and reuse information for registered resources in theresourceProviderRegistry - Taking
Libraryout of the registry because the only customization is not needed in other resources - Migrating jobs resource schema to use the GoSDK schema
- Constructed resource provider with
CustomizeSchemafunction that takes in all of the existing customizations - Tried making the new schema as similar as possible to the original schema
- Updated the schema used in the resource as well as in
DataToStructPointerandStructToDatafunction calls - Updated
resource_job_test
- Constructed resource provider with
- Adding
CustomizeSchemaResourceSpecificfunction so that customizations don't always have to be shared for registry references
Tests
- [x]
make testrun locally - [ ] relevant change in
docs/folder - [x] covered with integration tests in
internal/acceptance - [x] relevant acceptance tests are passing
- [x] using Go SDK
Codecov Report
Attention: Patch coverage is 88.55721% with 23 lines in your changes are missing coverage. Please review.
Project coverage is 82.67%. Comparing base (
4927dc0) to head (2991cee). Report is 7 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3532 +/- ##
==========================================
- Coverage 82.69% 82.67% -0.02%
==========================================
Files 183 184 +1
Lines 18826 18961 +135
==========================================
+ Hits 15568 15676 +108
- Misses 2341 2363 +22
- Partials 917 922 +5
| Files | Coverage Δ | |
|---|---|---|
| clusters/resource_cluster.go | 84.81% <100.00%> (+0.08%) |
:arrow_up: |
| clusters/resource_library.go | 79.48% <100.00%> (+0.53%) |
:arrow_up: |
| jobs/resource_job.go | 91.61% <100.00%> (+1.74%) |
:arrow_up: |
| common/customizable_schema.go | 74.83% <30.00%> (-2.50%) |
:arrow_down: |
| common/reflect_resource.go | 80.90% <27.27%> (-1.26%) |
:arrow_down: |
Triggered integration tests and confirmed that no failure is related to this change