Skip to content
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

Fix node_type data source by skipping node types that aren't available from cloud provider #1534

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Aug 15, 2022

Also, fixed tests that use azure-cli - Go stopped to execute programs when PATH has relative paths

This fixes #1533

@alexott alexott requested a review from nfx August 15, 2022 06:59
@codecov-commenter
Copy link

Codecov Report

Merging #1534 (33613fb) into master (9505748) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1534      +/-   ##
==========================================
+ Coverage   90.17%   90.18%   +0.01%     
==========================================
  Files         132      132              
  Lines       10560    10567       +7     
==========================================
+ Hits         9522     9530       +8     
+ Misses        663      662       -1     
  Partials      375      375              
Impacted Files Coverage Δ
clusters/data_node_type.go 88.31% <100.00%> (+1.16%) ⬆️
clusters/sort.go 100.00% <0.00%> (+8.33%) ⬆️

@alexott alexott requested a review from a team August 15, 2022 08:28
clusters/data_node_type.go Outdated Show resolved Hide resolved
Comment on lines 99 to 106
if nt.NodeInfo != nil {
for _, st := range nt.NodeInfo.Status {
if st == CloudProviderNodeStatusNotAvailableInRegion || st == CloudProviderNodeStatusNotEnabled {
shouldBeSkipped = true
break
}
}
}
Copy link
Contributor

@redcape redcape Aug 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also check node_info.available_core_quota >= num_cores?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if it will help a lot, as we're working on the individual node level...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it depends on the use-case. For mounts, it will help since we only start one node always and use it for all mounts. When the use-case is to for user-defined clusters, it's less clear how much it would help since the number of cluster and number of executors is unknown at this stage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment doesn't block merge

clusters/data_node_type.go Outdated Show resolved Hide resolved
clusters/data_node_type.go Outdated Show resolved Hide resolved
clusters/data_node_type.go Outdated Show resolved Hide resolved
@@ -89,6 +94,18 @@ type NodeType struct {
Graviton bool `json:"is_graviton,omitempty"`
}

func (nt NodeType) shouldBeSkipped() bool {
if nt.NodeInfo != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we further simplify it to if nt.NodeInfo == nil return false?

@nfx nfx enabled auto-merge (squash) August 17, 2022 14:51
@nfx nfx merged commit f0470cf into master Aug 17, 2022
@nfx nfx deleted the issue-1533-fix branch August 17, 2022 16:28
@nfx nfx mentioned this pull request Aug 24, 2022
michael-berk pushed a commit to michael-berk/terraform-provider-databricks that referenced this pull request Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ISSUE] Issue with data databricks_node_type (Azure) while setting local_disk = true
4 participants