Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Autoscaling: add a delay before draining a node #5843

Merged

Conversation

sanderegg
Copy link
Member

@sanderegg sanderegg commented May 17, 2024

What do these changes do?

This PR adds a delay (EC2_INSTANCES_TIME_BEFORE_DRAINING) before draining active nodes (e.g. EC2 in the cluster that are available to run services) so that in case a dynamic sidecar would fail on start it has time to restart and is not rejected.

driving tests:

test_set_node_found_empty
test_cluster_scaling_up_and_down

bonus:

  • some cleanup, test coverage still at 97%

Related issue/s

How to test

make devenv
source .venv/bin/activate
cd services/autoscaling
make install-dev
make test-unit-dev

Dev-ops checklist

@sanderegg sanderegg added the a:autoscaling autoscaling service in simcore's stack label May 17, 2024
@sanderegg sanderegg added this to the Leeroy Jenkins milestone May 17, 2024
@sanderegg sanderegg self-assigned this May 17, 2024
Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 94.54545% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 87.6%. Comparing base (cafbf96) to head (5cffffd).
Report is 213 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5843      +/-   ##
=========================================
+ Coverage    84.5%   87.6%    +3.1%     
=========================================
  Files          10    1367    +1357     
  Lines         214   56790   +56576     
  Branches       25    1284    +1259     
=========================================
+ Hits          181   49801   +49620     
- Misses         23    6715    +6692     
- Partials       10     274     +264     
Flag Coverage Δ
integrationtests 65.1% <ø> (?)
unittests 85.6% <94.5%> (+1.0%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...gs-library/src/settings_library/docker_registry.py 95.6% <100.0%> (ø)
...g/src/simcore_service_autoscaling/core/settings.py 100.0% <100.0%> (ø)
...oscaling/src/simcore_service_autoscaling/models.py 100.0% <100.0%> (ø)
.../simcore_service_autoscaling/utils/utils_docker.py 100.0% <100.0%> (ø)
...c/simcore_service_clusters_keeper/core/settings.py 96.2% <100.0%> (ø)
.../simcore_service_clusters_keeper/utils/clusters.py 97.5% <ø> (ø)
...e_service_autoscaling/modules/auto_scaling_core.py 94.2% <87.5%> (ø)

... and 1336 files with indirect coverage changes

@sanderegg sanderegg force-pushed the autoscaling/add-delay-before-drain branch 3 times, most recently from 021b977 to f6cead9 Compare May 17, 2024 14:11
@sanderegg sanderegg marked this pull request as ready for review May 17, 2024 14:34
@sanderegg sanderegg force-pushed the autoscaling/add-delay-before-drain branch from ee62f19 to 5ac56c4 Compare May 17, 2024 15:04
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Thanks 👍

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

cool!

@sanderegg sanderegg force-pushed the autoscaling/add-delay-before-drain branch from 5ac56c4 to 5cffffd Compare May 21, 2024 08:34
Copy link

sonarcloud bot commented May 21, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sanderegg sanderegg merged commit 83c5f31 into ITISFoundation:master May 21, 2024
56 checks passed
@sanderegg sanderegg deleted the autoscaling/add-delay-before-drain branch May 21, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:autoscaling autoscaling service in simcore's stack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a delay before draining (setting node to not-ready)
5 participants