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

Making services more debuggable #1690

Merged
merged 6 commits into from
Aug 11, 2020
Merged

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented Aug 11, 2020

What do these changes do?

  • fixes an issue where retrieving logs from dead containers would cause the service scheduling to hang (a message will now be displayed in the service logs)
  • before failing and stopping the service a message the error message will be posted to the service logs

Will help debugging #1479

Related issue number

How to test

Checklist

  • Did you change any service's API? Then make sure to bundle document and upgrade version (make openapi-specs, git commit ... and then make version-*)
  • Unit tests for the changes exist
  • Runs in the swarm
  • Documentation reflects the changes
  • New module? Add your github username to .github/CODEOWNERS

@GitHK GitHK self-assigned this Aug 11, 2020
@GitHK GitHK added a:sidecar issue related with the sidecar worker service t:enhancement Improvement or request on an existing feature labels Aug 11, 2020
@codecov
Copy link

codecov bot commented Aug 11, 2020

Codecov Report

Merging #1690 into master will increase coverage by 0.0%.
The diff coverage is 50.0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1690   +/-   ##
======================================
  Coverage    73.6%   73.7%           
======================================
  Files         278     278           
  Lines       10919   10923    +4     
  Branches     1179    1179           
======================================
+ Hits         8047    8051    +4     
- Misses       2529    2530    +1     
+ Partials      343     342    -1     
Flag Coverage Δ
#integrationtests 56.7% <50.0%> (-0.1%) ⬇️
#unittests 67.4% <12.5%> (+<0.1%) ⬆️

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

Impacted Files Coverage Δ
...es/sidecar/src/simcore_service_sidecar/executor.py 85.7% <0.0%> (ø)
.../sidecar/src/simcore_service_sidecar/log_parser.py 88.8% <66.6%> (-2.7%) ⬇️
.../director/src/simcore_service_director/producer.py 63.5% <0.0%> (+0.4%) ⬆️

@GitHK GitHK added this to the Da Jia milestone Aug 11, 2020
@GitHK GitHK changed the title WIP: Making services more debuggable Making services more debuggable Aug 11, 2020
@GitHK GitHK marked this pull request as ready for review August 11, 2020 13:04
Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines +85 to +87
except aiodocker.exceptions.DockerError as e:
log_type, parsed_line = await parse_line(
f"Could not recover logs because: {str(e)}"
Copy link
Member

Choose a reason for hiding this comment

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

just wondering, import aiodocker vs from aiodocker.exceptions import DockerError ? what are the implications? is there any typical python directive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no reason, but this way you know exactly from which module the error comes. It's more readable because sometimes you may have a GenericError and with this form except module.submodule.GenericError... is easier to read.

@GitHK GitHK merged commit abfced4 into ITISFoundation:master Aug 11, 2020
@GitHK GitHK mentioned this pull request Aug 17, 2020
@sanderegg sanderegg mentioned this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:sidecar issue related with the sidecar worker service t:enhancement Improvement or request on an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants