!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
2 Aug 2024
@t0xic0der:fedora.imAkashdeep Dhar

Trying to run commit by myself is bad as then I would also have to take care of the rollback when abnormal states are faced.

    try:
        print("Before")
        session.flush()
        data = UserExternal.from_orm(made_user).dict()
        session.commit()
        print("After")
    except IntegrityError as expt:
        logger.logger_object.warning("Uniquness constraint failed - Please try again")
        logger.logger_object.warning(str(expt))
        raise HTTPException(HTTP_409_CONFLICT, "Uniquness constraint failed - Please try again") from expt  # noqa : E501
    return {"action": "post", "user": data}
05:07:47
@t0xic0der:fedora.imAkashdeep Dhar Aurélien B: Moving the entire code to Asyncio database management (psycopg2 -> asyncpg, async database flushes etc.) helped ;P 05:34:25
@t0xic0der:fedora.imAkashdeep Dharimage.png
Download image.png
10:03:11
@t0xic0der:fedora.imAkashdeep DharGetting there10:03:12
@t0xic0der:fedora.imAkashdeep Dhar Aurélien B, Mehmet Baran Geylani: I have implemented a rudimentary HTTP basic authentication for the endpoints. You can find the information about the same here https://github.com/fedora-infra/webhook-to-fedora-messaging/pull/57#issuecomment-2265130255. 11:48:27
@t0xic0der:fedora.imAkashdeep Dhar Aurélien B, Mehmet Baran Geylani: Please follow the steps there to setup a development database at your ends and test the code pushed so far. The last part (i.e. the messages endpoint) is left but it should be easy to port the same. Please feel free to make pushes against my branch or I will finish it off on Monday. 11:50:21
@gwmngilfen:ansible.im@gwmngilfen:ansible.im changed their display name from Gwmngilfen to Gwmngilfen (back Aug 14th).15:25:39
4 Aug 2024
@ghostcasper:matrix.org@ghostcasper:matrix.org Seems like we have a problem, I built the message endpoint and made some tests but it seems like FastAPI somehow converts the headers to lower-case. For example X-Github-Event > x-github-event. This is ok with the W2FM application. I made the required changes but it breaks the message schema and fails when creating objects. Should I update the message schema? Aurélien B Akashdeep Dhar 10:39:22
5 Aug 2024
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @ghostcasper:matrix.org
Seems like we have a problem, I built the message endpoint and made some tests but it seems like FastAPI somehow converts the headers to lower-case. For example X-Github-Event > x-github-event. This is ok with the W2FM application. I made the required changes but it breaks the message schema and fails when creating objects. Should I update the message schema? Aurélien B Akashdeep Dhar
Yeah - HTTP headers are NOT case sensitive
https://stackoverflow.com/questions/5258977/are-http-headers-case-sensitive
04:08:53
@abompard:fedora.imAurélien BYeah we can convert them to lowercase06:12:00
@t0xic0der:fedora.imAkashdeep Dhar Aurélien B: I have marked https://github.com/fedora-infra/webhook-to-fedora-messaging/pull/57 ready for review. 06:43:40
@t0xic0der:fedora.imAkashdeep Dhar I will clean things up later - Mehmet Baran Geylani are you taking care of the webhook-to-fedora-messaging-messages changes? 06:44:29
@abompard:fedora.imAurélien BThanks! Not sure what you mean by "clean things up" though. Should I review it now or wait?06:45:28
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @abompard:fedora.im
Thanks! Not sure what you mean by "clean things up" though. Should I review it now or wait?
Please review it!
I have some stuff left from the Flask times that are not even referenced (like validate_requests etc) that I will remove later
06:46:06
@t0xic0der:fedora.imAkashdeep Dhar They do not interact with the updated codebase (and I think I am being a bit lazy here ;P)06:46:27
@ghostcasper:matrix.org@ghostcasper:matrix.org
In reply to @t0xic0der:fedora.im
I will clean things up later - Mehmet Baran Geylani are you taking care of the webhook-to-fedora-messaging-messages changes?
Yes I can
06:46:55
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @ghostcasper:matrix.org
Yes I can
Please do. TIA.
06:47:08
@ghostcasper:matrix.org@ghostcasper:matrix.org
In reply to @t0xic0der:fedora.im
Please review it!
I have some stuff left from the Flask times that are not even referenced (like validate_requests etc) that I will remove later
Yes request variable in verify signature seems to be one of them
06:48:05
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @ghostcasper:matrix.org
Yes request variable in verify signature seems to be one of them
Made some changes
The request variable is no longer global here (Hated it when it was NGL)
Now I have to pass it in
06:48:37
@t0xic0der:fedora.imAkashdeep DharAs a parameter06:48:41
@ghostcasper:matrix.org@ghostcasper:matrix.orgYes I had built some code for it but didn't push. Looking forward for your changes. Will change the message schema 06:50:08
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @ghostcasper:matrix.org
Yes I had built some code for it but didn't push. Looking forward for your changes. Will change the message schema
Yep - Please feel free to make pushes against my PR.
06:50:33
@abompard:fedora.imAurélien B
In reply to @t0xic0der:fedora.im
Please review it!
I have some stuff left from the Flask times that are not even referenced (like validate_requests etc) that I will remove later
Hmm OK. But you need to understand that reviewing this kind of PR is going to take me at least an hour, maybe more depending on the content, so I'd rather not start reviewing something you're not 100% happy with and that you may update while I'm reviewing, or it will just waste my time.
07:15:51
@t0xic0der:fedora.imAkashdeep Dhar
In reply to @abompard:fedora.im
Hmm OK. But you need to understand that reviewing this kind of PR is going to take me at least an hour, maybe more depending on the content, so I'd rather not start reviewing something you're not 100% happy with and that you may update while I'm reviewing, or it will just waste my time.
I will change things after you are done with reviewing.
I will continue on with ARC investigation in the meanwhile.
07:39:01
@t0xic0der:fedora.imAkashdeep Dhar Take your time, Aurélien B 07:39:09
@ghostcasper:matrix.org@ghostcasper:matrix.org

https://github.com/fedora-infra/webhook-to-fedora-messaging-messages/pull/18

Aurélien B Akashdeep Dhar

09:25:36
@ghostcasper:matrix.org@ghostcasper:matrix.orgCheck please09:25:37
@ghostcasper:matrix.org@ghostcasper:matrix.orgRedacted or Malformed Event09:30:30
@abompard:fedora.imAurélien B Hey Zlopez , could you add me as a co-maintainer of https://pypi.org/project/fedora-planet-messages/ please? My PyPI username is abompard. 14:06:59
@Zlopez:matrix.orgZlopez Aurélien B: Done 14:09:58

Show newer messages


Back to Room ListRoom Version: 5