-
Notifications
You must be signed in to change notification settings - Fork 3
Docker profiles, container omission, fixed job cancellation #43
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
68e5b86
Added condition in docker.py for stage in and out. Added additional l…
BorisYourich ad62fea
commit for issue #36
micoleaoo 7383e66
Update README.md
micoleaoo 9ac548f
update for issue #36, docker profiles function as desired
micoleaoo 4d43342
Update README.md
micoleaoo ce1fca3
fixed stuck loop caused by cancelation/deletion of a job with galaxy …
micoleaoo 967c77a
Update ci.yaml
micoleaoo 26c7a64
Update README.md
micoleaoo 08598eb
cleaned up comments, docstrings
micoleaoo 3957c86
reverted changes: temporary variables back to direct assignement and …
micoleaoo 418cf28
comment delete
micoleaoo 1da5dab
added docker profile for pulsar service
micoleaoo ddcc337
added docker profile for pulsar service
micoleaoo 7177e7e
resolved conflicts
micoleaoo 135c1a7
Update ci.yaml
micoleaoo 224a484
Update ci.yaml
micoleaoo 35babf6
updated dockerfile image
micoleaoo 2ad5161
Update README.md
micoleaoo 3abf4a6
Added directory IO test which functions with upload_server.py instead…
micoleaoo 4033daf
Update ci.yaml
micoleaoo 958d585
Update ci.yaml
micoleaoo 83203d2
Update ci.yaml
micoleaoo 169f6ca
Update ci.yaml
micoleaoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,8 @@ | |
| from pymonad.promise import Promise | ||
| from fastapi.params import Depends | ||
| from fastapi import APIRouter, Body | ||
| from fastapi.responses import Response | ||
| # MODIFIED: Import JSONResponse | ||
|
||
| from fastapi.responses import Response, JSONResponse | ||
|
|
||
| from tesp_api.api.error import api_handle_error | ||
| from tesp_api.service.event_dispatcher import dispatch_event | ||
|
|
@@ -101,25 +102,33 @@ async def get_tasks( | |
|
|
||
|
|
||
| @router.post("/tasks/{id}:cancel", | ||
| responses={200: {"description": "Ok"}}, | ||
| responses={200: {"description": "Ok"}}, # Consider adding a response_model if GA4GH TES spec defines one for cancel | ||
| description=descriptions["tasks-delete"],) | ||
| async def cancel_task( | ||
| id: str, | ||
| token_subject: str = Depends(parse_verify_token), | ||
| ) -> Response: | ||
| ) -> Response: # Return type is still Response, JSONResponse is a subclass | ||
micoleaoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return await Promise(lambda resolve, reject: resolve(( | ||
| maybe_of(token_subject), | ||
| ObjectId(id) | ||
| ))).then(lambda get_tasks_args: task_repository.cancel_task(*get_tasks_args))\ | ||
| .map(lambda task_id: Response(status_code=200, media_type="application/json"))\ | ||
| .map(lambda task_id_maybe: | ||
| # MODIFIED: Use JSONResponse to ensure the body is "{}" | ||
| # task_id_maybe here is likely a Maybe[ObjectId] or similar from cancel_task | ||
| # We just need to return an empty JSON object on success. | ||
| # If cancel_task itself can fail and we want to return a different status, | ||
| # that logic would need to be built into how cancel_task's result is handled. | ||
| # Assuming cancel_task raises an exception handled by .catch(api_handle_error) on failure. | ||
| JSONResponse(content={}, status_code=200) | ||
| )\ | ||
| .catch(api_handle_error) | ||
|
|
||
|
|
||
| @router.get("/service-info", | ||
| responses={200: {"description": "Ok"}}, | ||
| description=descriptions["service-info"], | ||
| response_model=TesServiceInfo) | ||
| async def get_service_info() -> TesServiceInfo: | ||
| async def get_service_info() -> TesServiceInfo: # FastAPI directly handles Pydantic model return | ||
| return TesServiceInfo( | ||
| id="fi.muni.cz.tesp", | ||
| name="TESP", | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Fix the readme, no longer applies