!vcyiEtMVHIhWXcJAfl:sw1v.org

#synapse-dev:matrix.org

479 Members
If you are not a dev contributing code to Synapse, please talk in #synapse:matrix.org instead. This room is *only* for coordination of dev work. If you want to grab the attention of a dev, do it in #synapse:matrix.org. 144 Servers

Load older messages


SenderMessageTime
8 Dec 2024
@morguldir:sulian.eumorguldir
In reply to @ben:radey.org
Dang. Although I did expect a lot of hallucinations, there's not a lot of manhole documentation that I could even find for myself, let alone for ChatGPT to train on
it’s just an interactive python shell running with the same context as synapse
15:50:03
@dmrobertson:matrix.orgdmr (there's a bit more to it than that: it ties in with twisted's Deferred mechanism so that you can do some interactive work with async with its async machinery) 16:18:37
@daedric:aguiarvieira.ptRicardo DuarteMSC2213?22:04:01
@mscbot:matrix.orgmscbot

MSC2213: Rejoinability of private/invite-only rooms by @turt2live

22:04:03
@ben:radey.org@ben:radey.orgThat does seem that would address this issue quite nicely. If only...23:24:58
9 Dec 2024
@neilj:matrix.orgNeil changed their display name from Neil_away to Neil.10:49:31
@blackmad:matrix.orgDavid Blackman I'm still wondering - if I want to fetch one specific event for a room, say PowerLevels, is it better to call get_current_state_ids with a StateFilter for that one specific event - which means the query won't be cached and I'll be relying on postgres performance, or call get_current_state_ids with no filter, get the full list of cached ids and just pull out the PowerLevels event. It seems like the latter would be faster, but given that, I don't understand why that's not how it's implemented in code? 13:12:11
@andrewm:element.ioAndrew Morgan (anoa)
In reply to @blackmad:matrix.org
I'm still wondering - if I want to fetch one specific event for a room, say PowerLevels, is it better to call get_current_state_ids with a StateFilter for that one specific event - which means the query won't be cached and I'll be relying on postgres performance, or call get_current_state_ids with no filter, get the full list of cached ids and just pull out the PowerLevels event. It seems like the latter would be faster, but given that, I don't understand why that's not how it's implemented in code?

Wouldn't it still be cached, but just only for that room and state event type/key?

I imagine we just didn't think to implement a get_current_state_ids with a None state filter with that optimisation, rather than explicitly not implementing it in that way. Indeed, feel free to suggest that if you think it'll make a theoretical difference!

It's a bit tricky to prove that it would be faster in all cases though. For a room with 100,000 users, pulling all of that member state would be far more work than just a single power levels event, in case the result isn't cached.

14:28:03
@blackmad:matrix.orgDavid Blackmanimage.png
Download image.png
14:31:21
@blackmad:matrix.orgDavid Blackmanimage.png
Download image.png
14:31:37
@blackmad:matrix.orgDavid Blackmanin the 100k users case, I'm wondering though if the code is already calling get_current_state_ids with statefilter=None somewhere, so we're repeating work and missing out on a cache14:32:20
@blackmad:matrix.orgDavid Blackmanwondering if y'all have a better mental map of the code flow to understand if that happens, so there's often a cache we're ignoring.14:33:00
@blackmad:matrix.orgDavid BlackmanI could instrument this, could also make it such that we check if the full state in the cache and use that if so?14:33:20
@andrewm:element.ioAndrew Morgan (anoa) We call the method with state_filter=None here, which is called whenever an event is created or received over federation - so very frequently! 14:44:23
@andrewm:element.ioAndrew Morgan (anoa)

could also make it such that we check if the full state in the cache and use that if so?

That sounds worthwhile!

14:44:40
@racronn:matrix.orgracronn Question: Does JWT login method supports api calls with User-Interactive Authentication at all?

Im implementing client using JWT as a login method https://matrix-org.github.io/synapse/latest/jwt.html But I have trouble solving UIA for account deactivation (also resetting cross signing upload... but lets keep this post short).
When I call POST http://localhost:8008/_matrix/client/v3/account/deactivate
{
  "auth": {
    "session": "<session obtained with first /account/deactivate request>"
  }
}
In response I'm getting 401 response with empty flows: []
{
  "session": "<session>",
  "flows": [],
  "params": {},
  "completed": []
}
I also tried binding email to user's 3pids It also requires UIA and returns me flows: []... so this option is also not applicable.

I feel that I exhausted all possibilities here.
19:53:15
@clokep:matrix.orgclokepI don't think that's supported at the moment.19:54:16
@racronn:matrix.orgracronnDang it, so I guess I'm left with admin api to solve account deactivation.19:58:19
@clokep:matrix.orgclokepThe JWT support was never standardized. 🀷 If you use matrix-auth-service maybe it supports what you need though.20:42:56
@clokep:matrix.orgclokephttps://github.com/element-hq/synapse/issues/16508 is the issue you can follow though.20:43:24
@nex:nexy7574.co.uknex (-> @nex:transgender.ing) changed their profile picture.21:33:31
10 Dec 2024
@mat:tout.imMatMaul dear core synapse team, if someone can manage to have some brain cycles to finish this review. I am pretty sure you are all really busy, but it should be quite fast to finish, being a one-liner with an already existing (addressed πŸ™‚ ) review. I would be happy if it could be merged before 1.122 is cut. Thanks ! 14:15:33
@reivilibre.element:librepush.netOlivier 'reivilibre'that was my mistake, sorry, I think I was waiting on CI but forgot to get back to check it passed and then do the merge14:27:24
11 Dec 2024
@blackmad:matrix.orgDavid Blackman is there an easy way when running unittests via trial to increase the log level / especially with a specific pattern?10:49:36
10 Dec 2024
@nex:nexy7574.co.uknex (-> @nex:transgender.ing) changed their display name from nex (she/it) to nex (she/it) 🐟.15:18:42
11 Dec 2024
@andrewm:element.ioAndrew Morgan (anoa) David Blackman https://github.com/element-hq/synapse/blob/develop/docs/development/contributing_guide.md?plain=1#L227-L231 10:51:41
@blackmad:matrix.orgDavid Blackmanthanks, sorry I missed that, google was being really unhelpful10:56:10
@s7evink:matrix.orgTill Can I have some eyes on the changelog for v1.121.0 please? 14:16:52
@andrewm:element.ioAndrew Morgan (anoa)no worries!14:17:16
@andrewm:element.ioAndrew Morgan (anoa)

Till I would bump:

This release candidate contains the security fixes from v1.120.2.

up until the Synapse 1.121.0 (2024-12-11) header, and then delete "New changes listed below.".

Otherwise LGTM!

14:18:26

Show newer messages


Back to Room ListRoom Version: 9