#metabrainz

/

      • BrainzGit
        [listenbrainz-server] mhor opened pull request #1470 (master…patch-2): Enhance and fix some "docblocks" for apis. https://github.com/metabrainz/listenbrainz-server…
      • 2021-05-18 13809, 2021

      • BrainzGit
        [listenbrainz-server] mhor closed pull request #1470 (master…patch-2): Enhance and fix some "docblocks" for apis. https://github.com/metabrainz/listenbrainz-server…
      • 2021-05-18 13819, 2021

      • alastairp
        _lucifer: one thing to check is the created field for that record. is it really close in time to when the error occurred, or far away?
      • 2021-05-18 13850, 2021

      • elomatreb[m] joined the channel
      • 2021-05-18 13803, 2021

      • outsidecontext has quit
      • 2021-05-18 13809, 2021

      • imdeni has quit
      • 2021-05-18 13812, 2021

      • BrainzGit
        [listenbrainz-server] mhor opened pull request #1471 (master…fix-and-enhance-docblocks): Enhance and fix some "docblocks" for apis https://github.com/metabrainz/listenbrainz-server…
      • 2021-05-18 13818, 2021

      • alastairp
        one good thing to do here would be to do a check before we add the record - check if it doesn't exist otherwise add it (inside a transaction). or, do a INSERT ... ON CONFLICT DO UPDATE or similar
      • 2021-05-18 13842, 2021

      • alastairp
        nice work by mhor these days!
      • 2021-05-18 13850, 2021

      • _lucifer
        alastairp, the error in sentry and the last updated are ~7 min apart
      • 2021-05-18 13802, 2021

      • imdeni joined the channel
      • 2021-05-18 13822, 2021

      • _lucifer
        ON CONFLICT DO UPDATE seems nice, we might even be able to simplify some of our disconect logic with it. what are your thoughts on it? we currently delete and then redirect to the external service for auth.
      • 2021-05-18 13849, 2021

      • _lucifer
        what if we just overwrote at time of insert and didn't bother disconnecting before.
      • 2021-05-18 13811, 2021

      • hugo___ has quit
      • 2021-05-18 13833, 2021

      • _lucifer
        indeed nice work by mhor :D
      • 2021-05-18 13855, 2021

      • alastairp
        what's the behaviour of that page?
      • 2021-05-18 13803, 2021

      • alastairp
        mmm
      • 2021-05-18 13818, 2021

      • alastairp
        we redirect to spotify, then spotify redirects back to us (with a GET)
      • 2021-05-18 13829, 2021

      • alastairp
        I'm trying to work out what could have happened
      • 2021-05-18 13821, 2021

      • hugo___ joined the channel
      • 2021-05-18 13824, 2021

      • outsidecontext joined the channel
      • 2021-05-18 13826, 2021

      • alastairp
        if they press back (end up on spotify), then approve again, what happens? maybe that was the issue
      • 2021-05-18 13857, 2021

      • alastairp
        I'd have to think more about your suggestion for disconnecting - it doesn't feel like a good solution on the face of it, let me think it over more
      • 2021-05-18 13858, 2021

      • _lucifer
        Currently, when any button is clicked it sends a request to LB, LB disconnects if the user exists and then if the user has clicked any button other than disconnect, it redirects to the desired service with appropriate parameters.
      • 2021-05-18 13855, 2021

      • _lucifer
        My question was basically, is it a good idea to depend on ON CONFLICT DO UPDATE or if we have a chance to remove conflicts earlier manually we should do that?
      • 2021-05-18 13856, 2021

      • _lucifer
        if the user presses back anywhere on spotify's side, it should end up with and invalid grant error when we try to obtain the access code. that's what i have seen happening usually.
      • 2021-05-18 13824, 2021

      • BrainzGit
        [listenbrainz-server] amCap1712 opened pull request #1472 (master…compress-cron): Merge both crontabs into one https://github.com/metabrainz/listenbrainz-server…
      • 2021-05-18 13809, 2021

      • _lucifer
        alastairp, should we try to get this one (there are a lot of moving parts here so probably best to wait until both you and ruaok have reviewed and tested) or do a release with the crontab fix to get dumps working again?
      • 2021-05-18 13813, 2021

      • _lucifer
        nice conditional action run already working, no spark or js tests triggered :)
      • 2021-05-18 13821, 2021

      • sumedh joined the channel
      • 2021-05-18 13835, 2021

      • SothoTalKer_ joined the channel
      • 2021-05-18 13830, 2021

      • SothoTalKer has quit
      • 2021-05-18 13832, 2021

      • sumedh has quit
      • 2021-05-18 13810, 2021

      • paul_ joined the channel
      • 2021-05-18 13852, 2021

      • fnurl has quit
      • 2021-05-18 13843, 2021

      • paul_ has quit
      • 2021-05-18 13816, 2021

      • fnurl joined the channel
      • 2021-05-18 13859, 2021

      • fnurl has quit
      • 2021-05-18 13814, 2021

      • fnurl joined the channel
      • 2021-05-18 13825, 2021

      • alastairp
        thanks for the confirmation about the invalid grant error. you're right, that's what I expected to see. so now I'm a bit confused about how this could have happened. let's slowly try some ideas to see if we can work out what happened. I suspect it'll be an easy fix
      • 2021-05-18 13854, 2021

      • alastairp
        _lucifer: how about we release now? with new BU and with the fixed crontab
      • 2021-05-18 13859, 2021

      • alastairp
        then we can release yours tomorrow
      • 2021-05-18 13801, 2021

      • _lucifer
        alastairp: yes that's what i was asking, release now or try to get that PR in.
      • 2021-05-18 13812, 2021

      • _lucifer
        let's do the release now.
      • 2021-05-18 13825, 2021

      • _lucifer
        i'll be available in ~1 hr, let's do it then?
      • 2021-05-18 13856, 2021

      • alastairp
        fien
      • 2021-05-18 13858, 2021

      • alastairp
        fine
      • 2021-05-18 13836, 2021

      • sumedh joined the channel
      • 2021-05-18 13834, 2021

      • akashgp09 joined the channel
      • 2021-05-18 13820, 2021

      • alastairp
        _lucifer: got no internet for some reason :(
      • 2021-05-18 13802, 2021

      • _lucifer
        oh!
      • 2021-05-18 13816, 2021

      • _lucifer
        i am available now. should i proceed with releasing or wait?
      • 2021-05-18 13802, 2021

      • BrainzGit
        [listenbrainz-server] release v-2021-05-18.0 has been published by github-actions[bot]: https://github.com/metabrainz/listenbrainz-server…
      • 2021-05-18 13826, 2021

      • _lucifer
        i am building the image and will push it. will wait for you before updating containers.
      • 2021-05-18 13800, 2021

      • alastairp
        ok
      • 2021-05-18 13805, 2021

      • alastairp
        I seem to be back
      • 2021-05-18 13837, 2021

      • _lucifer
        cool, image also pushed. will start updating containers.
      • 2021-05-18 13843, 2021

      • alastairp
        perfect
      • 2021-05-18 13845, 2021

      • _lucifer
        starting with cron
      • 2021-05-18 13834, 2021

      • _lucifer
        all containers updated. everything seems to be fine for now.
      • 2021-05-18 13846, 2021

      • _lucifer
        we'll know tomorrow if the crontab starts to work again
      • 2021-05-18 13859, 2021

      • alastairp
        nice
      • 2021-05-18 13809, 2021

      • alastairp
        one thing we can do is check syslog
      • 2021-05-18 13819, 2021

      • alastairp
        cron will complain if the crontab is invalid
      • 2021-05-18 13835, 2021

      • _lucifer
        oh! when does it do that?
      • 2021-05-18 13846, 2021

      • alastairp
        it should do it every minute
      • 2021-05-18 13856, 2021

      • alastairp
        it wakes up, sees if there are any changes to the files, and then reloads them
      • 2021-05-18 13801, 2021

      • _lucifer
        but i checked syslogs those were empty
      • 2021-05-18 13817, 2021

      • _lucifer
        actaully i am not even sure how syslog works with containers.
      • 2021-05-18 13817, 2021

      • alastairp
        so maybe everything is OK then
      • 2021-05-18 13843, 2021

      • _lucifer
        but there was nothing in syslog today morning either
      • 2021-05-18 13833, 2021

      • _lucifer
        do you know where do consul template errors get logged?
      • 2021-05-18 13859, 2021

      • alastairp
        what kind of errors do you mean?
      • 2021-05-18 13800, 2021

      • _lucifer
        if we do not pass `-syslog` we can see those in the docker container logs but then on restart those will go away.
      • 2021-05-18 13828, 2021

      • alastairp
        the setup of these images configure syslog to output to the container's stdout, I htink
      • 2021-05-18 13846, 2021

      • _lucifer
        umm, i am confused then.
      • 2021-05-18 13828, 2021

      • _lucifer
      • 2021-05-18 13812, 2021

      • _lucifer
        wso that i could run it without -syslog instead of directly running `run-consul-template` to help ruaok debug the issue with metric writer
      • 2021-05-18 13858, 2021

      • _lucifer
        i was able to see the logs and errors in stdout but with -syslog those errors are neither to be found in /var/log/syslog in the container nor stdout
      • 2021-05-18 13857, 2021

      • alastairp
        I ran though all of this just a few months ago when I was debugging some startup stuff, and I thought that I had it all worked out
      • 2021-05-18 13805, 2021

      • alastairp
        how were you starting the container?
      • 2021-05-18 13814, 2021

      • alastairp
        with a service?
      • 2021-05-18 13827, 2021

      • _lucifer
        docker run
      • 2021-05-18 13848, 2021

      • alastairp
        with a specific command to run, or were you using the default?
      • 2021-05-18 13855, 2021

      • _lucifer
        yes passing the run-consul-template as the command
      • 2021-05-18 13813, 2021

      • alastairp
        right - so that would have started consul-template, but not syslog
      • 2021-05-18 13834, 2021

      • alastairp
        so it makes sense that there would have been no /var/log/syslog
      • 2021-05-18 13838, 2021

      • _lucifer
        oh okay.
      • 2021-05-18 13807, 2021

      • alastairp
        the default behaviour of these images is that syslog will start up, and any other service that you have a `run` file for
      • 2021-05-18 13834, 2021

      • _lucifer
        let me check how metric writer is being started now because i think we missed some consul error logs on Sunday as well.
      • 2021-05-18 13847, 2021

      • _lucifer
      • 2021-05-18 13859, 2021

      • _lucifer
        Consul Template returned errors: child process died with exit code -1
      • 2021-05-18 13810, 2021

      • _lucifer
        is it always like this?
      • 2021-05-18 13832, 2021

      • alastairp
        that's because the thing that you loaded in the exec{} block quit
      • 2021-05-18 13842, 2021

      • _lucifer
        right, so the python script didn't log any error when it crashed that's why its missing here?
      • 2021-05-18 13855, 2021

      • alastairp
        yes, likely
      • 2021-05-18 13841, 2021

      • _lucifer
        ah ok. that's strange but makes sense now. thanks!
      • 2021-05-18 13807, 2021

      • _lucifer
        another thing, i see the docker-node image is using a newer consul version than docker-python and iirc newer consul versions have some things that tie in startup improvements PR, should we consider upgrading as well?
      • 2021-05-18 13844, 2021

      • alastairp
        no, new consul version shouldn't have anything to do with startup improvements
      • 2021-05-18 13850, 2021

      • yvanzo has quit
      • 2021-05-18 13811, 2021

      • alastairp
        we have this ongoing process to slowly upgrade consul, consul template, and base OS versions
      • 2021-05-18 13816, 2021

      • alastairp
        but that's going slowly
      • 2021-05-18 13845, 2021

      • _lucifer
        makes sense.
      • 2021-05-18 13813, 2021

      • _lucifer
        but Ubuntu 16.04 recently reached EOL we should probably priortise on upgrading it methinks
      • 2021-05-18 13816, 2021

      • alastairp
        yes, it's been a pending task for a while now
      • 2021-05-18 13821, 2021

      • alastairp
        like everything else
      • 2021-05-18 13802, 2021

      • _lucifer
        yeah. what would be the process like to go about the ubuntu upgrade?
      • 2021-05-18 13827, 2021

      • alastairp
        we're in the middle of replacing some tools that integrate with consul, because they're out of date
      • 2021-05-18 13840, 2021

      • alastairp
        zas started work on making some new replacements, but they need to be tested
      • 2021-05-18 13853, 2021

      • _lucifer
        makes sense.
      • 2021-05-18 13856, 2021

      • _lucifer
        more so after the pxz incident yesterday :)
      • 2021-05-18 13834, 2021

      • alastairp
        what was the pxz incedent?
      • 2021-05-18 13804, 2021

      • _lucifer
      • 2021-05-18 13836, 2021

      • _lucifer
        when i got rid of the docker container, i forgot that the machines are on a different ubuntu version.
      • 2021-05-18 13809, 2021

      • _lucifer
        20.04 has removed the pxz package so the request consumer had errored.
      • 2021-05-18 13843, 2021

      • alastairp
        this is one nice thing about having docker in place - we know that building the dockerfile will install of the required dependencies
      • 2021-05-18 13806, 2021

      • alastairp
        we could look at getting some automation tools in place to install all of the dependencies for the spark cluster
      • 2021-05-18 13842, 2021

      • _lucifer
        sure, but it actually shouldn't need anything extra. i was unaware of `pxz` till yesterday so i'll check the code base once in detail to make sure nothing else is missing.
      • 2021-05-18 13800, 2021

      • alastairp
        until we reinstall the cluster and forget it
      • 2021-05-18 13832, 2021

      • _lucifer
        we don't need pxz anymore, i have replaced it with xz as that has superseded pxz.
      • 2021-05-18 13853, 2021

      • _lucifer
        but right, i'll add the xz requirement to syswiki
      • 2021-05-18 13841, 2021

      • _lucifer
        i remembered you had mentioned ansible once, not sure how that works though
      • 2021-05-18 13804, 2021

      • _lucifer
        documented `xz` requirement in syswiki.
      • 2021-05-18 13846, 2021

      • alastairp
        great. let's talk about this at a later time, then
      • 2021-05-18 13850, 2021

      • yvanzo joined the channel
      • 2021-05-18 13813, 2021

      • _lucifer
        sure, thanks for the discussion!
      • 2021-05-18 13834, 2021

      • alastairp
        _lucifer: interesting, I tried to reproduce the spotify issue by loading up the connect page in 2 tabs, doing 1 and then doing the same on the other
      • 2021-05-18 13840, 2021

      • alastairp
        and I didn't get the error
      • 2021-05-18 13853, 2021

      • alastairp
        so yeah, some weird situation going on here
      • 2021-05-18 13839, 2021

      • _lucifer
        yeah, you shouldn't get an error because we always try to disconnect before connecting.
      • 2021-05-18 13805, 2021

      • _lucifer
        more so there was a 7 min gap in the error's when happened and the user's last updated time.
      • 2021-05-18 13810, 2021

      • alastairp
        ah, I see - now I understand what you mean when you said that we disconnect
      • 2021-05-18 13801, 2021

      • _lucifer
      • 2021-05-18 13856, 2021

      • _lucifer
        yup, i specifically left a comment there otherwise, 2 months later when fixing something else i would probably go on to delete the check here forgetting about this use case.
      • 2021-05-18 13804, 2021

      • _lucifer
        hot take - comments are notes to future self
      • 2021-05-18 13858, 2021

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #2106 (master…MBS-11670): MBS-11670: Finish implementation of artist series https://github.com/metabrainz/musicbrainz-server/…
      • 2021-05-18 13817, 2021

      • reosarevok
        yvanzo, bitmap ^ can we get this reviewed for a possible hotfix?
      • 2021-05-18 13837, 2021

      • alastairp
        _lucifer: well, comments should always explain _why_, not _what_
      • 2021-05-18 13843, 2021

      • alastairp
        you can determine what by just reading the code
      • 2021-05-18 13800, 2021

      • alastairp
        but to remember why we have to do something in a particular order - that's important
      • 2021-05-18 13806, 2021

      • bitmap
        reosarevok: yup, testing it now
      • 2021-05-18 13821, 2021

      • _lucifer
        yup, very true :D
      • 2021-05-18 13834, 2021

      • alastairp
        which is also why good commit messages are useful
      • 2021-05-18 13815, 2021

      • _lucifer
        yeah, i have recently tried to write better commit messages but since we always sqaush and merge. probably PR comments are better?
      • 2021-05-18 13833, 2021

      • alastairp
        do we always squash and merge? I don't
      • 2021-05-18 13852, 2021

      • alastairp
        commit messages are self-contained in the repository too - they'll still be there even if github goes away
      • 2021-05-18 13832, 2021

      • _lucifer
        yeah, for LB i get rebase and merge or create a merge commit not enabled for this repo
      • 2021-05-18 13823, 2021

      • _lucifer
        indeed the point regarding having it in the repo is valid.
      • 2021-05-18 13844, 2021

      • _lucifer
        i'd prefer we enable create a merge commit option for the repo then.
      • 2021-05-18 13808, 2021

      • alastairp
        what will that allow us to do?