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

🐛Prevent autoscaling from creating workers indefinitely #5008

Merged

Conversation

sanderegg
Copy link
Member

@sanderegg sanderegg commented Nov 9, 2023

What do these changes do?

  • drained node instance resources were computed using docker facilities instead of EC2, thus leading to an infinite creation of EC2 instance.

Bonus

  • fixes time to terminate
  • shows logs before terminating in info
  • adds a pre-commit hook to check for pytest.mark.testit

Related issue/s

How to test

DevOps Checklist

@sanderegg sanderegg added the a:autoscaling autoscaling service in simcore's stack label Nov 9, 2023
@sanderegg sanderegg added this to the 7peaks milestone Nov 9, 2023
@sanderegg sanderegg self-assigned this Nov 9, 2023
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #5008 (de79b63) into master (d1f2dc6) will decrease coverage by 22.0%.
The diff coverage is 95.6%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5008      +/-   ##
=========================================
- Coverage    87.2%   65.3%   -22.0%     
=========================================
  Files        1243     547     -696     
  Lines       51157   27808   -23349     
  Branches     1084     198     -886     
=========================================
- Hits        44645   18177   -26468     
- Misses       6273    9581    +3308     
+ Partials      239      50     -189     
Flag Coverage Δ
integrationtests 63.6% <ø> (-1.5%) ⬇️
unittests 98.7% <95.6%> (+13.7%) ⬆️

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

Files Coverage Δ
...oscaling/src/simcore_service_autoscaling/models.py 100.0% <100.0%> (ø)
...e_service_autoscaling/modules/auto_scaling_core.py 95.7% <100.0%> (+<0.1%) ⬆️
...scaling/modules/auto_scaling_mode_computational.py 100.0% <ø> (ø)
...ing/src/simcore_service_autoscaling/modules/ec2.py 100.0% <100.0%> (ø)
...service_autoscaling/utils/computational_scaling.py 100.0% <100.0%> (ø)
...ore_service_autoscaling/utils/auto_scaling_core.py 94.2% <0.0%> (ø)

... and 1029 files with indirect coverage changes

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

So, for my understanding: Are these changes related to the issues you mentioned to me were detected by the e2e tests I set up?

scripts/precommit/pytest-testit.bash Show resolved Hide resolved
@sanderegg
Copy link
Member Author

So, for my understanding: Are these changes related to the issues you mentioned to me were detected by the e2e tests I set up?

@bisgaard-itis : no this is another issue. the one of the e2e I am currently working on it

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.

thxthx! ;-)

.pre-commit-config.yaml Show resolved Hide resolved
scripts/precommit/pytest-testit.bash Outdated Show resolved Hide resolved
@sanderegg sanderegg force-pushed the bugfix/worker-creation-infinite-loop branch from 06501f8 to aaad876 Compare November 10, 2023 10:40
Copy link

sonarcloud bot commented Nov 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

codeclimate bot commented Nov 10, 2023

Code Climate has analyzed commit de79b63 and detected 0 issues on this pull request.

View more on Code Climate.

@sanderegg sanderegg merged commit 836deb3 into ITISFoundation:master Nov 10, 2023
53 checks passed
@sanderegg sanderegg deleted the bugfix/worker-creation-infinite-loop branch November 10, 2023 11:28
@sanderegg sanderegg added the bug buggy, it does not work as expected label Nov 22, 2023
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Nov 23, 2023
29 tasks
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 bug buggy, it does not work as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autoscaling: creates new machines although the current one should be sufficient
5 participants