-
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
Adds dynamic-sidecar osparc service (🏗️actions required) #2271
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2271 +/- ##
========================================
+ Coverage 71.6% 71.8% +0.2%
========================================
Files 488 504 +16
Lines 19286 19702 +416
Branches 1897 1931 +34
========================================
+ Hits 13815 14164 +349
- Misses 5009 5067 +58
- Partials 462 471 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ore-forked into adding-dynamic-sidecar
) | ||
except InvalidComposeSpec as e: | ||
logger.warning("Error detected %s", traceback.format_exc()) | ||
raise HTTPException(status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)) from 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.
I guess you missed this one...
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py
Outdated
Show resolved
Hide resolved
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py
Outdated
Show resolved
Hide resolved
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py
Outdated
Show resolved
Hide resolved
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.
great first step! looking forward! some minor things. 👍 👍
""" Expects the docker-compose spec as raw-body utf-8 encoded text """ | ||
|
||
# stores the compose spec after validation | ||
body_as_text = (await request.body()).decode("utf-8") |
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.
ok, and the plan is to move to some pydantic model later on?
|
||
# pending is another fake state use to share more information with the frontend | ||
return { | ||
"Status": container_state.get("Status", "pending"), |
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.
are you sure the docker engine does not return anything special when pulling/starting?
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.
Yes, I've checked when putting this comment. It's needed for the frontend because we are mapping from task to container statues which do not overlap completely
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py
Outdated
Show resolved
Hide resolved
logger.warning( | ||
"An unexpected Docker error occurred:\n%s", str(traceback.format_exc()) | ||
) | ||
raise HTTPException( |
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.
Much better! But i still think we should somehow find a better code than 500 for this. As I said several times above, this is already the default behaviour of fastapi
🏗️ Maintenance
After this is merged need to mark the new unit-test for the dynamic sidecar as mandatory.
What do these changes do?
Splitting the new service from #1887 and renaming it to
dynamic-sidecar
.This PR is required by #1887
service-sidecar
todynamic-sidecar
Bonus:
make github-workflow-job job=JOB_NAME
openapi.json
Related issue/s
ITISFoundation/osparc-issues#349
How to test
Checklist