-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛 ensure backwards compatibility of api server #6866
🐛 ensure backwards compatibility of api server #6866
Conversation
All endpoints (except the paginated ones) have been checked to be backwards compatible on the commit c72f500. This was done my running the following script from make openapi.json
../../scripts/openapi-diff.bash breaking https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/4abb9f23e99c5cd854e348a81f8e8e4e4c88c691/services/api-server/openapi.json \
/specs/openapi.json \
--flatten-allof \
--unmatch-path "^/v0/credits/price$|^/v0/files$|^/v0/files/content$|^/v0/me$|^/v0/solvers$|^/v0/solvers/releases$|^/v0/files/{file_id}$|^/v0/files/{file_id}:complete$|^/v0/solvers/{solver_key}/latest$|^/v0/solvers/{solver_key}/releases$|^/v0/solvers/{solver_key}/releases/{version}$|^/v0/solvers/{solver_key}/releases/{version}/jobs$|^/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}$|^/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/metadata$|^/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/outputs$|^/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/wallet$|^/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:start$|^/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:inspect$|^/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:stop$|^/v0/studies/{study_id}$|^/v0/studies/{study_id}/jobs$|^/v0/studies/{study_id}/jobs/{job_id}/metadata$|^/v0/studies/{study_id}/jobs/{job_id}/outputs$|^/v0/studies/{study_id}/jobs/{job_id}:inspect$|^/v0/studies/{study_id}/jobs/{job_id}:start$|^/v0/studies/{study_id}/jobs/{job_id}:stop$|^/v0/studies/{study_id}:clone$|^/v0/wallets/default$|^/v0/wallets/{wallet_id}$" The unmatched paths in this command are there due to a bug in pydantic v1 or an earlier version of openapi. The point is that the openapi specs changed for all these endpoints, but the actual endpoints didn't. I.e. previously the specs didn't match the actual API 💩. I checked manually that these endpoints did not actually break backwards compatibility. The endpoints which are still to be checked are the following paginated endpoints:
Conclusion: In order to ensure backwards compatibility of further changes can be done against commit c72f500 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6866 +/- ##
==========================================
- Coverage 88.34% 86.35% -1.99%
==========================================
Files 1568 902 -666
Lines 61498 40074 -21424
Branches 2001 262 -1739
==========================================
- Hits 54331 34607 -19724
+ Misses 6832 5407 -1425
+ Partials 335 60 -275
Continue to review full report in Codecov by Sentry.
|
Update: These last remaining endpoints were checked together with Pedro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new step is going to be very useful
services/api-server/src/simcore_service_api_server/api/routes/credits.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
What do these changes do?
openapi-specs
in the top-level Makefile which generates all openapi-specs within the repo. Currently there are two services which are causing issues here: Storage and Director. It seems their openapi specs are not properly created by the Make targets in the services directories.master
. This approach has several advantages:Related issue/s
How to test
Dev-ops checklist