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

🐛 ✨ Check #credits >= 0.0 before returning solver job outputs #5249

Conversation

bisgaard-itis
Copy link
Contributor

@bisgaard-itis bisgaard-itis commented Jan 18, 2024

What do these changes do?

  • Check number of credits is non-negative before returning outputs of solver job in the api-server
  • Fix bug with swagger api in webserver

Related issue/s

How to test

Dev Checklist

DevOps Checklist

@bisgaard-itis bisgaard-itis self-assigned this Jan 18, 2024
@bisgaard-itis bisgaard-itis added the a:apiserver api-server service label Jan 18, 2024
@bisgaard-itis bisgaard-itis added this to the This is Sparta! milestone Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (eaff29d) 87.3% compared to head (92f135d) 87.2%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #5249     +/-   ##
========================================
- Coverage    87.3%   87.2%   -0.1%     
========================================
  Files        1302    1260     -42     
  Lines       53251   52053   -1198     
  Branches     1167    1167             
========================================
- Hits        46496   45408   -1088     
+ Misses       6506    6396    -110     
  Partials      249     249             
Flag Coverage Δ
integrationtests 65.0% <ø> (+<0.1%) ⬆️
unittests 85.0% <74.5%> (-0.2%) ⬇️

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

Files Coverage Δ
...src/simcore_service_api_server/core/application.py 97.5% <100.0%> (+<0.1%) ⬆️
...c/simcore_service_api_server/services/webserver.py 90.8% <100.0%> (+0.3%) ⬆️
...simcore_service_webserver/products/_middlewares.py 100.0% <ø> (ø)
...vice_api_server/api/routes/solvers_jobs_getters.py 92.6% <88.8%> (+11.1%) ⬆️
...imcore_service_api_server/utils/client_base_dev.py 0.0% <0.0%> (ø)
...ore_service_api_server/api/errors/custom_errors.py 75.0% <75.0%> (ø)
...er/src/simcore_service_api_server/core/settings.py 91.2% <44.4%> (-3.5%) ⬇️

... and 46 files with indirect coverage changes

@bisgaard-itis bisgaard-itis changed the title ✨ check #credits >= 0.0 before returning credits 🐛 ✨ check #credits >= 0.0 before returning credits Jan 19, 2024
@bisgaard-itis bisgaard-itis marked this pull request as ready for review January 19, 2024 10:25
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Cool thanks! Q: so what was th e problem with not able to query the products API?

@bisgaard-itis bisgaard-itis changed the title 🐛 ✨ check #credits >= 0.0 before returning credits 🐛 ✨ check #credits >= 0.0 before returning solver job outputs Jan 19, 2024
@bisgaard-itis bisgaard-itis changed the title 🐛 ✨ check #credits >= 0.0 before returning solver job outputs 🐛 ✨ Check #credits >= 0.0 before returning solver job outputs Jan 19, 2024
@bisgaard-itis
Copy link
Contributor Author

Cool thanks! Q: so what was th e problem with not able to query the products API?
The credentials used to access the webserver from the api-server are the users' and the products endpoint is only accesible for POs. But I was able to use another endpoint which is accessible to users.

Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

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

thx!

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.

👍

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.

nice. you should probably be careful with the auto-import functionality in vscode. this always imports with absolute import instead of relative if the file is not imported yet.
Then you get issues with Ruff vs iSort

services/docker-compose.yml Show resolved Hide resolved
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

Cool! I left some suggestions and questions

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

Thx. Added some extra comments regarding the error msgs

@bisgaard-itis bisgaard-itis enabled auto-merge (squash) January 24, 2024 08:20
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@bisgaard-itis bisgaard-itis merged commit 1221670 into ITISFoundation:master Jan 24, 2024
55 checks passed
@bisgaard-itis bisgaard-itis deleted the 5236-check-positive-credits-before-returning-credits branch January 24, 2024 11:52
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Feb 14, 2024
39 tasks
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.

Check #credits > 0 before returning solver outputs from api-server
7 participants