-
Notifications
You must be signed in to change notification settings - Fork 384
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
Support for spot instances on Azure #571
Conversation
f0eb591
to
5adb2dd
Compare
Codecov Report
@@ Coverage Diff @@
## master #571 +/- ##
==========================================
+ Coverage 81.61% 81.65% +0.04%
==========================================
Files 77 77
Lines 6663 6678 +15
==========================================
+ Hits 5438 5453 +15
Misses 815 815
Partials 410 410
|
5adb2dd
to
81fa607
Compare
@@ -321,6 +324,12 @@ func modifyClusterRequest(clusterModel *Cluster) { | |||
} | |||
clusterModel.AwsAttributes = &awsAttributes | |||
} | |||
if clusterModel.AzureAttributes != nil { | |||
clusterModel.AzureAttributes = nil |
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.
nit: can we add a unit test here
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.
But does it make sense to nil the field if it's not nil?..
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.
all Azure attributes now are related to the Spot instances only, and if we're using instance pools, then we shouldn't override instance types?
compute/resource_cluster.go
Outdated
clusterModel.AzureAttributes = nil | ||
} | ||
if clusterModel.GcpAttributes != nil { | ||
clusterModel.GcpAttributes = nil |
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.
nit: can we add a unit test here
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.
let me add it...
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.
added
@@ -61,6 +61,8 @@ func ResourceInstancePool() *schema.Resource { | |||
s["custom_tags"].ForceNew = true | |||
s["enable_elastic_disk"].ForceNew = true | |||
s["enable_elastic_disk"].Default = true | |||
s["aws_attributes"].ConflictsWith = []string{"azure_attributes"} | |||
s["azure_attributes"].ConflictsWith = []string{"aws_attributes"} |
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.
no gcp attributes for instance pools?
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.
there is no instance pools support yet, so I can't test it - will add later
This PR adds support for Azure spot instances for clusters & instance pools. It also adds an additional support for preemptible executors on GCP (only for clsuters)