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: have a buffer of machines always ready (episode I) (⚠️ devops) #3790

Conversation

sanderegg
Copy link
Member

@sanderegg sanderegg commented Jan 24, 2023

What do these changes do?

  • some refactoring
  • some bugfixes (issues with timezones, never use utcnow() anymore but now(timezone.utc), getting EC2 instances AND vs OR operation, sending of progress when upscaling)
  • adds Name tag on EC2 instances such that lucky people with UI access can see machine names ;) @Surfict
  • (⚠️ devops) introduces new ENV EC2_INSTANCES_MACHINES_BUFFER, defaults to 0 when undefined Please currently define to 0

This PR teaches the autoscaling to keep a buffer of machines when upscaling and downscaling BUT not usable until episode II as this will indeed create more machines than necessary in case of load and keep always that number of buffer machines when scaling down but not ensure that EC2_INSTANCES_MACHINES_BUFFER is always present.

Related issue/s

How to test

Checklist

@sanderegg sanderegg added the a:autoscaling autoscaling service in simcore's stack label Jan 24, 2023
@sanderegg sanderegg added this to the Resistance Is Futile milestone Jan 24, 2023
@sanderegg sanderegg self-assigned this Jan 24, 2023
@sanderegg sanderegg changed the title Autoscaling/enhancement/machines buffer Autoscaling: have a buffer of machines always ready Jan 24, 2023
@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #3790 (866c343) into master (530b8bb) will increase coverage by 0.6%.
The diff coverage is n/a.

❗ Current head 866c343 differs from pull request most recent head 8ca6f53. Consider uploading reports for the commit 8ca6f53 to get more accurate results

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #3790     +/-   ##
========================================
+ Coverage    84.1%   84.8%   +0.6%     
========================================
  Files         897     920     +23     
  Lines       38663   39131    +468     
  Branches      748     793     +45     
========================================
+ Hits        32546   33190    +644     
+ Misses       5918    5731    -187     
- Partials      199     210     +11     
Flag Coverage Δ
integrationtests 66.7% <0.0%> (-0.1%) ⬇️
unittests 81.9% <0.0%> (+0.8%) ⬆️

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

Impacted Files Coverage Δ
...mcore_service_dynamic_sidecar/core/docker_utils.py 75.0% <0.0%> (-3.4%) ⬇️
...imcore_service_webserver/garbage_collector_task.py 83.7% <0.0%> (-2.4%) ⬇️
...imcore_service_webserver/garbage_collector_core.py 61.3% <0.0%> (-1.8%) ⬇️
...mcore_service_webserver/garbage_collector_utils.py 83.3% <0.0%> (-1.3%) ⬇️
...s/dynamic_sidecar/scheduler/_core/_events_utils.py 94.6% <0.0%> (-0.8%) ⬇️
...ervice_dynamic_sidecar/modules/outputs/_manager.py 95.2% <0.0%> (-0.1%) ⬇️
...library/src/servicelib/long_running_tasks/_task.py 95.2% <0.0%> (ø)
...es/settings-library/src/settings_library/rabbit.py 0.0% <0.0%> (ø)
...s/settings-library/src/settings_library/r_clone.py 100.0% <0.0%> (ø)
...settings-library/src/settings_library/utils_cli.py 78.1% <0.0%> (ø)
... and 35 more

@sanderegg sanderegg force-pushed the autoscaling/enhancement/machines_buffer branch from c05bded to 41c40b9 Compare January 24, 2023 15:03
@sanderegg sanderegg changed the title Autoscaling: have a buffer of machines always ready ✨Autoscaling: have a buffer of machines always ready (episode I) Jan 24, 2023
@sanderegg sanderegg requested a review from GitHK January 24, 2023 23:47
@sanderegg sanderegg marked this pull request as ready for review January 24, 2023 23:48
@sanderegg sanderegg changed the title ✨Autoscaling: have a buffer of machines always ready (episode I) ✨Autoscaling: have a buffer of machines always ready (episode I) (⚠️ devops) Jan 24, 2023
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

@sanderegg sanderegg force-pushed the autoscaling/enhancement/machines_buffer branch from 9dd4e40 to 7abd29d Compare January 25, 2023 09:36
@sanderegg sanderegg requested a review from GitHK January 25, 2023 09:36
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Nice!

@mrnicegyu11
Copy link
Member

Sorry I absolutely do not have time to even quickly read this at this point. just letting you know.

@sanderegg sanderegg force-pushed the autoscaling/enhancement/machines_buffer branch from 7abd29d to 8ca6f53 Compare January 25, 2023 18:49
@codeclimate
Copy link

codeclimate bot commented Jan 25, 2023

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

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Jan 25, 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

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.

4 participants