Skip to content

Commit f3d05e2

Browse files
authored
Rework Graviton selection logic in databricks_node_type data source (#1974)
The issue is that Graviton nodes were selected even in case when Graviton selector wasn't specified. This fixes #1973
1 parent d20aea2 commit f3d05e2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clusters/data_node_type.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,19 @@ func (a ClustersAPI) GetSmallestNodeType(r NodeTypeRequest) string {
178178
if r.Category != "" && !strings.EqualFold(nt.Category, r.Category) {
179179
continue
180180
}
181-
if r.IsIOCacheEnabled && nt.IsIOCacheEnabled != r.IsIOCacheEnabled {
181+
if r.IsIOCacheEnabled && !nt.IsIOCacheEnabled {
182182
continue
183183
}
184-
if r.SupportPortForwarding && nt.SupportPortForwarding != r.SupportPortForwarding {
184+
if r.SupportPortForwarding && !nt.SupportPortForwarding {
185185
continue
186186
}
187-
if r.PhotonDriverCapable && nt.PhotonDriverCapable != r.PhotonDriverCapable {
187+
if r.PhotonDriverCapable && !nt.PhotonDriverCapable {
188188
continue
189189
}
190-
if r.PhotonWorkerCapable && nt.PhotonWorkerCapable != r.PhotonWorkerCapable {
190+
if r.PhotonWorkerCapable && !nt.PhotonWorkerCapable {
191191
continue
192192
}
193-
if r.Graviton && nt.Graviton != r.Graviton {
193+
if nt.Graviton != r.Graviton {
194194
continue
195195
}
196196
return nt.NodeTypeID

0 commit comments

Comments
 (0)