Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

scale: persist scale down in api model#62

Merged
jackfrancis merged 3 commits intoAzure:masterfrom
jackfrancis:e2e-node-count
Nov 27, 2018
Merged

scale: persist scale down in api model#62
jackfrancis merged 3 commits intoAzure:masterfrom
jackfrancis:e2e-node-count

Conversation

@jackfrancis
Copy link
Member

@jackfrancis jackfrancis commented Nov 26, 2018

What this PR does / why we need it: The current aks-engine scale implementation does not persist changes to the apimodel.json in scale down scenarios. This change fixes that.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

If applicable:

  • documentation
  • unit tests
  • tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

E2E: node count check is flaky after scale

@codecov
Copy link

codecov bot commented Nov 26, 2018

Codecov Report

Merging #62 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   52.44%   52.42%   -0.02%     
==========================================
  Files          91       91              
  Lines       12801    12804       +3     
==========================================
  Hits         6713     6713              
- Misses       5480     5483       +3     
  Partials      608      608

@acs-bot acs-bot added size/M and removed size/XS labels Nov 26, 2018
@jackfrancis jackfrancis changed the title E2E: node count check is flaky after scale scale: persist scale down in api model Nov 26, 2018
@jackfrancis jackfrancis added the bug Something isn't working label Nov 26, 2018
cmd/scale.go Outdated

random := rand.New(rand.NewSource(time.Now().UnixNano()))
deploymentSuffix := random.Int31()
if needsDeployment {
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of having a bool for the deployment, I think we could probably refactor the "save updated apimodel" part to a function and call that function right after the scale down scenario and right after the scale up scenario.

Main reason why I'm suggesting this is because not saving the apimodel right after scale down means that something could fail before we reach that part of the code and cause us to not save the apimodel even though the scale operation happened + the "save apimodel code" (starting at line 391) doesn't need any of the stuff that runs before it (it just needs to happen after the scale).

@acs-bot acs-bot added size/S and removed size/M labels Nov 27, 2018
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm

@acs-bot
Copy link

acs-bot commented Nov 27, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,jackfrancis]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis merged commit 2c23865 into Azure:master Nov 27, 2018
@jackfrancis jackfrancis deleted the e2e-node-count branch November 27, 2018 01:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved bug Something isn't working lgtm size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants