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

⬆️♻️ Fixes openapi specs generators and drops openapi-core dependencies #6787

Merged
merged 29 commits into from
Nov 22, 2024

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Nov 21, 2024

What do these changes do?

This PR addresses the following updates and improvements missing from the migration to pydantic v2

  • 🔨 🐛Fixes the OpenAPI specification (OAS) generator for web-api and storage-api : After pydantic v2 migration there were some issues with the generator. The generator also now produces OpenAPI 3.1 specifications for api/specs.
  • 🗑️ Removes openapi-core dependency: which does not support OpenAPI 3.1
  • ♻️ Refactors the test comparing app.routes with the OpenAPI document in aiohttp applications by introducing shared fixtures in pytest_simcore.openapi_specs.py.
  • Updates make services.ignore.md behavior: The generated .md file is no longer version-controlled, following the suggestion by @bisgaard-itis.
  • Upgrade OpenAPI specs validator: for storage and web apis (rest will follow in separate PRs)
  • 🗑️ Removes old tests

Related issue/s

How to test

Now we can generate OAS

cd services/web/server
make openapi-specs

Dev-ops

None

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 39.13043% with 14 lines in your changes missing coverage. Please review.

Project coverage is 88.39%. Comparing base (ca228c3) to head (4219aca).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6787      +/-   ##
==========================================
- Coverage   88.42%   88.39%   -0.04%     
==========================================
  Files        1545     1545              
  Lines       61627    61619       -8     
  Branches     2157     2164       +7     
==========================================
- Hits        54495    54466      -29     
- Misses       6803     6824      +21     
  Partials      329      329              
Flag Coverage Δ
integrationtests 64.78% <ø> (+0.02%) ⬆️
unittests 86.29% <39.13%> (-0.06%) ⬇️
Components Coverage Δ
api 78.42% <ø> (-1.19%) ⬇️
pkg_aws_library 93.28% <ø> (ø)
pkg_dask_task_models_library 96.57% <ø> (ø)
pkg_models_library 91.14% <100.00%> (-0.10%) ⬇️
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 87.31% <ø> (ø)
pkg_service_integration 70.00% <ø> (ø)
pkg_service_library 76.10% <6.66%> (-0.22%) ⬇️
pkg_settings_library 90.62% <ø> (ø)
pkg_simcore_sdk 85.36% <ø> (ø)
agent 97.00% <ø> (ø)
api_server 89.72% <ø> (ø)
autoscaling 95.21% <ø> (ø)
catalog 90.57% <ø> (ø)
clusters_keeper 98.73% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.17% <ø> (ø)
director 76.41% <ø> (-0.09%) ⬇️
director_v2 91.12% <ø> (-0.02%) ⬇️
dynamic_scheduler 96.59% <ø> (ø)
dynamic_sidecar 89.72% <ø> (ø)
efs_guardian 90.12% <ø> (ø)
invitations 93.44% <ø> (ø)
osparc_gateway_server 85.49% <ø> (ø)
payments 92.76% <ø> (ø)
resource_usage_tracker 90.64% <ø> (-0.15%) ⬇️
storage 89.66% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 88.69% <ø> (-0.01%) ⬇️

Continue to review full report in Codecov by Sentry.

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

---- 🚨 Try these New Features:

@pcrespov pcrespov force-pushed the fix/api-specs-in-master branch from 56512a2 to 8010bf9 Compare November 21, 2024 16:21
@pcrespov pcrespov marked this pull request as ready for review November 21, 2024 16:59
@pcrespov pcrespov changed the title ⬆️♻️ WIP: Fixes openapi generators for web-api, i.e. api/specs/web-server ⬆️♻️ Fixes openapi generators for web-api and drops openapi-core dependencies Nov 21, 2024
@pcrespov pcrespov added this to the Event Horizon milestone Nov 21, 2024
@pcrespov pcrespov enabled auto-merge (squash) November 21, 2024 17:11
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Please find some questions below

api/specs/web-server/requirements.txt Show resolved Hide resolved
Makefile Show resolved Hide resolved
@pcrespov pcrespov changed the title ⬆️♻️ Fixes openapi generators for web-api and drops openapi-core dependencies ⬆️♻️ Fixes openapi specs generators and drops openapi-core dependencies Nov 21, 2024
@pcrespov pcrespov added a:storage issue related to storage service a:webserver issue related to the webserver service a:api framework api, data schemas, a:database associated to postgres service and postgres-database package and removed a:storage issue related to storage service labels Nov 21, 2024
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.

Thanks, as this looks quite complex, I would like to have a direct discussion about it. thanks!

api/specs/storage/Makefile Show resolved Hide resolved
api/specs/web-server/_common.py Outdated Show resolved Hide resolved
@pcrespov pcrespov force-pushed the fix/api-specs-in-master branch from 3968415 to e54cb62 Compare November 22, 2024 13:10
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

@pcrespov pcrespov merged commit 28a54d6 into ITISFoundation:master Nov 22, 2024
86 of 90 checks passed
@pcrespov pcrespov deleted the fix/api-specs-in-master branch November 22, 2024 16:17
@pcrespov pcrespov restored the fix/api-specs-in-master branch November 25, 2024 08:10
@pcrespov pcrespov deleted the fix/api-specs-in-master branch November 25, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:api framework api, data schemas, a:database associated to postgres service and postgres-database package a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants