-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add FastAPI framework as next step for API framework #10823
Conversation
|
I'd also be curious about what you think of gunicorn as a process manager, which seems like it's the recommended route for production. https://docs.gunicorn.org/en/latest/signals.html#master-process lists some signals it can handle. Reading this naively it sounds like it can also do zero-downtime restarts, as a sort of replacement for zerglings ? |
That potentially looks OK, that there's a master/worker split. I'm not as big of a fan of signals as Nate is, but it looks potentially nice? |
+1 for websocket support. I know there's a lot more stuff we'd have to do server side to actually generate a subscription channel with changes that we could consume, but I love that it would be possible. |
7fc087a
to
62ed9b4
Compare
62ed9b4
to
8352d8a
Compare
8352d8a
to
e8a60bf
Compare
87a4857
to
14272c1
Compare
This is by no means complete, but I think it is mergeable. That would make distributing work on various parts easier (xref: https://github.com/galaxyproject/galaxy/projects/20) |
@nsoranzo do you know why |
I don't have time to investigate in deep at the moment, you can try to regenerate the Docker image with: |
Thanks, no luck there, but I think the manual pin shouldn't be a big deal for now. |
Can you integrate some of the idea from:
I know it is a little more work to rework the old APIs as we migrate the new ones - but I think there is value. It pushes more logic out of the controller layer if nothing else, and then it puts us in a better position if we're not able to fully make the transition within one or two releases. |
b6a5989
to
ea83108
Compare
I didn't mean to insist that all the tests pass under uvicorn, just wanted to have the option to run them so I could play with the branch. |
8547422
to
5529f6b
Compare
Previous MockApp user was implcitly admin (no user, no session).
Also use JSON requests for roles tests instead of form-data - not sure how we're going to tackle that.
Thanks @davelopez! Co-authored-by: davelopez <[email protected]>
1b9a38a
to
2c1dbb8
Compare
Bare routes (without trailing /) don't quite work, so we need to fully specify them. Also fixes job lock route to be at `/api/job_lock` instead of /api/jobs/job_lock.
3ab8a02
to
aee3712
Compare
Brilliant work! |
FastAPI does a lot of things (websockets, graphql, Oauth2 + JWT tokens, backend tasks, celery integration, sync + async routes, openapi + typing, good performance, file serving, active community and nice documentation) and can be integrated nicely route-by-route without having to toss out everything at once.
This is a quick experiment where I replaced /api/jobs, IFF you start galaxy with
python scripts/fapi.py -c config/galaxy.yml
(need to activate the virtualenv and install uvicorn). The rest of routes continues to work as normal, so Galaxy is fully functional.Here's the openAPI doc for the new route:
In terms of challenges:
TODO for this PR: