-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Move logs about incompatible instance types to debug #415
Conversation
Previously, the amount of logs generated when replacing a large number of on-demand instances could be overwhelming since info about each candidate instance type was logged. Now, we still log when an instance type matches, but now all the logs about every instance type that does not match will be at debug level. This change was begun in https://github.com/AutoSpotting/AutoSpotting/pull/354/files#diff-fa23d3c4fb090da3bc9f71371d6e1d95R446.
67d8d6e
to
015a284
Compare
Code Climate has analyzed commit 015a284 and detected 0 issues on this pull request. View more on Code Climate. |
@@ -243,7 +243,7 @@ func (a *autoScalingGroup) loadConfSpot() bool { | |||
} | |||
if newValue, done := a.loadBiddingPolicy(tagValue); done { | |||
a.region.conf.BiddingPolicy = newValue | |||
logger.Println("BiddingPolicy =", a.region.conf.BiddingPolicy) | |||
debug.Println("BiddingPolicy =", a.region.conf.BiddingPolicy) |
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.
I don't think this adds anything since the default bidding policy was already logged on startup.
@@ -460,16 +460,16 @@ func (i *instance) launchSpotReplacement() error { | |||
func (i *instance) getPricetoBid( | |||
baseOnDemandPrice float64, currentSpotPrice float64) float64 { | |||
|
|||
logger.Println("BiddingPolicy: ", i.region.conf.BiddingPolicy) | |||
debug.Println("BiddingPolicy: ", i.region.conf.BiddingPolicy) |
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.
The 2 logs statements below are enough to infer the bidding policy.
@@ -391,7 +391,7 @@ func (i *instance) getCompatibleSpotInstanceTypesListSortedAscendingByPrice(allo | |||
i.isStorageCompatible(candidate, attachedVolumesNumber) && | |||
i.isVirtualizationCompatible(candidate.virtualizationTypes) { | |||
acceptableInstanceTypes = append(acceptableInstanceTypes, acceptableInstance{candidate, candidatePrice}) | |||
logger.Println("\tMATCH FOUND, added", candidate.instanceType, "to launch candiates list") | |||
logger.Println("\tMATCH FOUND, added", candidate.instanceType, "to launch candiates list for instance", i.InstanceId) |
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.
Adding instanceID to some of these logs to help provide context.
Thanks for merging this so quickly @cristim. |
Thanks for your contribution! I'm doing my best to keep up with you and get these things merged and delivered to the users timely. |
Previously, the amount of logs generated when replacing a large
number of on-demand instances could be overwhelming since info about
each candidate instance type was logged. Now, we still log when an
instance type matches, but now all the logs about every instance type
that does not match will be at debug level.
This change was begun in https://github.com/AutoSpotting/AutoSpotting/pull/354/files#diff-fa23d3c4fb090da3bc9f71371d6e1d95R446.
Issue Type
Summary
Reduce amount of logs generated when attempting to find compatible instance types.
Code contribution checklist
code under any software license.
to it.
guidelines.
test coverage doesn't decrease.
make full-test
.variables which are also passed as parameters to the
CloudFormation
and
Terraform
stacks defined as infrastructure code.
support per-group overrides using tags.
configurations.
proven to work using log output from various test runs.
appropriate) and formatted consistently to the existing log output.
new configuration options for both stack parameters and tag overrides.
contribution actually resolves it.