!etqgAEaQcsBuGJpEvE:matrix.org

Fedora Apps

210 Members
Please register to speak - https://da.gd/register | Fedora Infrastructure applications | https://apps.fedoraproject.org - bodhi, fas, mirrormanager, pagure etc11 Servers

Load older messages


SenderMessageTime
31 Jul 2024
@t0xic0der:fedora.imAkashdeep Dhar Mehmet Baran Geylani: https://www.rfc-editor.org/rfc/rfc2616 08:15:07
@t0xic0der:fedora.imAkashdeep Dhar Mehmet Baran Geylani: We gotta stick with JSON https://stackoverflow.com/questions/978061/http-get-with-request-body 08:15:33
@abompard:fedora.imAuré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
@abompard:fedora.imAurélien B

I see 3 options:

  1. adding openapi 3.0 support to Falsk-RestX (not easy at all, according to the maintainer of the project, but useful to everyone)
  2. switching from flask-restx to something else, a candidate would be flask-openapi3
  3. not using OIDC for authentication.
    I'd prefer to keep OIDC for auth, so I think we should prototype with flask-openapi3 and evaluate it, see if it is maintained, if there's a team behind it, if it's likely to get abandoned, etc.
09:11:40
@abompard:fedora.imAurélien BLooks 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
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @abompard:fedora.im
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.
On 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
@t0xic0der:fedora.imAkashdeep 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
@aggraxis:fedora.imPaul Maconi (Aggraxis) changed their display name from Paul Maconi to Aggraxis (Paul Maconi).19:10:44
1 Aug 2024
@t0xic0der:fedora.imAkashdeep DharOk - 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
@t0xic0der:fedora.imAkashdeep DharAs 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
@t0xic0der:fedora.imAkashdeep Dhar FYI Aurélien B, Zlopez and Mehmet Baran Geylani 03:31:55
@ghostcasper:matrix.org@ghostcasper:matrix.org
In reply to @t0xic0der:fedora.im
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.
Sounds OK for me. Anything else for me to know or work on? @t0xic0der:fedora.im
04:54:42
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @ghostcasper:matrix.org
Sounds OK for me. Anything else for me to know or work on? @t0xic0der:fedora.im
Read up on Flask-OpenAPI3
04:56:31
@t0xic0der:fedora.imAkashdeep 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
@t0xic0der:fedora.imAkashdeep Dhar Mehmet Baran Geylani: Work on the documentation 04:57:01
@t0xic0der:fedora.imAkashdeep 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
@abompard:fedora.imAurélien B Akashdeep Dhar: yeah, I suppose that makes sense given the state of things. 05:33:11
@abompard:fedora.imAurélien BThere will be quite a few things to adapt though. Thankfully sqlalchemy-helpers has support for fastapi05:33:48
@abompard:fedora.imAurélien BI think we may have to adapt the way we call the fedora_messaging api05:34:26
@abompard:fedora.imAurélien Btwisted has its own thread pool, not sure how good it would be to call the twisted thread pool from the fastapi thread pool05:34:51
@abompard:fedora.imAurélien BI can think about that for a bit.05:35:26
@abompard:fedora.imAurélien Bwhile we convert the rest05:35:34
@abompard:fedora.imAurélien BI 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
@t0xic0der:fedora.imAkashdeep DharFlask-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
@abompard:fedora.imAurélien Bor make our endpoint not async, but that means having a sync db connection as well05:41:48
@abompard:fedora.imAurélien Bwhich may be the simplest option05:42:02
@t0xic0der:fedora.imAkashdeep DharBut FastAPI is async-native - We cannot do that05:42:07
@abompard:fedora.imAurélien Byou don't have to make your endpoint async, in that case fastapi will call them in a threadpool05:42:49
@t0xic0der:fedora.imAkashdeep DharWe need to have an async database connection too - Here's hoping that SQLAlchemy Helpers supports it05:42:53
@abompard:fedora.imAurélien Bhttps://fastapi.tiangolo.com/async/?h=threadpool#path-operation-functions05:43:13

Show newer messages


Back to Room ListRoom Version: 5