-
Notifications
You must be signed in to change notification settings - Fork 30
🎨 👽️ Improve start job endpoint in webserver and improve error handling in api-server #5927
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
🎨 👽️ Improve start job endpoint in webserver and improve error handling in api-server #5927
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5927 +/- ##
=========================================
+ Coverage 84.5% 85.5% +0.9%
=========================================
Files 10 639 +629
Lines 214 31161 +30947
Branches 25 205 +180
=========================================
+ Hits 181 26666 +26485
- Misses 23 4444 +4421
- Partials 10 51 +41
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
This reverts commit 379030f.
@mguidon well I guess we are lucky on that one. |
Actually I change the 201 to a 202 in this PR. So this would probably break sim4life as I understand it. But maybe I should stick with a 201 in case a job is successfully started. I am sure @pcrespov has an opinion about that (?😉) |
You mention above that you have a 202 if the jobs starts. Thats fine. I just check the 201 when I create the job. |
Ah ok, perfect! Then I misunderstood. Very good. So then this should be compatible with your client 🤞🏻 |
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.
thx. I left some suggestsion and thoughts :-)
services/api-server/src/simcore_service_api_server/exceptions/backend_errors.py
Outdated
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/exceptions/backend_errors.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Outdated
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Outdated
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/studies_jobs.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/services/webserver.py
Show resolved
Hide resolved
@mguidon as I client I would just check for a successful response , i.e. |
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.
👍
This reverts commit a19620d.
What do these changes do?
director-v2
andwebserver
now return 409 instead of 403. This is done because it seems like a more correct status code to return and because it is convenient to have a single return status which indicates this conflict so we can handle it separately in the api-server.osparc
python client doesn't notice that (s)he hit the start endpoint twice.api-server
. This could alternatively have been a 201 but I decided for a 202 because no resource is really created in this operation.Related issue/s
start
endpoint #5922 . Handling the performance will come in a second stepHow to test
Dev-ops checklist