#metabrainz

/

      • alastairp
        hmm, ok. I can't remember who's done that in the past
      • 2023-01-24 02402, 2023

      • lucifer
        mayhem, yvanzo: sure. took a look, we don't accept these urls from users so can close without action.
      • 2023-01-24 02414, 2023

      • mayhem
        nice.
      • 2023-01-24 02418, 2023

      • yvanzo
        lucifer: Is troi-recommendation-playground taking any user input at all?
      • 2023-01-24 02417, 2023

      • Freso
        alastairp: Leo_Verto is the OG one, but I believe someone else did it since, but I can’t remember who. I haven’t done anything on botbot that requires backend access, only things that can be done via the frontend admin UI. I also have no idea what is and isn’t documented, since I have never had syswiki access.
      • 2023-01-24 02418, 2023

      • yvanzo
        Never mind, there could be some vulnerability not based on user input, so it’s probably better not to completely ignore security alerts for this repository.
      • 2023-01-24 02444, 2023

      • lucifer
        yvanzo: yes, but none that is passed to spotipy.
      • 2023-01-24 02446, 2023

      • lucifer
        yes makes sense
      • 2023-01-24 02453, 2023

      • alastairp
        Freso: nothing is documented. I didn't even know there was a frontend admin. Could you write some notes about it?
      • 2023-01-24 02431, 2023

      • Freso
        Huh. I was sure someone said they’d written some docs on how to restart it etc. :\ Yeah, I can try and do that.
      • 2023-01-24 02447, 2023

      • alastairp
        sure, there is a single line of "run this command to restart the bot"
      • 2023-01-24 02455, 2023

      • alastairp
        but in terms of how it's set up and configured, nothing else
      • 2023-01-24 02459, 2023

      • Freso
        Oh, great.
      • 2023-01-24 02429, 2023

      • alastairp
        zas: hi, I'm looking on nomo and can't find any borg backups running (i.e. there is no backup for chatlogs). Are you able to confirm if that's the case? can you do initial setup? I'll write a backup script for it
      • 2023-01-24 02455, 2023

      • Etua has quit
      • 2023-01-24 02458, 2023

      • zas
        alastairp: this server still runs on 14.04 ? I never managed this instance, but yes, there's no backup using borg for sure.
      • 2023-01-24 02404, 2023

      • alastairp
        zas: yes, still on 14.04. We discussed a while back to get it on a new VM and put it in docker but it's always been a low-priority tasks
      • 2023-01-24 02415, 2023

      • alastairp
        maybe pending the creation of VM ansible setup scripts, if I recall correctly?
      • 2023-01-24 02436, 2023

      • zas
        Perhaps time to migrate this to something recent (and managed)? We could create a new VM in Hetzner cloud and manage it using Ansible. I don't know what's running on this instance (and btw, I don't have access to it via ssh right now)
      • 2023-01-24 02459, 2023

      • alastairp
        interesting, mayhem also couldn't log in last week (even after I updated his ssh key)
      • 2023-01-24 02423, 2023

      • alastairp
        I'm happy to try and migrate it this week and document it
      • 2023-01-24 02434, 2023

      • alastairp
        (keeping in mind that my approximate last day for a while will be on next Tuesday)
      • 2023-01-24 02406, 2023

      • zas
        It doesn't look to need much resources
      • 2023-01-24 02412, 2023

      • reosarevok
        alastairp: argh, the search ?query parameter is even worse than ?inc :/
      • 2023-01-24 02408, 2023

      • zas
        alastairp: I can set up a new VM for it tomorrow, along a new name and Ansible config, so we can migrate to it before the end of this week
      • 2023-01-24 02416, 2023

      • alastairp
        thanks zas
      • 2023-01-24 02415, 2023

      • reosarevok
        Since that's not even an enum of strings, it contains a set of subparameters each with its own values
      • 2023-01-24 02417, 2023

      • yvanzo
        lucifer: Thanks, I updated the automation rules for SEC accordingly.
      • 2023-01-24 02423, 2023

      • reosarevok
        I wonder if the API even supports that
      • 2023-01-24 02435, 2023

      • reosarevok
        s/the API/OpenAPI/
      • 2023-01-24 02458, 2023

      • alastairp
        reosarevok: yeah, I found... one sec
      • 2023-01-24 02434, 2023

      • reosarevok
        Ooh, wait
      • 2023-01-24 02438, 2023

      • reosarevok
        I guess I'd want "object"?
      • 2023-01-24 02441, 2023

      • reosarevok
        Rather than array?
      • 2023-01-24 02403, 2023

      • reosarevok waits one sec :)
      • 2023-01-24 02408, 2023

      • alastairp
      • 2023-01-24 02429, 2023

      • alastairp
        see the "Query Parameters" table, with the different values of 'style' and 'explode'
      • 2023-01-24 02441, 2023

      • alastairp
        unfortunately there seems to be this limited number of combinations and formats
      • 2023-01-24 02408, 2023

      • alastairp
        "accept one of these exact formats and you can document it like this! but if you have a slightly differnt format then tough"
      • 2023-01-24 02407, 2023

      • reosarevok
        Hmm
      • 2023-01-24 02410, 2023

      • alastairp
        zas: will new VM have consul config? the bot seems to have a bunch of private configuration which seems to just be in a non-committed file.
      • 2023-01-24 02441, 2023

      • alastairp
        code repos are public, so we can't put them there. So I guess options are to use consul, or put config in docker-server-configs (maybe as env variables to the start function?)
      • 2023-01-24 02448, 2023

      • smach joined the channel
      • 2023-01-24 02414, 2023

      • mayhem
        lucifer: poing
      • 2023-01-24 02417, 2023

      • mayhem
        -o
      • 2023-01-24 02437, 2023

      • reosarevok
        "https://musicbrainz.org/ws/2/artist?query=area,France,artist,Dans" is so close to actually being useful, sigh
      • 2023-01-24 02444, 2023

      • lucifer
        mayhem: pong
      • 2023-01-24 02458, 2023

      • alastairp
        reosarevok: I know, right? :(
      • 2023-01-24 02424, 2023

      • mayhem
        I'm realizing that I need "popular tracks" indexed by artist to really evaluate the similar artist data.
      • 2023-01-24 02438, 2023

      • vibhoo_24 joined the channel
      • 2023-01-24 02443, 2023

      • zas
        alastairp: cannot this service run on an existing server? It doesn't seem to me it uses a lot of resources
      • 2023-01-24 02444, 2023

      • reosarevok
        alastairp: I guess I need to make this a free string parameter and let people construct their stuff for now?
      • 2023-01-24 02412, 2023

      • mayhem
        so I looked to just run that "simple" query on gaga. except the queries are anything but simple and are taking loads of time to fetch even 30 days. sigh.
      • 2023-01-24 02429, 2023

      • mayhem
      • 2023-01-24 02456, 2023

      • mayhem
        I was going to post-process that data with python in ram and then spit the data into a table on wolf's MB DB.
      • 2023-01-24 02408, 2023

      • mayhem
        but, clearly this needs to be done on spark.
      • 2023-01-24 02411, 2023

      • alastairp
        zas: I guess so? Are we happy with running an outgoing IRC connection from a regular server?
      • 2023-01-24 02435, 2023

      • mayhem
        how difficult would it be for you to just run such a query and produce a file dump? there isn't a REPL for spark, is there?
      • 2023-01-24 02430, 2023

      • Etua joined the channel
      • 2023-01-24 02419, 2023

      • yvanzo
        Freso: I can’t like the same post twice on Discourse, so thank you again for having posted yesterday’s meeting notes already; it’s ideal to keep the community in touch with the ongoing work.
      • 2023-01-24 02422, 2023

      • zas
        alastairp: it doesn't listen on a port, right?
      • 2023-01-24 02408, 2023

      • reosarevok
        "Queries are represented as a free-text string due to current OpenAPI limitations; you will need to construct your query string by hand, such as "area:France AND type:group"."
      • 2023-01-24 02415, 2023

      • reosarevok cries and adds that to the description
      • 2023-01-24 02429, 2023

      • alastairp
        zas: correct, only outgoing. The chatlogs viewer is nginx/uwsgi like existing webapps
      • 2023-01-24 02407, 2023

      • zas
        so I guess we can integrate this as any other webapps, using gateways
      • 2023-01-24 02416, 2023

      • alastairp
        👍
      • 2023-01-24 02423, 2023

      • alastairp
        I'm just finishing the dockerification now
      • 2023-01-24 02416, 2023

      • lucifer
        mayhem: sure can do later today. we do have a repl but no docs on how to use it 😓
      • 2023-01-24 02434, 2023

      • mayhem
        sweet, thanks
      • 2023-01-24 02458, 2023

      • reosarevok
        bitmap, yvanzo: when you have some time, could you look into https://github.com/metabrainz/musicbrainz-server/… ? It's effectively documentation, and it would be nice to, for example, link to the gender/types lists to document the API rather than listing the values by hand or linking to a possibly outdated wiki
      • 2023-01-24 02407, 2023

      • CatQuest
        🐟
      • 2023-01-24 02430, 2023

      • smach has quit
      • 2023-01-24 02456, 2023

      • reosarevok
        👩 💍
      • 2023-01-24 02406, 2023

      • CatQuest
        girl ring?
      • 2023-01-24 02409, 2023

      • reosarevok
        (it's a her-ring)
      • 2023-01-24 02413, 2023

      • reosarevok hides
      • 2023-01-24 02414, 2023

      • CatQuest
        ...
      • 2023-01-24 02433, 2023

      • CatQuest
        👏
      • 2023-01-24 02435, 2023

      • CatQuest
        👏
      • 2023-01-24 02436, 2023

      • CatQuest
        👏
      • 2023-01-24 02430, 2023

      • BrainzGit
        [listenbrainz-server] 14MonkeyDo opened pull request #2343 (03master…combine-pins-feedback): Combine pins and love/hate tabs https://github.com/metabrainz/listenbrainz-server…
      • 2023-01-24 02433, 2023

      • rishav_a2z joined the channel
      • 2023-01-24 02413, 2023

      • Etua has quit
      • 2023-01-24 02434, 2023

      • rozlav has quit
      • 2023-01-24 02421, 2023

      • reosarevok
        alastairp: https://github.com/metabrainz/musicbrainz-server/… is probably the best I can do with the query bits then... (if you want to check it in an online editor, there's a bundled .json file in there)
      • 2023-01-24 02431, 2023

      • reosarevok
        I guess next step would be to document responses
      • 2023-01-24 02422, 2023

      • reosarevok
        No way to match responses specifically to the format parameter, sadly, but it seems we can have two responses and say it's one of the two and it should be fairly self-explanatory that one is XML and one is JSON, really...
      • 2023-01-24 02441, 2023

      • rishav_a2z has quit
      • 2023-01-24 02415, 2023

      • reosarevok
        In any case it still feels a lot more clear than the wiki docs
      • 2023-01-24 02404, 2023

      • alastairp
        !m reosarevok
      • 2023-01-24 02404, 2023

      • BrainzBot
        You're doing good work, reosarevok!
      • 2023-01-24 02434, 2023

      • mayhem
        monkey: ping.
      • 2023-01-24 02445, 2023

      • monkey
        pong
      • 2023-01-24 02450, 2023

      • monkey
        latency not too bad in the train
      • 2023-01-24 02455, 2023

      • jivte joined the channel
      • 2023-01-24 02457, 2023

      • mayhem
        nice. :)
      • 2023-01-24 02403, 2023

      • mayhem
        back on react learning.
      • 2023-01-24 02432, 2023

      • mayhem
        I've added a button for the top row example art pieces. I'm capturing the click event from the button in a callback.
      • 2023-01-24 02433, 2023

      • jivte_ joined the channel
      • 2023-01-24 02456, 2023

      • mayhem
        now I need to have that call a callback to its parent in order to pass the message that a different tile has been clicked.
      • 2023-01-24 02400, 2023

      • mayhem
        is that the right approach?
      • 2023-01-24 02417, 2023

      • mayhem
        its the tricky part where we need to store state once, but we have two components for it.
      • 2023-01-24 02450, 2023

      • monkey
        That is the right approach in this case
      • 2023-01-24 02424, 2023

      • mayhem
        ok, cool. any tips or reference for setting up this call back? does it get setup in the tile object or in the parent of it all?
      • 2023-01-24 02425, 2023

      • monkey
        You're basically implementing a callback prop on your child component.
      • 2023-01-24 02445, 2023

      • mayhem
        A callback that is passed via a prop?
      • 2023-01-24 02424, 2023

      • mayhem
        I have this in my top level function
      • 2023-01-24 02426, 2023

      • mayhem
      • 2023-01-24 02429, 2023

      • monkey
        So I'm going to assume Parent is the one who holds the state. Is Child the thumbnail you click on, or is there another layer in-between?
      • 2023-01-24 02435, 2023

      • mayhem
        correct.
      • 2023-01-24 02443, 2023

      • mayhem
        no layer in between
      • 2023-01-24 02404, 2023

      • mayhem
        can I pass the updateStyleCallback in the props to the tiles?
      • 2023-01-24 02415, 2023

      • monkey
        OK. So Child will define a prop it accepts, `onStyleSelect` for example.
      • 2023-01-24 02454, 2023

      • monkey
        The real question here is what are you passing back and forth? It'll get messy quickly, so I would suggest using an enum and always using this enum
      • 2023-01-24 02459, 2023

      • jivte has quit
      • 2023-01-24 02417, 2023

      • mayhem
        ok, create enum, no probs.
      • 2023-01-24 02430, 2023

      • monkey
        So not sure what `value` was meant to be in the example above, but you'll want something a bit more complex
      • 2023-01-24 02441, 2023

      • monkey
        Let me fish out some typescript enum docs for you.
      • 2023-01-24 02458, 2023

      • mayhem
        value, will be the enum, the ID (string value) of the style.
      • 2023-01-24 02456, 2023

      • CatQuest
        hre's a typical example of the megareleaseevent mess: https://musicbrainz.org/edit/94518303
      • 2023-01-24 02410, 2023

      • CatQuest
        and why the "but excluded!" arguemnt doesnt hold water for many reasons
      • 2023-01-24 02418, 2023

      • CatQuest
        (agian making hee that in some caes it *does* mind)
      • 2023-01-24 02419, 2023

      • monkey
        In short, you'll need something like `MyStyleEnum[event.target.name]`, where event.target.name is the `name="blablabla` property of the HTML element. You'll want to check that `MyStyleEnum[event.target.name]` does indeed exist before you call `setStyle` with it.
      • 2023-01-24 02457, 2023

      • monkey
        The docs on the typescript website are actually pretty good: https://www.typescriptlang.org/docs/handbook/enum…
      • 2023-01-24 02459, 2023

      • rozlav joined the channel
      • 2023-01-24 02416, 2023

      • mayhem
        k, let me dig in, thanks.
      • 2023-01-24 02409, 2023

      • monkey
        mayhem: Got disconnected, soz. And so in Child, your click callback should look something like that:
      • 2023-01-24 02415, 2023

      • monkey
      • 2023-01-24 02445, 2023

      • monkey
        Haven't tested the code, but it's the gist of it
      • 2023-01-24 02419, 2023

      • mayhem
        hmm. right now my child call back looks like this:
      • 2023-01-24 02421, 2023

      • mayhem
      • 2023-01-24 02452, 2023

      • mayhem
        its a button, not a select. your code reads to me as if you're expecting a dropdown.
      • 2023-01-24 02458, 2023

      • monkey
        `React.MouseEvent<HTMLElement>` instead of React.MouseEventHandler
      • 2023-01-24 02434, 2023

      • monkey
        And then you just need to make sure you use the enum for the dropdown state as well
      • 2023-01-24 02416, 2023

      • monkey
        Negative, not a dropdown. That being said, where is the style name?
      • 2023-01-24 02448, 2023

      • monkey
        My code expects a `name="xyz"` html attribute on the button, but there are other better ways
      • 2023-01-24 02454, 2023

      • mayhem
        style names are now defined in the enum.
      • 2023-01-24 02426, 2023

      • monkey
        What are the props of GalleryTile?
      • 2023-01-24 02456, 2023

      • monkey
        If GalleryTile is passed the style name, then your handleClick function should use that.
      • 2023-01-24 02425, 2023

      • mayhem
        sorry, noms arrive. will you be around in 15?
      • 2023-01-24 02457, 2023

      • monkey
        Maybe 15:15, will try to find food in the fast metal snake
      • 2023-01-24 02415, 2023

      • mayhem
        k
      • 2023-01-24 02449, 2023

      • alastairbot joined the channel
      • 2023-01-24 02457, 2023

      • alastairp
        oh hi!
      • 2023-01-24 02453, 2023

      • Etua joined the channel
      • 2023-01-24 02408, 2023

      • mayhem
        monkey: meh, sorry there was a layer in between the tiles and the main object: the Gallery.
      • 2023-01-24 02427, 2023

      • mayhem
        does that mean that the callback just gets passed through that extra layer via the props?
      • 2023-01-24 02421, 2023

      • serial-ata joined the channel
      • 2023-01-24 02450, 2023

      • Etua has quit
      • 2023-01-24 02453, 2023

      • reosarevok
        bitmap was writing some docs on how we pass our dispatches around for multi-level mark... I mean state