Skip to content

[maintenance] black-formatted packages/services and new common.Makefile #1342

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

Merged
merged 34 commits into from
Mar 9, 2020

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Mar 4, 2020

What do these changes do?

  • Black-format:
    • added auto-formatter in project makefiles
    • formatted every relevant python package or service
  • scripts/common.Makefile collects common recipes: see how services and packages Makefiles are now simplified
  • Fixed noisy pprint in the logs
  • Added extensions to bash scripts

HINTS on Unhandled exceptions in tasks

Added some hints and logs on possible source of this problem:

image
and engineio/async_drivers/aiohttp.py:114 shows that
IOError = OSError is raised when received data is corrupted!!
And see web-sockets memory allocation!

"top_tracemalloc": [
"<frozen importlib._bootstrap>:219: size=28.9 MiB, count=343861, average=88 B",
"/usr/local/lib/python3.6/site-packages/aiohttp/http_websocket.py:584: size=3144 KiB, count=85, average=37.0 KiB",
"/usr/local/lib/python3.6/site-packages/prometheus_client/values.py:16: size=3074 KiB, count=87434, average=36 B",
"/usr/local/lib/python3.6/site-packages/amqp/connection.py:262: size=2608 KiB, count=40, average=65.2 KiB",
"/usr/local/lib/python3.6/site-packages/amqp/method_framing.py:97: size=2561 KiB, count=40, average=64.0 KiB",
"/usr/local/lib/python3.6/pathlib.py:66: size=2560 KiB, count=8, average=320 KiB",
"/usr/local/lib/python3.6/site-packages/prometheus_client/metrics.py:526: size=2286 KiB, count=38689, average=61 B",
"/usr/local/lib/python3.6/site-packages/prometheus_client/values.py:15: size=1883 KiB, count=46217, average=42 B",
"/usr/local/lib/python3.6/site-packages/prometheus_client/metrics.py:90: size=1425 KiB, count=4931, average=296 B",
"/usr/local/lib/python3.6/abc.py:133: size=1320 KiB, count=4836, average=280 B"
]

@pcrespov pcrespov force-pushed the maintenance/march4 branch from b388370 to 8397ee4 Compare March 4, 2020 14:28
@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@ac51c73). Click here to learn what that means.
The diff coverage is 77.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1342   +/-   ##
=========================================
  Coverage          ?   72.75%           
=========================================
  Files             ?      201           
  Lines             ?     8356           
  Branches          ?      937           
=========================================
  Hits              ?     6079           
  Misses            ?     2005           
  Partials          ?      272
Flag Coverage Δ
#integrationtests 57.55% <44.46%> (?)
#unittests 67.17% <76.34%> (?)
Impacted Files Coverage Δ
...ce-library/src/servicelib/jsonschema_validation.py 0% <ø> (ø)
...ackages/service-library/src/servicelib/observer.py 90% <ø> (ø)
..._service_webserver/director/director_exceptions.py 40% <ø> (ø)
...storage/src/simcore_service_storage/rest_models.py 100% <ø> (ø)
...rc/simcore_service_webserver/computation_models.py 77.77% <ø> (ø)
.../service-library/src/servicelib/openapi_servers.py 0% <ø> (ø)
...src/simcore_service_webserver/reverse_proxy/abc.py 100% <ø> (ø)
...er/src/simcore_service_webserver/security_roles.py 100% <ø> (ø)
...es/storage/src/simcore_service_storage/__init__.py 100% <ø> (ø)
...r/src/simcore_service_webserver/computation_api.py 65.3% <0%> (ø)
... and 130 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac51c73...14cd212. Read the comment docs.

@pcrespov pcrespov self-assigned this Mar 4, 2020
@pcrespov pcrespov changed the title WIP: Daily Maintenance/march4 Daily Maintenance/march4 Mar 5, 2020
@pcrespov pcrespov requested review from odeimaiz, sanderegg, ignapas and mguidon and removed request for ignapas and odeimaiz March 5, 2020 13:30
@pcrespov pcrespov marked this pull request as ready for review March 5, 2020 13:31
@pcrespov pcrespov force-pushed the maintenance/march4 branch from ade02b5 to cd567bc Compare March 5, 2020 13:31
@pcrespov pcrespov changed the title Daily Maintenance/march4 maintenance - cleanup and hints on unhandled task exceptions Mar 5, 2020
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 some things need to be reviewed in pair

@pcrespov
Copy link
Member Author

pcrespov commented Mar 5, 2020

@sanderegg did you see the FIXME: PC->SAN?? comments. Perhaps we can discuss them tomorrow?

@pcrespov pcrespov changed the title maintenance - cleanup and hints on unhandled task exceptions [maintenance] cleanup and hints on unhandled task exceptions Mar 5, 2020
@pcrespov pcrespov changed the title [maintenance] cleanup and hints on unhandled task exceptions [maintenance] black-formatted every python project and hints on unhandled task exceptions Mar 6, 2020
@pcrespov pcrespov requested a review from sanderegg March 6, 2020 19:50
@pcrespov
Copy link
Member Author

pcrespov commented Mar 6, 2020

@mguidon could you please help fixing the issues reported in storage, please? https://codeclimate.com/github/ITISFoundation/osparc-simcore/pull/1342

@pcrespov pcrespov changed the title [maintenance] black-formatted packages/services and added hints on unhandled task exceptions [maintenance] black-formatted packages/services and new common.Makefile Mar 6, 2020
@pcrespov pcrespov requested review from odeimaiz and ignapas March 6, 2020 20:31
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.

very pretty!

Copy link
Member

@mguidon mguidon left a comment

Choose a reason for hiding this comment

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

Oh boy. Beware of the robots. Go ahead and merge.

@pcrespov
Copy link
Member Author

pcrespov commented Mar 9, 2020

@mguidon I was expecting whether you could expect some time helping me fixing https://codeclimate.com/github/ITISFoundation/osparc-simcore/pull/1342
The issues remaining are all in storage. I already fixed many of them but it would be good if we go together through the remaining ones.
thx

@mguidon
Copy link
Member

mguidon commented Mar 9, 2020

I see, sorry missed that one.

@mguidon
Copy link
Member

mguidon commented Mar 9, 2020

Let me know when you have time

@pcrespov
Copy link
Member Author

pcrespov commented Mar 9, 2020

Failure in CI while building images is fixed in PR #1353. Once that PR is in, this shall follow

@pcrespov pcrespov merged commit d4410e6 into ITISFoundation:master Mar 9, 2020
@pcrespov pcrespov deleted the maintenance/march4 branch March 9, 2020 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants