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

πŸš‘οΈ Fix GC error while trying to close service #3985

Merged
merged 5 commits into from
Mar 17, 2023

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented Mar 17, 2023

What do these changes do?

GC was wrongly fetching the project_id, it is now recovered from the intended data structure. I have no idea why I did that πŸ€·β€β™‚οΈ

ERROR: [2023-03-17 08:34:35,601/MainProcess] [simcore_service_webserver.garbage_collector_core:_remove_single_orphaned_service(166)]  -  Exception: '6c2bca80-75f6-56bd-b169-7386e6e0ce21'
Traceback (most recent call last):
  File "/home/scu/.venv/lib/python3.9/site-packages/servicelib/logging_utils.py", line 160, in log_decorator_wrapper
    value = await func(*args, **kwargs)
  File "/home/scu/.venv/lib/python3.9/site-packages/simcore_service_webserver/garbage_collector_core.py", line 365, in _remove_single_orphaned_service
    project_uuid = currently_opened_projects_node_ids[service_uuid]
KeyError: '6c2bca80-75f6-56bd-b169-7386e6e0ce21'

Related issue/s

How to test

Checklist

  • Unit tests for the changes exist

@GitHK GitHK self-assigned this Mar 17, 2023
@GitHK GitHK added a:webserver issue related to the webserver service changelog:πŸ›bugfix labels Mar 17, 2023
@GitHK GitHK added this to the Mithril milestone Mar 17, 2023
@GitHK GitHK marked this pull request as ready for review March 17, 2023 09:17
@GitHK GitHK changed the title πŸš‘οΈ Fix issue with GC πŸš‘οΈ Fix GC error while trying to close project Mar 17, 2023
@GitHK GitHK changed the title πŸš‘οΈ Fix GC error while trying to close project πŸš‘οΈ Fix GC error while trying to close service Mar 17, 2023
@codecov
Copy link

codecov bot commented Mar 17, 2023

Codecov Report

Merging #3985 (58c67ba) into master (4aa9a3d) will decrease coverage by 2.5%.
The diff coverage is 100.0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3985      +/-   ##
=========================================
- Coverage    85.2%   82.7%    -2.5%     
=========================================
  Files         943     392     -551     
  Lines       40680   20158   -20522     
  Branches      848     137     -711     
=========================================
- Hits        34665   16676   -17989     
+ Misses       5792    3433    -2359     
+ Partials      223      49     -174     
Flag Coverage Ξ”
integrationtests 66.7% <50.0%> (-0.1%) ⬇️
unittests 83.3% <100.0%> (+1.3%) ⬆️

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

Impacted Files Coverage Ξ”
...imcore_service_webserver/garbage_collector_core.py 82.4% <100.0%> (+11.1%) ⬆️

... and 639 files with indirect coverage changes

Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

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

Thanks a lot and good luck!

Can we have a regression alert as well, some log-line to check if it happens again, or does this not apply here since you changed the code?

@GitHK
Copy link
Contributor Author

GitHK commented Mar 17, 2023

Thanks a lot and good luck!

Can we have a regression alert as well, some log-line to check if it happens again, or does this not apply here since you changed the code?

No need for an alert here. If a different error occurs, it will display a useful traceback now.

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

I think you massively increased the logs in the GC right? maybe care to reduce them if this is the fix.
Also please check my comments.

@codeclimate
Copy link

codeclimate bot commented Mar 17, 2023

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

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Mar 17, 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.1% 0.1% Duplication

@GitHK GitHK enabled auto-merge (squash) March 17, 2023 12:47
@GitHK GitHK merged commit af35153 into ITISFoundation:master Mar 17, 2023
@GitHK GitHK deleted the pr-osparc-gc-fix-failing branch March 17, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Garbage collector not working on aws-prod
4 participants