#metabrainz

/

      • Pratha-Fish
        I tried cd-ing back and forth from the docker to the base folder too
      • 2022-07-25 20632, 2022

      • Pratha-Fish
      • 2022-07-25 20640, 2022

      • alastairp
        right
      • 2022-07-25 20647, 2022

      • alastairp
        this is actually a bug in the .sh file
      • 2022-07-25 20653, 2022

      • alastairp
        the -f flag says "load this file"
      • 2022-07-25 20658, 2022

      • alastairp
        but that file doesn't actually exist
      • 2022-07-25 20657, 2022

      • Pratha-Fish
        Oh wait, I noticed something else too.
      • 2022-07-25 20615, 2022

      • Pratha-Fish
        The actual file is "docker/docker-compose.labs.api.yml" but we ran "/docker/start-labs-api.sh"
      • 2022-07-25 20626, 2022

      • Pratha-Fish
        nvm I read it wrong
      • 2022-07-25 20648, 2022

      • alastairp
        right. the yml file is a config file, whereas the start script is a helper tool
      • 2022-07-25 20653, 2022

      • yellowhatpro
        Hii everyone !! Sorry for not being present for the standup..
      • 2022-07-25 20653, 2022

      • yellowhatpro
        For the last week's report, I was busy creating mockups and adding them to the musicbrainz android app, also did some failed attempts on animations.
      • 2022-07-25 20653, 2022

      • yellowhatpro
        Besides I got ill again, its really hot and humid here, can't keep up with this weather இ௰இ
      • 2022-07-25 20626, 2022

      • Pratha-Fish
        alastairp: looks like I wasn't completely wrong afterall
      • 2022-07-25 20644, 2022

      • Pratha-Fish
        the docker/start-labs-api.sh refers to a file called ```docker/docker-compose-labs-api.yml```
      • 2022-07-25 20606, 2022

      • Pratha-Fish
        Whereas the actual file in that folder is ```docker/docker-compose.labs.api.yml```
      • 2022-07-25 20609, 2022

      • alastairp
        Pratha-Fish: yep. that's a bug in the startup script
      • 2022-07-25 20632, 2022

      • Pratha-Fish
        is it also a potential PR opportunity? 👀
      • 2022-07-25 20642, 2022

      • alastairp
        so you can modify the startup script to refer to the correct file. you can open a pull request to fix this (make sure that you don't also commit your change to the -p flag)
      • 2022-07-25 20601, 2022

      • Pratha-Fish
        On it
      • 2022-07-25 20607, 2022

      • alastairp
        OK
      • 2022-07-25 20618, 2022

      • alastairp
        so let's try and get you up and runing first
      • 2022-07-25 20627, 2022

      • alastairp
        can you run the build script yet?
      • 2022-07-25 20613, 2022

      • Pratha-Fish
        Ah just a second, I just reseted the environment since I accidentally moved the .gitfile
      • 2022-07-25 20614, 2022

      • Pratha-Fish
        alastairp: It worked
      • 2022-07-25 20646, 2022

      • Pratha-Fish
        Replaced the file name, and ran ```./docker/start-labs-api.sh build```
      • 2022-07-25 20656, 2022

      • alastairp
        great
      • 2022-07-25 20620, 2022

      • alastairp
        ok, next thing we need to do is make a few changes to the docker-compose.labs.api.yml file
      • 2022-07-25 20648, 2022

      • alastairp
        first is the network name: `name: musicbrainzdocker_default` on the last line
      • 2022-07-25 20605, 2022

      • alastairp
        for reasons unknown to me, specifically on wolf this needs to be `musicbrainz-docker_default`
      • 2022-07-25 20621, 2022

      • alastairp
        second is the port, line 21
      • 2022-07-25 20647, 2022

      • alastairp
        this syntax means "make this service available on port 3000 publicly on the internet to anyone who wants to access it"
      • 2022-07-25 20622, 2022

      • alastairp
        we want to change the port so that you don't conflict with anyone else, and also adjust it so that we don't publicly make this service available. we can use port forwarding to access it
      • 2022-07-25 20640, 2022

      • alastairp
        so let's change it to `- "127.0.0.1:43000:80"`
      • 2022-07-25 20624, 2022

      • Pratha-Fish
        done
      • 2022-07-25 20640, 2022

      • Pratha-Fish
        I also changed the the name to musicbrainz-docker_default
      • 2022-07-25 20615, 2022

      • alastairp
        so, let's try and start it then
      • 2022-07-25 20624, 2022

      • alastairp
        ./docker/start-labs-api.sh up
      • 2022-07-25 20628, 2022

      • Pratha-Fish
      • 2022-07-25 20633, 2022

      • Pratha-Fish
        Error :D
      • 2022-07-25 20607, 2022

      • alastairp
        cool, good start
      • 2022-07-25 20620, 2022

      • alastairp
        we haven't followed the listenbrainz setup instructions to create the config file
      • 2022-07-25 20633, 2022

      • alastairp
        take listenbrainz/config.py.sample and copy it to listenbrainz/config.py
      • 2022-07-25 20652, 2022

      • alastairp
        there are 2 changes that we need to make, line 68
      • 2022-07-25 20658, 2022

      • alastairp
        TYPESENSE_HOST = "listenbrainz-typesense"
      • 2022-07-25 20604, 2022

      • alastairp
        TYPESENSE_API_KEY = "root-api-key"
      • 2022-07-25 20622, 2022

      • Pratha-Fish
        Done
      • 2022-07-25 20641, 2022

      • alastairp
        it should start now
      • 2022-07-25 20650, 2022

      • Pratha-Fish
        yes it started
      • 2022-07-25 20633, 2022

      • alastairp
        great
      • 2022-07-25 20644, 2022

      • alastairp
        now you'll have to forward a port to 43000
      • 2022-07-25 20645, 2022

      • Pratha-Fish
        It's also giving a 503 not found error (with nginx) when opened on my browser tho
      • 2022-07-25 20608, 2022

      • Pratha-Fish
        ^ 127.0.0.1:80 on my local machine
      • 2022-07-25 20655, 2022

      • alastairp
        hmm
      • 2022-07-25 20603, 2022

      • alastairp
        this setup doesn't have nginx in it
      • 2022-07-25 20612, 2022

      • Pratha-Fish
        Exactly haha
      • 2022-07-25 20613, 2022

      • alastairp
        so it seems like you might be pointing to a different nginx ;)
      • 2022-07-25 20646, 2022

      • Pratha-Fish
        I could be connected on some other service on wolf ig
      • 2022-07-25 20644, 2022

      • Pratha-Fish
        Alright, so I forwarded port 43000, and connected to localhost:43000
      • 2022-07-25 20646, 2022

      • Pratha-Fish
        It's working
      • 2022-07-25 20602, 2022

      • Pratha-Fish
      • 2022-07-25 20619, 2022

      • lucifer
        it was probably the nginx that runs https/le setup on wolf.
      • 2022-07-25 20625, 2022

      • Pratha-Fish
        alastairp: What next 👀
      • 2022-07-25 20641, 2022

      • alastairp
        oh
      • 2022-07-25 20642, 2022

      • alastairp
        that's it
      • 2022-07-25 20643, 2022

      • alastairp
        you're done
      • 2022-07-25 20652, 2022

      • alastairp
        click on mbid-mapping and try and do a search
      • 2022-07-25 20658, 2022

      • Pratha-Fish
        Wow that was fairly simple
      • 2022-07-25 20639, 2022

      • Pratha-Fish
        Alright, it worked with 1 query and didn't work with another
      • 2022-07-25 20615, 2022

      • Pratha-Fish
        1st was Eminem - Godzilla (Worked)
      • 2022-07-25 20615, 2022

      • Pratha-Fish
        2nd was SNÆK - Strawberry Bloom (didn't work)
      • 2022-07-25 20608, 2022

      • Pratha-Fish
        I added the SNÆK track a few weeks ago ig. It works on the original online hosted MBID Mapper, but doesn't work here
      • 2022-07-25 20645, 2022

      • lucifer
        the mapping indexes are probably not autoregenerated on wolf.
      • 2022-07-25 20653, 2022

      • alastairp
        right, but it giving out of date results is kind of unrelated
      • 2022-07-25 20653, 2022

      • PetrCBRCZ joined the channel
      • 2022-07-25 20659, 2022

      • alastairp
        we were just trying to get it running first :)
      • 2022-07-25 20600, 2022

      • lucifer
        in prod, a cron job regenerates those daily.
      • 2022-07-25 20614, 2022

      • alastairp
        tomorrow afternoon or wednesday I can regenerate them
      • 2022-07-25 20627, 2022

      • alastairp
        Pratha-Fish: OK, first issue I was going to give you to do
      • 2022-07-25 20640, 2022

      • alastairp
        see when you run a search, the recording mbid column is clickable?
      • 2022-07-25 20621, 2022

      • Pratha-Fish
        alastairp: yes it is 🥲
      • 2022-07-25 20627, 2022

      • PetrCBRCZ
        Hello guys. I'm have a question about cache in MB server ... how can i clean up whole cache so ws queries are newly constructed ? I'm using docker installation.
      • 2022-07-25 20652, 2022

      • alastairp
        ok, now go back to the main page, use explain-mbid-mapping, and do the same search. see that it's not clickable
      • 2022-07-25 20655, 2022

      • lucifer
        bitmap, yvanzo: ^
      • 2022-07-25 20628, 2022

      • Pratha-Fish
        alastairp: Oh I see
      • 2022-07-25 20646, 2022

      • alastairp
        Pratha-Fish: that's because this data is generated in a different place. it's debug info that lucifer added
      • 2022-07-25 20647, 2022

      • alastairp
      • 2022-07-25 20603, 2022

      • alastairp
        task 1: update this html table so that the MBIDs in the debug output are clickable
      • 2022-07-25 20645, 2022

      • Pratha-Fish
        Found it
      • 2022-07-25 20629, 2022

      • lucifer
        alastairp: if it helps, i can regenerate the indexes on wolf now.
      • 2022-07-25 20643, 2022

      • alastairp
        lucifer: sure, if you have time that'd be great thanks
      • 2022-07-25 20658, 2022

      • lucifer
        👍
      • 2022-07-25 20600, 2022

      • alastairp
        though as I mentioned, the current task is just to edit the output, so "up-to-date" results aren't super important
      • 2022-07-25 20619, 2022

      • Pratha-Fish
        Yep
      • 2022-07-25 20609, 2022

      • Pratha-Fish
        alastairp: can you also point out to the code for mbid-mapping?
      • 2022-07-25 20622, 2022

      • Pratha-Fish
        It'd be easier to cross reference that way
      • 2022-07-25 20623, 2022

      • alastairp
        Pratha-Fish: I think the mapping is actually in that same file
      • 2022-07-25 20630, 2022

      • alastairp
        lucifer: knows more about the mapping than me
      • 2022-07-25 20644, 2022

      • alastairp
        sorry, it's getting late here and I still haven't packed for tomorrow's trip, I think I'd better go
      • 2022-07-25 20614, 2022

      • Pratha-Fish
        alastairp: Sure, till then I'll try to come up something on my own.
      • 2022-07-25 20617, 2022

      • Pratha-Fish
        See you later :D
      • 2022-07-25 20618, 2022

      • lucifer
        Pratha-Fish: explain mbid mapping and mbid mapping share the same code, except for this particular output.
      • 2022-07-25 20632, 2022

      • lucifer
        (and a couple of flags to add debug etc)
      • 2022-07-25 20640, 2022

      • alastairp
        lucifer: oh, might be worth showing him the dataset code definitions
      • 2022-07-25 20651, 2022

      • lucifer
        sure will share
      • 2022-07-25 20623, 2022

      • Pratha-Fish
        lucifer: that's interesting. I wonder why one comes with hyperlilnks and the other doesnt 👀
      • 2022-07-25 20652, 2022

      • alastairp
        it's because there are two very distinct bits of code that generate these tables
      • 2022-07-25 20607, 2022

      • lucifer
        Pratha-Fish: for mbid-mapping, the dataset hoster reads the results returned by the query and formats those using: https://github.com/metabrainz/data-set-hoster/blo…
      • 2022-07-25 20627, 2022

      • lucifer
      • 2022-07-25 20642, 2022

      • lucifer
        i.e the data returned from L294 here
      • 2022-07-25 20608, 2022

      • lucifer
        whereas for explain-mbid-mapping the data inside _log is directly read and displayed as is.
      • 2022-07-25 20618, 2022

      • alastairp
      • 2022-07-25 20630, 2022

      • alastairp
        this is the "normal" workflow, which has the links
      • 2022-07-25 20631, 2022

      • yuzie
        lucifer: changing the API_URL solved my problem. Thanks!
      • 2022-07-25 20649, 2022

      • lucifer
        yuzie: awesome! 👍
      • 2022-07-25 20644, 2022

      • Pratha-Fish
        I see
      • 2022-07-25 20657, 2022

      • Pratha-Fish
        lucifer: Could you specify a link example for the explain-mbid-mapping thing?
      • 2022-07-25 20613, 2022

      • lucifer
        Pratha-Fish: for the explain-mbid-mapping, notice that it is wrapped inside a `Markup` block (https://flask.palletsprojects.com/en/2.1.x/api/?h…) This is basically a way of telling flask that render the html inside it as is.
      • 2022-07-25 20640, 2022

      • lucifer
        L273-L292 of the mbid mapper file already is a html table.
      • 2022-07-25 20654, 2022

      • lucifer
        the easiest fix would be to hard code `a` hyperlinks there.
      • 2022-07-25 20622, 2022

      • Pratha-Fish
        Right, I see the Markup(""".""") code block there
      • 2022-07-25 20606, 2022

      • lucifer
        i.e. replace `<td>{hit['document']["recording_mbid"]}</td>` with something like `<td><a href="https://musicbrainz.org/recording/{mbid…
      • 2022-07-25 20657, 2022

      • lucifer
        that's exactly what we do in dataset hoster, https://github.com/metabrainz/data-set-hoster/blo…
      • 2022-07-25 20600, 2022

      • Pratha-Fish
        lucifer: right, but how does here looks like we're removing the "hit['document"
      • 2022-07-25 20640, 2022

      • Pratha-Fish
        *"hit['document']["recording_mbid"]" code. Wouldn't it affect the output?
      • 2022-07-25 20652, 2022

      • Pratha-Fish
        (*advserly affect)
      • 2022-07-25 20654, 2022

      • lucifer
        Pratha-Fish: ah no, sorry for confusion. the variable name will rename, i just shortened it to avoid typing out some characters.
      • 2022-07-25 20657, 2022

      • lucifer
      • 2022-07-25 20627, 2022

      • Pratha-Fish
        Also another doubt. Could we just edit the <td> tag with something like <td href='link'> instead?
      • 2022-07-25 20637, 2022

      • lucifer
        sure
      • 2022-07-25 20604, 2022

      • alastairp
        html doesn't work like that :)
      • 2022-07-25 20608, 2022

      • alastairp
        needs to be in an <a>
      • 2022-07-25 20616, 2022

      • Pratha-Fish
        Ahhhh
      • 2022-07-25 20649, 2022

      • Pratha-Fish
        alright I'll move ahead with the code lucifer suggested
      • 2022-07-25 20650, 2022

      • lucifer
        oh, and here i was searching stackoverflow to see if td supported href lol
      • 2022-07-25 20624, 2022

      • Pratha-Fish
        lucifer: that's exactly what I was looking at lol. I checked the question and forgot to check the answers underneath it
      • 2022-07-25 20634, 2022

      • Pratha-Fish
        lucifer: For some reason, flask isn't doing the "* Detected change in '/code/listenbrainz/listenbrainz/mbid_mapping_writer/mbid_mapper.py'" thing and refreshing the html
      • 2022-07-25 20625, 2022

      • Pratha-Fish
        P.S. Looks like it's getting pretty late. I'll try something out tomorrow morning, and let you know if I face any issues :)
      • 2022-07-25 20642, 2022

      • lucifer
        Pratha-Fish: its possible that the flask setup is incorrect . probably need to restart the container.
      • 2022-07-25 20644, 2022

      • lucifer
        👍
      • 2022-07-25 20644, 2022

      • Pratha-Fish
        lucifer: actually I accidentally edited another file, and it did the refresh. But for some reason it's just not working for the intended file
      • 2022-07-25 20609, 2022

      • Pratha-Fish
        nvm, let's look at it tomorrow with a fresh outlook
      • 2022-07-25 20620, 2022

      • lucifer
        huh weird indeed.
      • 2022-07-25 20601, 2022

      • Pratha-Fish
        lucifer: oh wait it worked
      • 2022-07-25 20619, 2022

      • Pratha-Fish
        Should I also hyperlink other columns?
      • 2022-07-25 20603, 2022

      • lucifer
        yes, please add hyperlinks to all of those which make
      • 2022-07-25 20647, 2022

      • Pratha-Fish
        OMW to link release MBID and artist_credit_id
      • 2022-07-25 20655, 2022

      • Pratha-Fish
        looks like the artist_credit_id links to ```https://musicbrainz.org/artist/2617509``` instead of something like ```https://musicbrainz.org/artist/b95ce3ff-3d05-4e87-9e01-c97b66af13d4``` in both, the explainer and the mbid-mapper
      • 2022-07-25 20641, 2022

      • lucifer
        yeah that looks worng. you can skip it. afaik artist_credit_id cannot be linked to a mb page.
      • 2022-07-25 20620, 2022

      • Pratha-Fish
        yea, and looks like there isn't any received artist_mbid in that table either