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

✨ Is686/list_service_ports in catalog service API #3484

Merged
merged 29 commits into from
Oct 31, 2022

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Oct 28, 2022

What do these changes do?

Implements entrypoint in catalog service API to retrieve service ports: version: 0.3.2 → 0.4.0

  • ✨ implements list_service_ports entrypoint in catalog service
  • ♻️ reuses get_service_from_registry as dependency injection

Following PRs will connect this API to the api-server and expose it to the public (#3485)

Related issue/s

How to test

manual testing: use swagger
image

curl -X 'GET'
'http://127.0.0.1:8005/v0/services/simcore%2Fservices%2Fcomp%2Fitis%2Fsleeper/2.1.4/ports?user_id=1'
-H 'accept: application/json'

[
  {
    "name": "input_1",
    "kind": "input",
    "content_media_type": "text/plain",
    "content_schema": {
      "type": "string",
      "title": "File with int number",
      "description": "Pick a file containing only one integer"
    }
  },
  {
    "name": "input_2",
    "kind": "input",
    "content_schema": {
      "title": "Sleep interval",
      "type": "integer",
      "x_unit": "second",
      "minimum": 0,
      "maximum": 5
    }
  },
  {
    "name": "input_3",
    "kind": "input",
    "content_schema": {
      "title": "Fail after sleep",
      "type": "boolean",
      "description": "If set to true will cause service to fail after it sleeps",
      "default": false
    }
  },
  {
    "name": "input_4",
    "kind": "input",
    "content_schema": {
      "title": "Distance to bed",
      "type": "integer",
      "x_unit": "meter"
    }
  },
  {
    "name": "output_1",
    "kind": "output",
    "content_media_type": "text/plain",
    "content_schema": {
      "type": "string",
      "title": "File containing one random integer",
      "description": "Integer is generated in range [1-9]"
    }
  },
  {
    "name": "output_2",
    "kind": "output",
    "content_schema": {
      "title": "Random sleep interval",
      "type": "integer",
      "x_unit": "second"
    }
  }
]

Checklist

  • Openapi changes? make openapi-specs, git commit ... and then make version-*)
  • Unit tests for the changes exist
  • Runs in the swarm
  • Documentation reflects the changes

@pcrespov pcrespov self-assigned this Oct 28, 2022
@pcrespov pcrespov added this to the Katherine Switzer milestone Oct 28, 2022
@pcrespov pcrespov added the a:catalog catalog service label Oct 28, 2022
@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

Merging #3484 (828d83d) into master (23d5254) will increase coverage by 0.3%.
The diff coverage is 92.5%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #3484     +/-   ##
========================================
+ Coverage    81.2%   81.5%   +0.3%     
========================================
  Files         792     529    -263     
  Lines       33484   25472   -8012     
  Branches      744     133    -611     
========================================
- Hits        27206   20773   -6433     
+ Misses       6100    4650   -1450     
+ Partials      178      49    -129     
Flag Coverage Δ
integrationtests 67.6% <100.0%> (+17.7%) ⬆️
unittests 77.8% <92.5%> (-2.1%) ⬇️

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

Impacted Files Coverage Δ
...mcore_service_catalog/api/dependencies/services.py 83.6% <79.4%> (-16.4%) ⬇️
...e_service_catalog/models/schemas/services_ports.py 97.9% <97.9%> (ø)
...es/catalog/src/simcore_service_catalog/api/root.py 100.0% <100.0%> (ø)
...src/simcore_service_catalog/api/routes/services.py 60.9% <100.0%> (+4.3%) ⬆️
...mcore_service_catalog/api/routes/services_ports.py 100.0% <100.0%> (ø)
...e_service_director_v2/models/domains/comp_tasks.py 100.0% <100.0%> (ø)
...ice_director_v2/models/domains/dynamic_services.py 100.0% <100.0%> (ø)
...er/src/simcore_service_webserver/catalog_models.py 96.2% <100.0%> (ø)
...rc/simcore_service_webserver/version_control_db.py 24.5% <0.0%> (-68.7%) ⬇️
...simcore_service_webserver/meta_modeling_results.py 30.9% <0.0%> (-59.6%) ⬇️
... and 425 more

@pcrespov pcrespov changed the title WIP: ✨ Is686/list_service_ports in catalog service API ✨ Is686/list_service_ports in catalog service API Oct 28, 2022
@pcrespov pcrespov marked this pull request as ready for review October 28, 2022 20:44
@pcrespov pcrespov requested a review from mguidon October 29, 2022 20:26
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.

great work! a few questions and notes..

@sonarcloud
Copy link

sonarcloud bot commented Oct 31, 2022

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

@pcrespov pcrespov merged commit 402a35a into ITISFoundation:master Oct 31, 2022
@pcrespov pcrespov deleted the is686/api-port-schemas branch October 31, 2022 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:catalog catalog service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants