Skip to content

Commit

Permalink
self-review changes
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Vasilev <[email protected]>
  • Loading branch information
Omrigan committed Jul 8, 2024
1 parent 3b379c2 commit 63c9086
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/agent/core/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func (s *state) calculateNeonVMAction(
desiredTime := logicalTime

if desiredResources.HasFieldLessThan(s.VM.Using()) {
// We are downscaling, so we needed a permit from monitor
// We are downscaling, so we needed a permit from the¡ monitor
desiredTime = desiredTime.Earliest(s.Monitor.CurrentLogicalTime)
}

Expand Down
2 changes: 0 additions & 2 deletions pkg/agent/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,6 @@ func (r *Runner) doNeonVMRequest(
Value: desiredLogicalTime,
}}

fmt.Printf("Desired Logical Time: %v\n", desiredLogicalTime)

patchPayload, err := json.Marshal(patches)
if err != nil {
panic(fmt.Errorf("Error marshalling JSON patch: %w", err))
Expand Down
7 changes: 1 addition & 6 deletions pkg/plugin/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,7 @@ func (e *AutoscaleEnforcer) handleResources(
}),
)

result := api.Resources{
VCPU: pod.cpu.Reserved,
Mem: pod.mem.Reserved,
}

return result, 200, nil
return api.Resources{VCPU: pod.cpu.Reserved, Mem: pod.mem.Reserved}, 200, nil
}

func (e *AutoscaleEnforcer) updateMetricsAndCheckMustMigrate(
Expand Down

0 comments on commit 63c9086

Please sign in to comment.