-
Notifications
You must be signed in to change notification settings - Fork 406
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
Added LocalSsdCount
in GcpAttributes
to ForceSendFields for databricks_cluster
resource
#3631
Conversation
LocalSsdCount
in GcpAttributes
to ForceSendFieldsLocalSsdCount
in GcpAttributes
to ForceSendFields for databricks_cluster
resource
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.
Great, thanks!
Does it mean it will send |
clusters/resource_cluster.go
Outdated
@@ -383,6 +383,9 @@ func resourceClusterCreate(ctx context.Context, d *schema.ResourceData, c *commo | |||
if createClusterRequest.Autoscale == nil { | |||
createClusterRequest.ForceSendFields = []string{"NumWorkers"} | |||
} | |||
if createClusterRequest.GcpAttributes != nil { | |||
createClusterRequest.GcpAttributes.ForceSendFields = []string{"LocalSsdCount"} |
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.
We should call GetOkExists for local_ssd_count to check that it was explicitly set and only then send it. The reason is that if not specified in request, the default value for local_ssd_count on backend is not 0 (can be 1, 2, 4 depending on type of instance used).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3631 +/- ##
==========================================
- Coverage 81.65% 81.65% -0.01%
==========================================
Files 193 193
Lines 19536 19539 +3
==========================================
+ Hits 15953 15955 +2
- Misses 2633 2634 +1
Partials 950 950
|
Changes
We always force send the local ssd count if gcp attribute is specified.
Tests
Updated unit test
make test
run locallydocs/
folderinternal/acceptance