Skip to content

Commit

Permalink
Fix Race conditions in Targeted Deletion of machines by CA (#341)
Browse files Browse the repository at this point in the history
* [WIP] fix CA marking machines for deletion

* [WIP] add mutex for machine deployment

* initialise machinedeployment map in mcmManager

* add Refresh method in nodegrp implementation

* address review comments

* address review comments - part 2

* update unit tests, misc code changes

* review comments addressed

* fixed broken test after refactor

* fixed broken test

* alternate solution using single annotation for deletion by CA

* fixed use of Go 1.23 functions

* fixed test

* added godoc for AcquireScalingMutex

* correct godoc for machinesMarkedByCAForDeletionAnnotation

* changed to machineutils.TriggerDeletionByMCM

* removed var shadowing, added TODO to godoc for util fns

* corr var names, clear mutex acquire, releasing logs

* ensured IncreaseSize/DecreaseTargetSize logged  delta in mutex acquire/release log

* review comments addressed: fixed unit test, adjusted log, removed redundant fn

* all code review comments addressed

* review feedback: unexport belongs, enforce interface

* addreseed review comment, refactored added test for computeScaleDownData

* review comment: preset capacity for slices

* review feedback: ->computeScaleDownData and revised godoc

* cordon nodes fix for when node is disabled for scaledown

* fixed unit test string quoting issue

---------

Co-authored-by: Rishabh Patel <[email protected]>
Co-authored-by: elankath <[email protected]>
  • Loading branch information
3 people authored Feb 4, 2025
1 parent 45e190f commit edd7d34
Show file tree
Hide file tree
Showing 7 changed files with 811 additions and 637 deletions.
Loading

0 comments on commit edd7d34

Please sign in to comment.