[musicbrainz-server] 14mwiencek opened pull request #3581 (03master…mbs-14075): MBS-14075: Adjust `edits_pending` for entities with open relationship edits https://github.com/metabrainz/musicbrainz-server/…
lucifer: i've tried to use the endpoints to use cliend id & secrest dynamically! but somtimes i get auth_url and somtimes getting this error... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/aeADhYtUSCJxUNRRhgiiuSqX>)
2025-06-24 17509, 2025
mamanullah7[m]
i think ive to wait now! again for testing limit reached per one day!!
2025-06-24 17509, 2025
mamanullah7[m]
when first i redirected to authorise i got error: invalid access token! something like that!
2025-06-24 17527, 2025
allen joined the channel
2025-06-24 17505, 2025
Maxr1998_ joined the channel
2025-06-24 17517, 2025
Maxr1998 has quit
2025-06-24 17521, 2025
reosarevok[m]
Jade, aerozol, julian45: heh, just noticed a small issue with the moving-to-automated-email option for autoeditor elections. Right now we link to the *forum* thread where the proposer explains why they think the person should be an autoeditor.
2025-06-24 17548, 2025
reosarevok[m]
But that's not really something that can be automated, unless we require a forum thread link when proposing someone and store it in the database...
2025-06-24 17530, 2025
reosarevok[m]
The current template:
2025-06-24 17532, 2025
reosarevok[m] sent a code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/VVlOlocbPFVDMEJtjYwSekEb
2025-06-24 17516, 2025
julian45[m]
that doesn't seem like too much of a lift IMO
2025-06-24 17535, 2025
julian45[m]
if discourse supports some form of delegated auth or "seeding" harmony-style, maybe one possible path would be to create the post as part of the election initiation process, in a somewhat automated manner? (delegated auth = discourse programmatically posts on user's behalf after obtaining consent, seeding = flow where user is redirected to discourse to create a post, then once the post is up it redirects back to MB to proceed with
2025-06-24 17535, 2025
julian45[m]
the rest of the initiation process)
2025-06-24 17532, 2025
julian45[m]
but if neither of those is possible, it may be simplest to just require a link to forum post when nominating, then simply have the nominator update their forum post w/ the MB election link once the election has begun?
2025-06-24 17518, 2025
Jade[m]1
Would be a bit more complex, but is possible
2025-06-24 17548, 2025
Jade[m]1
I could also change the process a bit so that the thread is started by a bot, if delegation doesn't work
2025-06-24 17557, 2025
Jade[m]1
s/I//
2025-06-24 17536, 2025
reosarevok[m]
I mean, if we just have a bot-started thread, then we might as well just send the mail :)
2025-06-24 17542, 2025
reosarevok[m]
(and link to the election directly)
2025-06-24 17508, 2025
reosarevok[m]
We currently point to the thread because it involves the proposer giving proper reasonings and whatnot
2025-06-24 17553, 2025
reosarevok[m]
I mean, I guess in a way it would be like the old way (where the election sent an automated email to the elections mailing list and the proposer wrote back with their reasoning)
2025-06-24 17522, 2025
reosarevok[m]
It's just easier to skip responding to a forum thread which doesn't come to your email (but that might be me being old and thinking people read and react to their emails more than browser stuff)
2025-06-24 17509, 2025
Jade[m]1
reosarevok[m]: Could have it so the proposer puts the reasoning in the proposal directly
2025-06-24 17547, 2025
Jade[m]1
reosarevok[m]: I mean this is always an "it depends" thing lol
2025-06-24 17505, 2025
reosarevok[m]
Back in the day it wasn't because there weren't other options 😂
2025-06-24 17532, 2025
reosarevok[m]
Jade[m]1: Hmm, maybe. I was thinking about avoiding code changes as much as possible but that could work I guess - we'd still need to figure a good way to post to the thread but I *assume* discourse offers something
2025-06-24 17559, 2025
reosarevok[m]
(code changes to MBS itself other than "send email" I meant)
2025-06-24 17517, 2025
reosarevok[m]
I would like aerozol to think about how the process could look like from the proposer's POV when around :)
2025-06-24 17507, 2025
reosarevok[m]
Jade: do I understand correctly that I don't enter strings in the template itself, but in `en.json`?
2025-06-24 17523, 2025
reosarevok[m]
(doing a first attempt at converting the template to the rust version)
kellnerd[m]: I guess we could also do that, it would mean any elections started without a post get ignored entirely but that already happens now, so
2025-06-24 17521, 2025
Jade[m]1
kellnerd[m]: I have no idea, but that did make me think of webhooks
2025-06-24 17554, 2025
reosarevok[m]
We do still want to send a message on closing though... I do wonder if a combination of the two approaches would make the most sense, if we can do the discourse thing properly
2025-06-24 17535, 2025
reosarevok[m]
Automatically starting the thread (proposer gives reasoning during proposal on the site and it gets posted) and automatically posting a "congrats" or "sorry but nope" email on closing
2025-06-24 17543, 2025
reosarevok[m]
s/email/post/
2025-06-24 17520, 2025
reosarevok[m]
(ideally on accepting results the editor would also be added to the autoeditors group)
2025-06-24 17545, 2025
reosarevok[m]
[all of these things remind me of why we just ignored it and kept making me send the emails by hand 😅]
2025-06-24 17505, 2025
Jade[m]1
reosarevok[m]: Yeah that makes sense
2025-06-24 17555, 2025
Jade[m]1
Discourse doesn't seem to have a nice flow like: app redirects to discourse -> user makes post -> app gets post ID
2025-06-24 17521, 2025
Jade[m]1
So I think the simplest solution would just be to have a bot account that takes in some markdown from the form
2025-06-24 17540, 2025
reosarevok[m]
But doesn't that have the same issue?
2025-06-24 17548, 2025
reosarevok[m]
If we don't get the post id, I mean
2025-06-24 17517, 2025
Jade[m]1
reosarevok[m]: Hmm?
2025-06-24 17548, 2025
Jade[m]1
reosarevok[m]: If that flow existed, you could just not start the election until we got a valid link
2025-06-24 17509, 2025
reosarevok[m]
If the bot posts, we still need the post id to save it and post to the same thread on closing, no?
2025-06-24 17539, 2025
reosarevok[m]
(I mean, I guess we could, if nothing else works, just make a second post on closing)
2025-06-24 17558, 2025
Jade[m]1
reosarevok[m]: What I would expect is that the create post endpoints returns the post ID
2025-06-24 17505, 2025
Jade[m]1
That's the normal style for these things
2025-06-24 17511, 2025
Jade[m]1
Looking for the endpoint now
2025-06-24 17505, 2025
Jade[m]1
<Jade[m]1> "What I would expect is that..." <- Yep this seems right
2025-06-24 17558, 2025
Jade[m]1
Jade[m]1: POST /posts.json... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/zhaPZICvbyqIhfEWzRjEznjC>)
2025-06-24 17557, 2025
Jade[m]1 sent a json code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/NEUoDnAiTcALjoeQNgPwxqKk
2025-06-24 17525, 2025
Jade[m]1
Jade[m]1: > <@jade:ellis.link> POST /posts.json... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/LKIwPsJTrsSxyGkcySHLlGww>)
2025-06-24 17524, 2025
Jade[m]1
Could also set rely_to_post_numher to make it link back to that first post
2025-06-24 17531, 2025
reosarevok[m]
Sounds sensible. I wonder if it's possible to make discourse forcibly mail people even if they have not set up a mail preference?
2025-06-24 17556, 2025
Jade[m]1
Probably not xD
2025-06-24 17515, 2025
Jade[m]1
Or at least not for a specific post
2025-06-24 17559, 2025
reosarevok[m]
For the autoeditors category as kellnerd suggested, I was thinking
2025-06-24 17530, 2025
vardhan_ joined the channel
2025-06-24 17525, 2025
vardhan has quit
2025-06-24 17544, 2025
lucifer[m]
[@m.amanullah7:matrix.org](https://matrix.to/#/@m.amanullah7:matrix.org) okay I see what's happening, do this. If the database already has a funkwhale server for the given host url even if a different user, reuse that client id and client secret.
2025-06-24 17509, 2025
lucifer[m]
I'll a database schema change later to make this simpler.
2025-06-24 17553, 2025
lucifer[m]
[@holycow23:matrix.org](https://matrix.to/#/@holycow23:matrix.org) I see, I'll try to reproduce the issue and fix it today.
2025-06-24 17519, 2025
mamanullah7[m]
lucifer[m]: Sure!
2025-06-24 17500, 2025
rayyan_seliya123
hey lucifer: I noticed that in my latest push I am not using any models for my indexer implementation and not importing it in my indexer script though it is still present in `models.py` I was thinking should we remove this unused models as of now or keep it ? what would you prefer because the IA metadata is so variable and we are using flexible `dict/SQL` approach, so what would you prefer and any updates on my PR ??
2025-06-24 17543, 2025
mayhem[m]
julian45: how about the VM? can we nuke it yet?
2025-06-24 17557, 2025
julian45[m]
yep, go ahead and nuke
2025-06-24 17509, 2025
mayhem[m]
oki
2025-06-24 17530, 2025
julian45[m]
💥
2025-06-24 17517, 2025
mayhem[m]
that was authtestbox VM, yes?
2025-06-24 17522, 2025
julian45[m]
yep
2025-06-24 17501, 2025
mayhem[m]
done.
2025-06-24 17552, 2025
julian45[m] uploaded an image: (31KiB) < https://matrix.chatbrainz.org/_matrix/media/v3/download/julian45.net/Ut7RJmRi13TS7W9yOmdFOtRR3sky0VTw/ima_8bb9ff2.jpeg >
2025-06-24 17510, 2025
mayhem[m] jumps
2025-06-24 17529, 2025
reosarevok[m]
Now I remembered another reason why we mail - there's 100 people in the autoeditors discourse group, and 250 or so autoeditors total
2025-06-24 17544, 2025
reosarevok[m]
On the other hand, I suspect autoeditors who do vote are mostly going to be the ones who have a discourse account
2025-06-24 17501, 2025
reosarevok[m]
And would not be opposed to just say "sorry, you don't hear of elections if you're not on discourse"
2025-06-24 17552, 2025
reosarevok[m]
Left a quick summary of what we talked plus a chatlog link in MBS-14066 for now
lucifer: Hello! Talking to ansh right now about the recording page, and we were wondering if we already have listening stats at the recording level, specifically the "top listeners" stats we have on entity pages
2025-06-24 17543, 2025
lucifer[m]
monkey: nope
2025-06-24 17553, 2025
monkey[m]
Thanks, we suspected as much, thanks for confirming
2025-06-24 17524, 2025
ansh[m]
lucifer: Where do we have the cache tables hosted? Wanted to check what all information we have for a specific recording
Can I directly check it from the db in gaga / jimmy ?
2025-06-24 17523, 2025
lucifer[m]
there is mapping.mb_metadata_cache table in gaga but the data present in it might not necessarily be available to spark.
2025-06-24 17503, 2025
Jade[m]1
<reosarevok[m]> "Left a quick summary of what..." <- What's the actual flow for elections? AFAICT... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/aBPFQTIMJRqiLxgiCveAzlvM>)
2025-06-24 17543, 2025
Jade[m]1
Jade[m]1: > <@jade:ellis.link> What's the actual flow for elections? AFAICT... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/rCWjaEzKmnUWkURVKLTGOego>)
2025-06-24 17514, 2025
lucifer[m]
holycow23: hi! i figured how to fix the issue you were facing.
2025-06-24 17508, 2025
lucifer[m]
hadoop is not installed on wolf, outside the docker container. so either hadoop needs to be installed here or you need to run pyspark inside the docker container.
lucifer[m] sent a code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/YLyXzXqyWCETiroVDjOxpAnr
2025-06-24 17552, 2025
lucifer[m]
because you are running inside the docker container, you don't need to set the HDFS_CLUSTER_URI or HDFS_HTTP_URI manually.
2025-06-24 17516, 2025
lucifer[m]
but i do have concerns about your query in general.
2025-06-24 17541, 2025
lucifer[m]
let me know when you are around and we should discuss genre stats with monkey and ansh.
2025-06-24 17520, 2025
lucifer[m]
the issue is you are grouping listens based on time brackets into 0-6, 6-12, 12-18, 18-24 but these timestamps are always UTC timestamps. not timestamps in the user's local timezone.
2025-06-24 17531, 2025
lucifer[m]
so the time grouping won't make sense for most users, for say you and me who are based in India, the morning bracket calculated by the query will be actually our afternoon and so on.
2025-06-24 17556, 2025
lucifer[m]
this can be fixed for users who have a time zone so either you would need to restrict this stat to users who have a time zone or at least show them a warning on frontend that they need to set the time zone for this to work properly.
2025-06-24 17533, 2025
lucifer[m]
but even then they would be multiple changes required to bring time zone data from LB server to spark and merge that with listens.
2025-06-24 17515, 2025
lucifer[m]
one possible way you could implement this is to aggregate it on an hourly basis in spark instead of 6 hours basis. and then let the frontend do the bucketing.
2025-06-24 17556, 2025
lucifer[m]
the frontend has access to the user's/browser's local time zone and that's what we do for daily activity as well.
2025-06-24 17504, 2025
lucifer[m]
* daily activity stats as well.
2025-06-24 17543, 2025
reosarevok[m]
Ah, timezones. It's always timezones.
2025-06-24 17540, 2025
Maxr1998_ has quit
2025-06-24 17553, 2025
Maxr1998 joined the channel
2025-06-24 17515, 2025
pite joined the channel
2025-06-24 17507, 2025
holycow23[m]
<lucifer[m]> "the issue is you are grouping..." <- yes I did think of this so I was thinking that during creation of stats from user DB I can get the country and then the corresponding timezone and then generate stats
2025-06-24 17527, 2025
q3lont joined the channel
2025-06-24 17518, 2025
holycow23[m]
<lucifer[m]> "because you are running inside..." <- did it work tho like the entire setup?
2025-06-24 17527, 2025
holycow23[m]
will run it later tonight
2025-06-24 17535, 2025
lucifer[m]
yes the setup worked.
2025-06-24 17546, 2025
holycow23[m]
<lucifer[m]> "one possible way you could..." <- okay
2025-06-24 17559, 2025
holycow23[m]
lucifer[m]: damn, didnt expect it to run in one go
2025-06-24 17510, 2025
lucifer[m]
holycow23[m]: that won't work, most users don't have a timezone set in LB.
2025-06-24 17535, 2025
holycow23[m]
lucifer[m]: so for them we can make it default UTC and ask them to set the same to process properly?
2025-06-24 17516, 2025
lucifer[m]
yes that is possible but as i suggested before you could also do what we do for daily stats, send hourly data to frontend
2025-06-24 17522, 2025
lucifer[m]
and aggregate there.
2025-06-24 17532, 2025
holycow23[m]
is location like country not present for everyone in MB?
2025-06-24 17532, 2025
lucifer[m]
but that could result inaccurate stats yeah.
2025-06-24 17536, 2025
lucifer[m]
nope.
2025-06-24 17543, 2025
lucifer[m]
all data is optional.
2025-06-24 17557, 2025
holycow23[m]
i am confused how does hourly solve it?
2025-06-24 17509, 2025
lucifer[m]
the frontend has the timezone available
2025-06-24 17519, 2025
lucifer[m]
so the timezone is applied to the hours individually.
2025-06-24 17536, 2025
lucifer[m]
the frontend can access the user's local timezone from the browser.
2025-06-24 17547, 2025
holycow23[m]
oh okay got it
2025-06-24 17506, 2025
lucifer[m]
note that this way stats will be a bit inaccurate though.