#metabrainz

/

      • discordbrainz
        <06salaxceitor> let me try
      • opal has quit
      • opal joined the channel
      • <06salaxceitor> from LB bash: root@8fb30162d719:/code/listenbrainz# psql psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
      • yvanzo
        You have to pass the same parameters as in the previous URL
      • discordbrainz
        <06salaxceitor> something like this? root@8fb30162d719:/code/listenbrainz# psql -h localhost -U musicbrainz psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address Is the server running on that host and accepting TCP/IP
      • connections?
      • <06salaxceitor> from outside the LB container: ✘ xeitor@xeitor  ~/github_projects/listenbrainz-server   master ±  psql -h localhost -U musicbrainz Password for user musicbrainz: psql (14.11 (Ubuntu 14.11-0ubuntu0.22.04.1), server 12.17 (Debian 12.17-1.pgdg120+1)) Type "help" for help. musicbrainz=#
      • <06salaxceitor> oopss
      • <06salaxceitor> there was a hidder char in the MB_DATABASE_URI: postgresql://musicbrainz:musicbrainz@\u200bmusicbrainz-docker-db_1:5432/musicbrainz_db
      • yvanzo
        🎉
      • discordbrainz
        <06salaxceitor> this is the new error i am getting now: psycopg2.OperationalError: could not translate host name "musicbrainz-docker-db_1" to address: Temporary failure in name resolution
      • mara42 has quit
      • yvanzo
        salaxceitor: the correct host name is `musicbrainz-docker-db-1` according to your `docker ps` output above
      • this has to be changed in `MB_DATABASE_URI`
      • discordbrainz
        <06salaxceitor> yep i did and now, from the LB shell i tryed psycopg2.connect(app.config["MB_DATABASE_URI"]) and got could not translate host name "musicbrainz-docker-db-1" to address: Temporary failure in name resolution
      • Tarun_0x0 joined the channel
      • <06salaxceitor> i think the reason is that the containers are in different docker networks
      • yvanzo
        yes, but then the port should be accessible on `localhost` system-wide
      • discordbrainz
        <06salaxceitor> yep, i got access from my system (outiside containers)
      • <06salaxceitor> through psql in my terminal and pgadmin
      • <06salaxceitor> here is an example
      • <06salaxceitor> i think i got it
      • <06salaxceitor> found this in LBs docker-compose.yml file
      • <06salaxceitor> # Uncomment the following lines if you want to connect the LB network to a musicbrainz-docker network to access a MB replica # TODO: re-comment these before merging this code networks: default: name: musicbrainz-docker_default external: true
      • <06salaxceitor> and now, from LB bash: root@32745e6866f4:/code/listenbrainz# psql -h musicbrainz-docker-db-1 -U musicbrainz Password for user musicbrainz: psql (12.18 (Ubuntu 12.18-1.pgdg22.04+1), server 12.17 (Debian 12.17-1.pgdg120+1)) Type "help" for help.
      • yvanzo
        👏
      • discordbrainz
        <06salaxceitor> thanks for your help! ☺️
      • <06salaxceitor> connection to rabbit started to fail after the network change, i had to change rabbitmq ports from "127.0.0.1:25672:15672" to this "25672:15672"
      • <06salaxceitor> dismiss previous msg, it's working now 😆
      • <06salaxceitor> btw amazing develpment environmet setup experience, it shows that a lot of efforts has been put into it
      • Tarun_0x0
        Yvanzo, as I am not very familiar with Perl, I wanted to ask: in MusicBrainz, do we have anything like loading the translations on the server side and passing them to clients for internationalization using i18next? If this is the case, can you point me towards some code?
      • yvanzo
        Hi Tarun_0x0, you will find the relevant parts of the code by searching for "gettext". I’m not familiar with i18next either for comparing.
      • discordbrainz
        <06salaxceitor> sorry to bother again, i am still getting this error on artists page: UndefinedTable psycopg2.errors.UndefinedTable: relation "mapping.mb_artist_metadata_cache" does not exist LINE 2: FROM mapping.mb_artist_metadata_cache
      • Tarun_0x0
        yvanzo: oh i see . Thanks for the reply, even on the weekend
      • bitmap
        Tarun_0x0: for the client we precompile the strings, e.g., https://static.metabrainz.org/MB/jed-de-64e92a3.js
      • (that's done by our webpack config, webpack/client.config.mjs)
      • Tarun_0x0 has quit
      • Tarun_0x0 joined the channel
      • Tarun_0x0
        ohkk , thanks bitmap
      • fletchto99 has quit
      • fletchto99 joined the channel
      • lucifer
        salaxceitor: hi! what are you trying to do?
      • discordbrainz
        <06salaxceitor> hi lucifer: i am getting this error on every artist's page
      • lucifer
        yes, but what do you want to do? i ask because setting up artist pages locally is a tough task at the moment.
      • discordbrainz
        <06salaxceitor> ahhh okay, i wanted to work on this ticket: https://tickets.metabrainz.org/plugins/servlet/...
      • BrainzBot
        LB-1538: Set user location/area (e.g. for events)
      • lucifer
        i see, another person has already submitted the a PR for this ticket but probably forgot to assign it to themselves.
      • see the comment on the ticket but github bot.
      • also, this issue is still up for discussion and we might end up not adding this at all for now.
      • so either way, i suggest a different ticket to work on.
      • discordbrainz
        <06salaxceitor> sorry
      • <06salaxceitor> i meant this one
      • <06salaxceitor> they are releated tough
      • lusciouslover has quit
      • BrainzBot
        LB-1537: Events on artist pages
      • lusciouslover joined the channel
      • lucifer
        yes, this one cannot be worked on for now because we won't have the data for this available until the other ticket is finished.
      • discordbrainz
        <06salaxceitor> yep I was aware, wanted to give a try to the frontend tough
      • lucifer
        if you want to work on something frontend related, may i suggest LB-1528 instead?
      • BrainzBot
        LB-1528: Add shortcut to today's date in Fresh Releases https://tickets.metabrainz.org/browse/LB-1528
      • discordbrainz
        <06salaxceitor> thanks for the sugestion, i might give it a to start getting myself comfortable with the developing stack and workflow
      • lucifer
        you'll probably need to set API_URL to `https://api.listenbrainz.org/` in config.py to load fresh releases page with some data locally
      • discordbrainz
        <06salaxceitor> i am actually really interested in the events entity
      • <06salaxceitor> would love to see more events features in metabrainz products
      • <06salaxceitor> currently not on my laptop, but i'll let you know
      • lucifer
        salaxceitor: remind me on monday, i'll help you setup entity pages locally. i cannot find the workaround patch right now so will have to rewrite it.
      • discordbrainz
        <06salaxceitor> awesome thanks lucifer, have a good weekend
      • lucifer
        salaxceitor: okay, i found it just hitting enter on the previous message. https://github.com/metabrainz/listenbrainz-serv...
      • copy the code from this file to your working tree and it should make the entity pages load without the need of a musicbrainz database or otherwise.
      • the pages will have a lot less data than what production shows but can fix that next week.
      • discordbrainz
        <06salaxceitor> great, thanks
      • minimal has quit
      • yellowhatpro has quit
      • Tarun_0x0 has quit
      • Tarun_0x0 joined the channel
      • Kladky has quit
      • JadedBlueEyes has quit
      • JadedBlueEyes joined the channel
      • Tarun_0x0 has quit
      • JadedBlueEyes has quit
      • JadedBlueEyes joined the channel
      • v6lur has quit