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(appengine): capacity values for automatic scaling #1568

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

danielpeach
Copy link
Contributor

@lwander or @duftler please review.

A change in #1564 caused the capacity values to sometimes be null, which caused an NPE in Orca, which broke several operations. This fixes that.

Integer computeMinForAutomaticScaling(AppengineScalingPolicy scalingPolicy) {
Integer instanceCount = instances?.size() ?: 0
if (servingStatus == ServingStatus.SERVING) {
def candidateMinValues = [scalingPolicy.minIdleInstances, scalingPolicy.minTotalInstances, instanceCount].findAll { it != null }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The compiler doesn't like [...] - null here. Not sure why.

Copy link
Member

Choose a reason for hiding this comment

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

groovy

@danielpeach danielpeach merged commit 6f0010d into spinnaker:master Apr 12, 2017
@danielpeach danielpeach deleted the appengine-capacity-fix branch April 12, 2017 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants