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/api port schemas public api #3485

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Oct 29, 2022

What do these changes do?

Follows up from PR #3484 and extends api-server OAS version 0.4.1 :

✨ Adds /solvers/{service_key}/releases/{service_version}/ports to the public API
- NOTE: that this entrypoint is not displayed in the schema since it is marked as DEV_FEATURE (i.e. API_SERVER_DEV_FEATURES_ENABLED) to be released in next upgrade version 0.5.0

Other changes:

  • ♻️ openapi.yml should not expose DEV_FEATUREs
  • 🔨 mocks catalog service API using catalog/openapi.json specs. (see mocked_catalog_service_api)
  • 🔨 Fixes CI for api-server

Related issue/s

How to test

image

[
  {
    "key": "input_1",
    "kind": "input",
    "content_schema": {
      "type": "string",
      "title": "File with int number",
      "description": "Pick a file containing only one integer"
    }
  },
  {
    "key": "input_2",
    "kind": "input",
    "content_schema": {
      "title": "Sleep interval",
      "type": "integer",
      "x_unit": "second",
      "minimum": 0,
      "maximum": 5
    }
  },
  {
    "key": "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
    }
  },
  {
    "key": "input_4",
    "kind": "input",
    "content_schema": {
      "title": "Distance to bed",
      "type": "integer",
      "x_unit": "meter"
    }
  },
  {
    "key": "output_1",
    "kind": "output",
    "content_schema": {
      "type": "string",
      "title": "File containing one random integer",
      "description": "Integer is generated in range [1-9]"
    }
  },
  {
    "key": "output_2",
    "kind": "output",
    "content_schema": {
      "title": "Random sleep interval",
      "type": "integer",
      "x_unit": "second"
    }
  }
]

Checklist

  • rebase onto ✨ Is686/list_service_ports in catalog service API #3484 when merged to master
  • Openapi changes? make openapi-specs, git commit ... and then make version-*)
  • Unit tests for the changes exist
    • extend catalog_data_fakers and mocked_catalog_service_api(app: FastAPI) [hypothesis??]
  • Runs in the swarm
  • Documentation reflects the changes

@pcrespov pcrespov self-assigned this Oct 29, 2022
@pcrespov pcrespov added the a:apiserver api-server service label Oct 29, 2022
@codecov
Copy link

codecov bot commented Oct 29, 2022

Codecov Report

Merging #3485 (402a35a) into master (17d49db) will increase coverage by 1.3%.
The diff coverage is n/a.

❗ Current head 402a35a differs from pull request most recent head 5e50345. Consider uploading reports for the commit 5e50345 to get more accurate results

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3485      +/-   ##
=========================================
+ Coverage    80.8%   82.2%    +1.3%     
=========================================
  Files          42     710     +668     
  Lines         907   29943   +29036     
  Branches        6     553     +547     
=========================================
+ Hits          733   24614   +23881     
- Misses        174    5179    +5005     
- Partials        0     150     +150     
Flag Coverage Δ
integrationtests 62.2% <0.0%> (?)
unittests 80.4% <0.0%> (-0.4%) ⬇️

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

Impacted Files Coverage Δ
...storage/src/simcore_service_storage/datcore_dsm.py 69.2% <0.0%> (ø)
...mcore_service_catalog/utils/requests_decorators.py 81.4% <0.0%> (ø)
...e_service_catalog/api/routes/services_resources.py 93.0% <0.0%> (ø)
.../service-library/src/servicelib/exception_utils.py 100.0% <0.0%> (ø)
...rary/src/servicelib/aiohttp/requests_validation.py 100.0% <0.0%> (ø)
...mcore_service_webserver/socketio/handlers_utils.py 96.5% <0.0%> (ø)
...ector_v2/modules/comp_scheduler/background_task.py 87.5% <0.0%> (ø)
...imcore_service_webserver/garbage_collector_task.py 97.6% <0.0%> (ø)
...service_api_server/api/dependencies/application.py 88.8% <0.0%> (ø)
...ctor_v2/models/schemas/dynamic_services/service.py 100.0% <0.0%> (ø)
... and 658 more

@pcrespov pcrespov force-pushed the is686/api-port-schemas-public-api branch 3 times, most recently from 6d9bfbb to b769f74 Compare October 29, 2022 22:31
@pcrespov pcrespov added this to the Katherine Switzer milestone Oct 29, 2022
@pcrespov pcrespov force-pushed the is686/api-port-schemas-public-api branch 3 times, most recently from 2c6d137 to 0bbfdbd Compare October 31, 2022 13:32
@pcrespov pcrespov changed the title WIP: ✨ Is686/api port schemas public api ✨ Is686/api port schemas public api Oct 31, 2022
@pcrespov pcrespov marked this pull request as ready for review October 31, 2022 13:33
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.

all good! please go ahead!

@pcrespov pcrespov force-pushed the is686/api-port-schemas-public-api branch from 0bbfdbd to add4511 Compare October 31, 2022 14:49
@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 9eac491 into ITISFoundation:master Oct 31, 2022
@pcrespov pcrespov deleted the is686/api-port-schemas-public-api branch October 31, 2022 17:12
@pcrespov
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:apiserver api-server service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants