scale: persist scale down in api model#62
Conversation
Codecov Report
@@ 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 |
cmd/scale.go
Outdated
|
|
||
| random := rand.New(rand.NewSource(time.Now().UnixNano())) | ||
| deploymentSuffix := random.Int31() | ||
| if needsDeployment { |
There was a problem hiding this comment.
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).
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it: The current
aks-engine scaleimplementation 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:
Release note: