Skip to content

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Feb 7, 2024

What I did
sort containers to prepare scale down:

  1. select first containers which have obsolete configuration, so that they get removed (would be recreated otherwise)
  2. sort containers by container number label so we remove those with highest value first. This prevent number to grow iterating with scale up and down
  3. eventually sort by creation date, as an alternative to container number label (should be always present, but who knows...)

Related issue
fixes #11460

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

Copy link

codecov bot commented Feb 11, 2024

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (8479c36) 58.41% compared to head (ec9a68f) 58.46%.
Report is 2 commits behind head on main.

Files Patch % Lines
cmd/compose/compose.go 28.00% 17 Missing and 1 partial ⚠️
pkg/compose/convergence.go 71.42% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11473      +/-   ##
==========================================
+ Coverage   58.41%   58.46%   +0.05%     
==========================================
  Files         134      134              
  Lines       11520    11546      +26     
==========================================
+ Hits         6729     6750      +21     
- Misses       4131     4133       +2     
- Partials      660      663       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ndeloof ndeloof marked this pull request as ready for review February 12, 2024 10:25
@ndeloof ndeloof requested review from a team, glours, milas and jhrotko and removed request for a team February 12, 2024 10:29
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Contributor

@jhrotko jhrotko left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] New scale down sorting is done in the wrong order for the logic of stopping containers that occurs afterwards
2 participants