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

Add CustomDiffFunc for health in sql_endpoint resources

Open edwardfeng-db opened this issue 1 year ago • 3 comments

Changes

  • Add CustomDiffFunc so that we ignore the diff if health is the only field with the diff

Fixes #3204

Tests

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

edwardfeng-db avatar Feb 07 '24 13:02 edwardfeng-db

Why not simply make Optional to true?

alexott avatar Feb 08 '24 08:02 alexott

Why not simply make Optional to true?

Then users would be able to specify the health field in their resource which they shouldn't be able to right? cc: @mgyucht

tanmay-db avatar Feb 09 '24 14:02 tanmay-db

Codecov Report

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

Comparison is base (8ede7be) 83.72% compared to head (bb46e5e) 83.70%. Report is 28 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3227      +/-   ##
==========================================
- Coverage   83.72%   83.70%   -0.03%     
==========================================
  Files         169      173       +4     
  Lines       15094    15766     +672     
==========================================
+ Hits        12638    13197     +559     
- Misses       1714     1793      +79     
- Partials      742      776      +34     
Files Coverage Δ
sql/resource_sql_endpoint.go 87.23% <100.00%> (+0.42%) :arrow_up:
qa/testing.go 73.21% <16.66%> (-1.11%) :arrow_down:

... and 25 files with indirect coverage changes

codecov-commenter avatar Feb 19 '24 20:02 codecov-commenter