#metabrainz

/

      • alastairp
        lucifer: great, let me just push my changes now then
      • 2022-06-07 15839, 2022

      • lucifer
        alastairp: oh i just pushed, you may need to rebase again. sorry šŸ˜“
      • 2022-06-07 15851, 2022

      • alastairp
        no worries, my changes are pretty small
      • 2022-06-07 15854, 2022

      • lucifer
        ah cool
      • 2022-06-07 15859, 2022

      • Sophist_UK has quit
      • 2022-06-07 15843, 2022

      • lucifer
        alastairp: do you know how the contents of the current requirements.txt file were choosen. for instance pip freeze lists 130 deps but the file has only 54 entries.
      • 2022-06-07 15858, 2022

      • lucifer
        (this is LB stats fwiw but i thikn similar considerations applies to CB)
      • 2022-06-07 15813, 2022

      • Sophist-UK joined the channel
      • 2022-06-07 15826, 2022

      • lucifer
        at first it seemed to me the one in the file could be direct deps only we use but it seems there are some transitive ones too there.
      • 2022-06-07 15830, 2022

      • alastairp
        no, I can't remember. it's possible that I wanted to try and separate top level dependencies from transitive dependencies and so removed all of them? something like poetry would work much better here instead though
      • 2022-06-07 15849, 2022

      • alastairp
        right, and remaining transitive dependencies could just be "didn't realise that it wasn't an explicit dependency"
      • 2022-06-07 15815, 2022

      • lucifer
        i see. i was trying `pipdate` to update all versions and then read the major version changelogs to revert breaking ones.
      • 2022-06-07 15800, 2022

      • lucifer
        and doing pip freeze after that generated a much larger file so asked.
      • 2022-06-07 15813, 2022

      • BrainzGit
        [musicbrainz-server] 14reosarevok opened pull request #2561 (03beta…MBS-12332-fix-2): MBS-12437 / MBS-12438: Limit overflow-wrap even more https://github.com/metabrainz/musicbrainz-server/…
      • 2022-06-07 15840, 2022

      • reosarevok
        bitmap, yvanzo ^ maybe with that one we can finally release beta :)
      • 2022-06-07 15826, 2022

      • Sophist-UK has quit
      • 2022-06-07 15807, 2022

      • Sophist-UK joined the channel
      • 2022-06-07 15818, 2022

      • lucifer
        huh cb tests running for over 15mins.
      • 2022-06-07 15848, 2022

      • KevlarNoir has quit
      • 2022-06-07 15830, 2022

      • CatQuest
        hey lucifer how goes the adventures in spot(ify) the seconds?
      • 2022-06-07 15815, 2022

      • lucifer
        CatQuest: hi! sorry didn't understand what you meant.
      • 2022-06-07 15843, 2022

      • reosarevok
        Whether Spotify finally sent the file with the right times I guess? :)
      • 2022-06-07 15847, 2022

      • lucifer
        ah! yes, they did that 2 weeks ago. (iirc i had mentioned here as well)
      • 2022-06-07 15850, 2022

      • Sophist-UK has quit
      • 2022-06-07 15806, 2022

      • Sophist-UK joined the channel
      • 2022-06-07 15859, 2022

      • Sophist_UK joined the channel
      • 2022-06-07 15808, 2022

      • Sophist-UK has quit
      • 2022-06-07 15812, 2022

      • yvanzo
        hi reosarevok: do you have links at hand that can be used as references to test these two issues?
      • 2022-06-07 15810, 2022

      • reosarevok
        yvanzo: fair, adding them to the PR
      • 2022-06-07 15832, 2022

      • yvanzo
        thank you
      • 2022-06-07 15839, 2022

      • reosarevok
        yvanzo: added some
      • 2022-06-07 15850, 2022

      • BrainzGit
        [listenbrainz-server] 14amCap1712 opened pull request #2036 (03master…update-bu): Update Flask, BU and other dependencies https://github.com/metabrainz/listenbrainz-server…
      • 2022-06-07 15837, 2022

      • piwu9 joined the channel
      • 2022-06-07 15812, 2022

      • piwu has quit
      • 2022-06-07 15812, 2022

      • piwu9 is now known as piwu
      • 2022-06-07 15810, 2022

      • skelly37 has quit
      • 2022-06-07 15812, 2022

      • skelly37 joined the channel
      • 2022-06-07 15829, 2022

      • skelly37 has quit
      • 2022-06-07 15808, 2022

      • lucifer
        alastairp: that hour long test run which never completed was because pip was unable to decide which versions of transitive deps to use. so i pinned the latest versions of the needed ones. also, fixed an issue related to psycopg2's `copy_to`.
      • 2022-06-07 15808, 2022

      • Sophist_UK has quit
      • 2022-06-07 15823, 2022

      • alastairp
        lucifer: in lb?
      • 2022-06-07 15826, 2022

      • lucifer
        CB
      • 2022-06-07 15858, 2022

      • lucifer
        once you push the redirect changes to CB PR, i'll make same changes to LB PR.
      • 2022-06-07 15835, 2022

      • alastairp
        I was able to fix the dependency lookup by just removing coverage - didn't have to add any other transitive dependencies
      • 2022-06-07 15843, 2022

      • Sophist-UK joined the channel
      • 2022-06-07 15854, 2022

      • lucifer
        oh i see
      • 2022-06-07 15818, 2022

      • lucifer
        i'll revert that commit then.
      • 2022-06-07 15838, 2022

      • alastairp
        copy_to -> copy_exoert is a psycopg2 thing, or sqlalchemy?
      • 2022-06-07 15848, 2022

      • lucifer
        psycopg2
      • 2022-06-07 15825, 2022

      • alastairp
        interesting
      • 2022-06-07 15850, 2022

      • lucifer
        uh my fix is not correct. will update. the relevant docs btw. https://www.psycopg.org/docs/cursor.html#cursor.c…
      • 2022-06-07 15801, 2022

      • odnes has quit
      • 2022-06-07 15808, 2022

      • odnes_ joined the channel
      • 2022-06-07 15820, 2022

      • zas
        yvanzo: I just restarted sir-prod on floyd, it was erroring since a while
      • 2022-06-07 15828, 2022

      • zas
      • 2022-06-07 15839, 2022

      • alastairp
        lucifer: I've been digging into flask/werkzeug redirects along with the version upgrade, and I'm not sure it's worth trying to work out what's going on
      • 2022-06-07 15847, 2022

      • alastairp
        from what I can tell: flask 1 uses werkzeug's redirect() method directly. if you pass it a relative url (e.g. /artist/foo) then at some point in the chain, it adds http://localhost in front of the url, this seems to happen really late in the pipeline, I can't work out where it happens
      • 2022-06-07 15809, 2022

      • alastairp
        this is why flask_testing automatically adds this to the expected url in assertRedirects if it's not set, it must have been reproducing this behaviour
      • 2022-06-07 15850, 2022

      • alastairp
        however, flask2 doesn't appear to do this behaviour (which is why the tests are failing)
      • 2022-06-07 15805, 2022

      • alastairp
        but what I can't find, is when in flask or werkzeug they decided to change this behaviour
      • 2022-06-07 15810, 2022

      • lucifer
      • 2022-06-07 15815, 2022

      • lucifer
      • 2022-06-07 15857, 2022

      • lucifer
        let's fix the tests manually for now and later look into replacing flask-testing.
      • 2022-06-07 15838, 2022

      • lucifer
        maybe copy over the test case to BU and add the relevant fixes and use that in our tests or maybe something else.
      • 2022-06-07 15847, 2022

      • alastairp
        right, we can always just check that response.location.endsWith("/our/url")
      • 2022-06-07 15848, 2022

      • alastairp
        that's fine
      • 2022-06-07 15812, 2022

      • alastairp
        the docs in the flask website are kind of testing something a bit different
      • 2022-06-07 15812, 2022

      • lucifer
        makes sense. let's do that.
      • 2022-06-07 15823, 2022

      • alastairp
        parsing the url and then checking .path
      • 2022-06-07 15850, 2022

      • alastairp
        right, but what I'm unsure about is why did flask decide to add a protocol/host to this stuff in the first place, and then why did they remove it in flask 2
      • 2022-06-07 15837, 2022

      • alastairp
        especially because https://github.com/pallets/werkzeug/blob/main/src… they have this "linter" to check if a url is relative
      • 2022-06-07 15817, 2022

      • alastairp
      • 2022-06-07 15840, 2022

      • alastairp
        hmm, yeah. right
      • 2022-06-07 15844, 2022

      • alastairp
        `curl -D - https://listenbrainz.org/my/playlists/` -> see the location header, it's absolute even though we just do a relative redirect (the result of url_for): https://github.com/metabrainz/listenbrainz-server…
      • 2022-06-07 15836, 2022

      • lucifer
        i see, makes sense. it seems the http spec mandates `location` to be absolute as well.
      • 2022-06-07 15847, 2022

      • alastairp
        where are you seeing that? because I didn't find that
      • 2022-06-07 15857, 2022

      • alastairp
      • 2022-06-07 15850, 2022

      • lucifer
        14.30 Location
      • 2022-06-07 15822, 2022

      • lucifer
        oh i am lookint at rf2616
      • 2022-06-07 15823, 2022

      • alastairp
        an older rcf?
      • 2022-06-07 15827, 2022

      • lucifer
        yeah
      • 2022-06-07 15814, 2022

      • alastairp
        ok, looks like that was one of the things I was missing... so it has changed before
      • 2022-06-07 15838, 2022

      • alastairp
      • 2022-06-07 15820, 2022

      • lucifer
        ah! makes sense
      • 2022-06-07 15845, 2022

      • alastairp
        lucifer: cool, thanks for helping to dig through that history. now that I'm aware of where/how the change was introduced, I'm happy to just update the asserts to check them being relative
      • 2022-06-07 15852, 2022

      • lucifer
        šŸ‘
      • 2022-06-07 15859, 2022

      • lucifer
        oh well copy_to takes file, sql whereas copy_expert takes sql, file
      • 2022-06-07 15810, 2022

      • alastairp
        urgh, hah
      • 2022-06-07 15854, 2022

      • alastairp
        lucifer: looks like we're almost there
      • 2022-06-07 15858, 2022

      • alastairp
        psycopg2.errors.UndefinedTable: relation ""user"" does not exist
      • 2022-06-07 15800, 2022

      • alastairp
        double escape?
      • 2022-06-07 15804, 2022

      • alastairp
        copy_from
      • 2022-06-07 15816, 2022

      • lucifer
        oh i had just fixed that.
      • 2022-06-07 15824, 2022

      • lucifer
        not sure why it errored again
      • 2022-06-07 15827, 2022

      • lucifer
        ah i missed the copy_from one. only did copy_to's
      • 2022-06-07 15807, 2022

      • lucifer
        ok fixed now. if tests pass, i'll squash all copy_{to, from, expert} commits into 1.
      • 2022-06-07 15826, 2022

      • alastairp
        ok great, if we can keep my redirect one there in the middle somehow then that'd be great
      • 2022-06-07 15830, 2022

      • alastairp
        but otherwise looks good to me
      • 2022-06-07 15850, 2022

      • lucifer
        yup i'll do an interactive rebase, and move around the commits to keep the redirect one separate
      • 2022-06-07 15808, 2022

      • reosarevok
        yvanzo: huh, sentry has a ton of DBI connect errors from 6 h ago, but telegram says nothing. Any idea what that might be about? Unless it was about sir
      • 2022-06-07 15810, 2022

      • yvanzo
        looking at logs
      • 2022-06-07 15836, 2022

      • alastairp
        lucifer: same fixes for LB?
      • 2022-06-07 15808, 2022

      • lucifer
        alastairp: yup
      • 2022-06-07 15813, 2022

      • reosarevok
        yvanzo: do see if the commit message in https://github.com/metabrainz/musicbrainz-server/… seems better now, too :)
      • 2022-06-07 15830, 2022

      • yvanzo
        reosarevok: SIR’s errors started from 08:36:33 UTC
      • 2022-06-07 15826, 2022

      • yvanzo
        Which is exactly the same minute as the DBI errors in MBS Sentry.
      • 2022-06-07 15849, 2022

      • yvanzo
        Both sir-prod and postgres-floyd (mentioned in DBI errors) are hosted on floyd.
      • 2022-06-07 15837, 2022

      • yvanzo
        zas: It seems reasonable to think that there were network issues with floyd at 8:36 UTC ^
      • 2022-06-07 15857, 2022

      • yvanzo
        The fact that SIR is not able to recover from it however is a bug.
      • 2022-06-07 15841, 2022

      • reosarevok
        bitmap, yvanzo: do you know if it's possible to make sentry errors in test either be ignored by default or go into a different list?
      • 2022-06-07 15855, 2022

      • reosarevok
        They're generally kinda useless :)
      • 2022-06-07 15829, 2022

      • yvanzo
        I don’t know.
      • 2022-06-07 15837, 2022

      • alastairp
        reosarevok: one sec
      • 2022-06-07 15806, 2022

      • lucifer
        you could tag containers with environment and then filter in sentry.
      • 2022-06-07 15819, 2022

      • alastairp
      • 2022-06-07 15831, 2022

      • alastairp
        so we can separate beta and prod
      • 2022-06-07 15835, 2022

      • lucifer
        but don't know if perl sentry supports it (it doesn't support perf stuff at least so unsure)
      • 2022-06-07 15845, 2022

      • bitmap
        reosarevok: we have separate environments you can select for prod, beta, test
      • 2022-06-07 15845, 2022

      • yvanzo
      • 2022-06-07 15855, 2022

      • reosarevok
        Oh, nice
      • 2022-06-07 15836, 2022

      • reosarevok
        Didn't realize that, thanks, that's better
      • 2022-06-07 15852, 2022

      • reosarevok
        bitmap: what does "for review" mean? Is it some automated pick by sentry?
      • 2022-06-07 15818, 2022

      • lucifer
        yup, sentry automatically selects those.
      • 2022-06-07 15854, 2022

      • lucifer
        those are also automatically removed from the lists after 7 days (iirc) regardless of whether someone looked at those or not.
      • 2022-06-07 15816, 2022

      • lucifer
        alastairp: cleaned up commits. updated base image version in prod dockerfile and updated uWGSI version.
      • 2022-06-07 15818, 2022

      • yvanzo
        alastairp: Please have a look at services guidelines when you have a chance :)
      • 2022-06-07 15828, 2022

      • reosarevok
        yvanzo: https://tickets.metabrainz.org/browse/SEARCH-678 seems to be missing the end of the name :)
      • 2022-06-07 15828, 2022

      • BrainzBot
        SEARCH-678: Indexer is not recovering automatically from
      • 2022-06-07 15850, 2022

      • yvanzo
        reosarevok: Thanks, I submitted the form accidentally and fixed the description only.
      • 2022-06-07 15802, 2022

      • odnes_ has quit
      • 2022-06-07 15811, 2022

      • odnes joined the channel
      • 2022-06-07 15819, 2022

      • reosarevok
        yvanzo: anything other than the basics for mb-docker today btw?
      • 2022-06-07 15840, 2022

      • yvanzo
        reosarevok: yes, I already made a release draft
      • 2022-06-07 15847, 2022

      • reosarevok
        Oh, perfect
      • 2022-06-07 15837, 2022

      • BrainzGit
        [musicbrainz-server] 14reosarevok merged pull request #2561 (03beta…MBS-12332-fix-2): MBS-12437 / MBS-12438: Limit overflow-wrap even more https://github.com/metabrainz/musicbrainz-server/…
      • 2022-06-07 15812, 2022

      • yvanzo
        reosarevok: Updated MBS/MBVM releases in Jira too.
      • 2022-06-07 15818, 2022

      • reosarevok
        Thanks
      • 2022-06-07 15839, 2022

      • alastairp
        yvanzo: reviewed. I think that as this is just guidelines for the docs it's probably a good idea to start adding docs based on it and see if we need to add additional guidelines
      • 2022-06-07 15803, 2022

      • alastairp
        lucifer: ok thanks, let's merge CB and release to beta and see what happens?
      • 2022-06-07 15808, 2022

      • lucifer
        alastairp: lb fixes for copy expert are a bit complex to do correctly due to schema qualified table names, function calls (to_timestamp(0)) and literals ('null'). we can either add if/else check for 2 cases or manually change each entry to the correct escaping type. any preference?
      • 2022-06-07 15814, 2022

      • lucifer
        alastairp: yes sure
      • 2022-06-07 15852, 2022

      • alastairp
        I don't follow too well, can you show some code examples? is this an if/else for different functionality in a test?
      • 2022-06-07 15802, 2022

      • lucifer
        alternatively, we can skip all escaping. we do know its not needed anywhere because we control column and table names. only that this is disccouraged.
      • 2022-06-07 15818, 2022

      • alastairp
        or that in some instances the data is a column and in some it's a function?
      • 2022-06-07 15819, 2022

      • lucifer
      • 2022-06-07 15836, 2022

      • lucifer
      • 2022-06-07 15847, 2022

      • alastairp
        lucifer: btw, I'm writing some basic oauth tests for CB and i see that there are scopes here too, which is great. I wasn't aware of that before
      • 2022-06-07 15847, 2022

      • BrainzGit
        [guidelines] 14yvanzo merged pull request #17 (03master…rabbitmq-dev-doc): Document using RabbitMQ for main contributors https://github.com/metabrainz/guidelines/pull/17
      • 2022-06-07 15848, 2022

      • lucifer
        here it can be a column, null or to_timestamp(0)
      • 2022-06-07 15810, 2022

      • alastairp
        lucifer: mmm, right