Sender | Message | Time |
---|---|---|
31 Jul 2024 | ||
Akashdeep Dhar | Mehmet Baran Geylani: https://www.rfc-editor.org/rfc/rfc2616 | 08:15:07 |
Akashdeep Dhar | Mehmet Baran Geylani: We gotta stick with JSON https://stackoverflow.com/questions/978061/http-get-with-request-body | 08:15:33 |
Aurélien B | So, support for OIDC auth only comes with OpenAPI 3.0 which Flask-RestX does not support, and will probably not support for a while according to this comment | 09:07:42 |
Aurélien B | I see 3 options:
| 09:11:40 |
Aurélien B | Looks like it's been first published 2 years ago and it's mostly a one-person gig. It's not ideal, but could work. Getting Flask-RestX to do openapi 3 would be more useful to us because we could use it for FASJSON, but it's also more work. Flask-RestX has seen some very recent work, but the previous sets of commits were 7 and 9 months ago, which is not a good sign when there are planned features and pending PRs. The development may almost stopped there. I'll have a look at how much work it would be to add openapi3 support to flask-restx, and in parallel we should evaluate flask-openapi3 which seems to be based on sound libraries, such as pydantic, and using modern Python constructs such as typing. | 16:24:19 |
Akashdeep Dhar | In reply to @abompard:fedora.imOn the face of all this, writing (yet another) HTTP client for W2FM no longer seems to be such a bad idea anymore. | 19:03:33 |
Akashdeep Dhar | Aurélien B: I was reading up on Flask-OpenAPI3 but not much net positive to report apart from all you mentioned. | 19:04:31 |
Paul Maconi (Aggraxis) changed their display name from Paul Maconi to Aggraxis (Paul Maconi). | 19:10:44 | |
1 Aug 2024 | ||
Akashdeep Dhar | Ok - New set of plans - We abandon the Flask-RestX implementation for now. If the Flask-OpenAPI3 is to be abandoned (which seems highly unlikely owing to the fact that they have a couple of release candidates out for the 4.x series https://pypi.org/project/flask-openapi3/4.0.0rc2/), it will take some time for the library to crumble and for all of its dependencies to become outdated. We risk it with Flask-OpenAPI3 and if needed we will come back to the project at a later date. | 03:30:09 |
Akashdeep Dhar | As such, I do not intend to build upon https://github.com/fedora-infra/webhook-to-fedora-messaging/pull/46. Once I am done with creating the issue tickets, I will get started with the Flask-OpenAPI3 documentation and probably create a prototype branch for all the testing I do with it. | 03:31:40 |
Akashdeep Dhar | FYI Aurélien B, Zlopez and Mehmet Baran Geylani | 03:31:55 |
@ghostcasper:matrix.org | In reply to @t0xic0der:fedora.imSounds OK for me. Anything else for me to know or work on? @t0xic0der:fedora.im | 04:54:42 |
Akashdeep Dhar | In reply to @ghostcasper:matrix.orgRead up on Flask-OpenAPI3 | 04:56:31 |
Akashdeep Dhar | Mehmet Baran Geylani: Check the meeting notes for reference docs https://docs.google.com/document/d/14mQawixeo-t6--rPylUE0p_lLJykQnhXZ5Z5ti0xnZM/edit | 04:56:54 |
Akashdeep Dhar | Mehmet Baran Geylani: Work on the documentation | 04:57:01 |
Akashdeep Dhar | Aurélien B: Quick question - Flask-OpenAPI3 feels VERRRRRRY reminiscent of FastAPI to a point that I wonder we might as well use that. Is there a reason we would not want to do it that I do not see? | 05:29:46 |
Aurélien B | Akashdeep Dhar: yeah, I suppose that makes sense given the state of things. | 05:33:11 |
Aurélien B | There will be quite a few things to adapt though. Thankfully sqlalchemy-helpers has support for fastapi | 05:33:48 |
Aurélien B | I think we may have to adapt the way we call the fedora_messaging api | 05:34:26 |
Aurélien B | twisted has its own thread pool, not sure how good it would be to call the twisted thread pool from the fastapi thread pool | 05:34:51 |
Aurélien B | I can think about that for a bit. | 05:35:26 |
Aurélien B | while we convert the rest | 05:35:34 |
Aurélien B | I don't think that publishing uses the thread pool though, so it may be sufficient to just use fastapi's threadpool, if it is available. | 05:41:19 |
Akashdeep Dhar | Flask-OpenAPI3 has a serviceable documentation but if we want people to contribute to W2FM and the people are not only us - We should definitely consider using something that is as tried-and-tested as FastAPI. | 05:41:27 |
Aurélien B | or make our endpoint not async, but that means having a sync db connection as well | 05:41:48 |
Aurélien B | which may be the simplest option | 05:42:02 |
Akashdeep Dhar | But FastAPI is async-native - We cannot do that | 05:42:07 |
Aurélien B | you don't have to make your endpoint async, in that case fastapi will call them in a threadpool | 05:42:49 |
Akashdeep Dhar | We need to have an async database connection too - Here's hoping that SQLAlchemy Helpers supports it | 05:42:53 |
Aurélien B | https://fastapi.tiangolo.com/async/?h=threadpool#path-operation-functions | 05:43:13 |