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

Add API to MS #797

Merged
merged 4 commits into from
Jun 9, 2020
Merged

Add API to MS #797

merged 4 commits into from
Jun 9, 2020

Conversation

palango
Copy link
Contributor

@palango palango commented Jun 5, 2020

This adds a REST API to the MS.

This is done in preparation for #7 for which we need a working API to export prometheus stats. However, it's also useful for #501, #650 and #763

The changes include:

  • mypy fixes to changes caused by ne __init__.py file
  • Make MonitoringService a greenlet
  • Add MsApi class with currently only a /info endpoint similar to the PFS'
  • Add an API test
  • Move common test stuff to libs

Otherwise, mypy won't find all python files in that directory. This
allows us to drop some type ignores and casts which where only necessary
due to incomplete type information before.
@palango palango force-pushed the ms-api branch 2 times, most recently from 5556295 to e672c59 Compare June 8, 2020 11:40
@codecov
Copy link

codecov bot commented Jun 8, 2020

Codecov Report

Merging #797 into master will increase coverage by 0.01%.
The diff coverage is 90.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #797      +/-   ##
==========================================
+ Coverage   90.01%   90.02%   +0.01%     
==========================================
  Files          35       38       +3     
  Lines        2633     2706      +73     
  Branches      334      339       +5     
==========================================
+ Hits         2370     2436      +66     
- Misses        189      193       +4     
- Partials       74       77       +3     
Impacted Files Coverage Δ
src/monitoring_service/handlers.py 86.38% <ø> (-0.07%) ⬇️
src/pathfinding_service/constants.py 100.00% <ø> (ø)
src/monitoring_service/cli.py 83.05% <74.19%> (-0.74%) ⬇️
src/raiden_libs/api.py 81.81% <81.81%> (ø)
src/raiden_libs/exceptions.py 92.30% <92.30%> (ø)
src/monitoring_service/api.py 97.56% <97.56%> (ø)
src/monitoring_service/constants.py 100.00% <100.00%> (ø)
src/monitoring_service/database.py 100.00% <100.00%> (ø)
src/monitoring_service/service.py 86.91% <100.00%> (ø)
src/pathfinding_service/api.py 95.61% <100.00%> (-0.07%) ⬇️
... and 7 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 4eab22a...28768fc. Read the comment docs.

@palango palango changed the title Test Add API to MS Jun 8, 2020
@palango palango requested a review from karlb June 8, 2020 11:56
@palango palango marked this pull request as ready for review June 8, 2020 12:10
@auto-assign auto-assign bot requested a review from hackaugusto June 8, 2020 12:12
src/pathfinding_service/cli.py Outdated Show resolved Hide resolved
src/monitoring_service/api.py Show resolved Hide resolved
src/monitoring_service/service.py Outdated Show resolved Hide resolved
@palango palango force-pushed the ms-api branch 2 times, most recently from 176f30f to 974e2e2 Compare June 9, 2020 13:26
@palango palango requested a review from karlb June 9, 2020 13:33
src/monitoring_service/cli.py Outdated Show resolved Hide resolved
src/monitoring_service/cli.py Outdated Show resolved Hide resolved
src/monitoring_service/api.py Show resolved Hide resolved
@palango palango force-pushed the ms-api branch 2 times, most recently from 176e4f5 to bb3597d Compare June 9, 2020 14:46
@palango palango merged commit a97486e into raiden-network:master Jun 9, 2020
@palango palango deleted the ms-api branch June 9, 2020 14:50
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.

2 participants