#metabrainz

/

      • rozlav has quit
      • 2022-08-05 21759, 2022

      • rozlav joined the channel
      • 2022-08-05 21719, 2022

      • rozlav has quit
      • 2022-08-05 21731, 2022

      • rozlav joined the channel
      • 2022-08-05 21732, 2022

      • rozlav has quit
      • 2022-08-05 21709, 2022

      • rozlav joined the channel
      • 2022-08-05 21730, 2022

      • Freso has quit
      • 2022-08-05 21730, 2022

      • kuno has quit
      • 2022-08-05 21742, 2022

      • Leftmost has quit
      • 2022-08-05 21708, 2022

      • Leftmost joined the channel
      • 2022-08-05 21717, 2022

      • kuno joined the channel
      • 2022-08-05 21713, 2022

      • Freso joined the channel
      • 2022-08-05 21744, 2022

      • piwu has quit
      • 2022-08-05 21718, 2022

      • piwu joined the channel
      • 2022-08-05 21714, 2022

      • skelly37 joined the channel
      • 2022-08-05 21727, 2022

      • lucifer
        mayhem: i made a few changes to the cache to make it work and left it running overnight on wolf. going fine so far.
      • 2022-08-05 21722, 2022

      • mayhem
        Great! Still using Spotipy?
      • 2022-08-05 21746, 2022

      • lucifer
        mayhem: sort of, i forked it and edited it to accept a custom retry strategy.
      • 2022-08-05 21755, 2022

      • lucifer
        alastairp: the dumps you mentioned yesterday, do those include mb_metadata_cache table?
      • 2022-08-05 21743, 2022

      • reosarevok
        mayhem: Wonder if we're listed somewhere in a list as hiring or some weird shit
      • 2022-08-05 21751, 2022

      • reosarevok
        Given we keep getting hail mary job proposals
      • 2022-08-05 21749, 2022

      • mayhem
        I have no idea, reosarevok . Just keep ignoring them.
      • 2022-08-05 21704, 2022

      • mayhem
        lucifer: oh, good idea!
      • 2022-08-05 21708, 2022

      • reosarevok
        Yeah, I guess. I considered answering to one and asking where they got the idea of writing to us
      • 2022-08-05 21713, 2022

      • reosarevok
        But they might get encouraged :p
      • 2022-08-05 21700, 2022

      • alastairp
        morning lucifer, actually - good point
      • 2022-08-05 21713, 2022

      • alastairp
        looking back at my notes, we weren't planning on including it, but perhaps it's a good addition
      • 2022-08-05 21710, 2022

      • BrainzGit
        [critiquebrainz] 14anshg1214 opened pull request #456 (03master…handle_deleted_and_redirected_entities): Handle Deleted and Redirected Edition Groups https://github.com/metabrainz/critiquebrainz/pull…
      • 2022-08-05 21720, 2022

      • atj
        zas: well, it looks to be working, but doesn't seem aggressive enough with blocking the SSH brute force attacks
      • 2022-08-05 21746, 2022

      • atj
        hmm, perhaps I'm missing something
      • 2022-08-05 21742, 2022

      • ansh
        alastairp: If you have some time can you please review CB#452
      • 2022-08-05 21742, 2022

      • BrainzBot
        Allow CB to review Literary Works: https://github.com/metabrainz/critiquebrainz/pull…
      • 2022-08-05 21750, 2022

      • alastairp
        ansh: I'm doing that right now!
      • 2022-08-05 21715, 2022

      • ansh
        Thanks
      • 2022-08-05 21749, 2022

      • zas
        atj: it would be convenient to run "cscli completion bash | sudo tee /etc/bash_completion.d/cscli" after installation
      • 2022-08-05 21735, 2022

      • atj
        zas: I'll update the role
      • 2022-08-05 21747, 2022

      • zas
        atj: one package is missing on crowdsec machine: crowdsec-firewall-bouncer-iptables (not installed), I think it is why it doesn't block ssh scans atm
      • 2022-08-05 21700, 2022

      • zas
        it is installed on rex
      • 2022-08-05 21722, 2022

      • atj
        I did that intentionally, just so if something went wrong we weren't locked out of the API server ;)
      • 2022-08-05 21725, 2022

      • atj
      • 2022-08-05 21714, 2022

      • atj
        we can remove it once we're happy everything is working as expected
      • 2022-08-05 21744, 2022

      • zas
        atj: for extra safety, we should add a whitelist (on all nodes) including our IPs -> https://docs.crowdsec.net/docs/whitelist/create/
      • 2022-08-05 21759, 2022

      • zas
        I'm a bit disappointed we cannot control whitelisting via LAPI
      • 2022-08-05 21719, 2022

      • ZaphodBeeblebrox joined the channel
      • 2022-08-05 21700, 2022

      • alastairp
        ansh: can BB have recursive redirects?
      • 2022-08-05 21741, 2022

      • ansh
        Yes
      • 2022-08-05 21710, 2022

      • ansh
        For example you can check this entity id `dd40b465-931f-46ee-b2ae-28685b19f8d8`
      • 2022-08-05 21721, 2022

      • alastairp
        interesting. it might be worth discussing the reasoning for this with monkey. it might make a bunch of things easier if we convince him to change this
      • 2022-08-05 21747, 2022

      • monkey
        I don't think that's going to change. The idea is to be able to go back in time over all edits, including merges
      • 2022-08-05 21757, 2022

      • alastairp
        oh right, you have this time travel thing
      • 2022-08-05 21719, 2022

      • monkey
        Yep, exactly. We don't want to lose the ability to revert potentially destructive edits
      • 2022-08-05 21709, 2022

      • alastairp
        ansh: we'll have to check this query then, to ensure that it stays fast even if the table gets much larger
      • 2022-08-05 21711, 2022

      • ansh
        alastairp: If this takes more time, I'll then switch to the same way BB does it
      • 2022-08-05 21713, 2022

      • ansh
      • 2022-08-05 21731, 2022

      • alastairp
        ansh: ah, I see
      • 2022-08-05 21759, 2022

      • alastairp
        I did an explain plan on it:
      • 2022-08-05 21701, 2022

      • alastairp
      • 2022-08-05 21733, 2022

      • alastairp
        I'm a bit worried about the sequential scans, although on a table with only 600 rows this isn't going to be a problem. the question is what happens when it has 60,000
      • 2022-08-05 21757, 2022

      • alastairp
        in fact, I see that there isn't actually an index on `source_id` either, so monkey's query is likely to get slower and slower as more rows appear, too
      • 2022-08-05 21713, 2022

      • monkey
        I suspect so too
      • 2022-08-05 21737, 2022

      • alastairp
        monkey: if you want to open a ticket for it, we can sit down and test this after holidays
      • 2022-08-05 21757, 2022

      • monkey
        With pleasure
      • 2022-08-05 21723, 2022

      • atj
        zas: I added functionality to manage a custom whitelist to the role - https://github.com/metabrainz/ansible-role-crowds…
      • 2022-08-05 21711, 2022

      • atj
        do you want to include our personal IPs and/or server IPs?
      • 2022-08-05 21706, 2022

      • lucifer
        alastairp: great, i suspect the cache table to be smaller than the entire MB release dump to import into spark and easier to work with as well.
      • 2022-08-05 21726, 2022

      • alastairp
        oh, perfect. if it's needed for spark then we definitely make it
      • 2022-08-05 21732, 2022

      • monkey
        alastairp: BB-684
      • 2022-08-05 21732, 2022

      • BrainzBot
        BB-684: Investigate entity_redirect table SQL queries https://tickets.metabrainz.org/browse/BB-684
      • 2022-08-05 21751, 2022

      • lucifer
        mayhem: i'll need to clean up the the branch a bit before puting it on gaga. should i migrate this to PG as well while at it or let it use couchdb for now?
      • 2022-08-05 21741, 2022

      • BrainzGit
        [bookbrainz-site] 14MonkeyDo merged pull request #867 (03master…fix/edition-group-ac): Fix(AC): Handle AC modal state for editionGroup entity https://github.com/metabrainz/bookbrainz-site/pul…
      • 2022-08-05 21734, 2022

      • yellowhatpro
        Helloo everyone!! ヾ(≧▽≦*)o
      • 2022-08-05 21738, 2022

      • yellowhatpro
      • 2022-08-05 21754, 2022

      • yellowhatpro
      • 2022-08-05 21712, 2022

      • yellowhatpro
      • 2022-08-05 21719, 2022

      • yellowhatpro
      • 2022-08-05 21746, 2022

      • yellowhatpro
        aerozol: are the new designs good ??
      • 2022-08-05 21746, 2022

      • yellowhatpro
        akshaaatt what do you say??
      • 2022-08-05 21711, 2022

      • zas
        atj: server IPs
      • 2022-08-05 21735, 2022

      • yellowhatpro
        also akshaaatt now I will be implementing repositories for playlists , albums, artists and song entities
      • 2022-08-05 21724, 2022

      • yellowhatpro
        Kinda got late coz internship season has begun here in my college and I was a bit busy brushing data structures and algo and other subjects.
      • 2022-08-05 21748, 2022

      • yellowhatpro
        But will soon speed up contributions ヾ(•ω•`)o
      • 2022-08-05 21702, 2022

      • lucifer
        alastairp: uh, i encountered a snag while updating flask tests. https://github.com/metabrainz/listenbrainz-server…
      • 2022-08-05 21744, 2022

      • lucifer
        i had forgotten that the connection is scoped to a request so it'd get cleaned up after the first request.
      • 2022-08-05 21705, 2022

      • lucifer
        i was able to work around it this way: 1) instruct teardown to not do anything in TESTING. 2) push a manual app context in each test so that we can patch db_conn for the test. means we'd have to write the entire test in a with:.
      • 2022-08-05 21733, 2022

      • lucifer
        not ideal but it seems to work.
      • 2022-08-05 21752, 2022

      • akshaaatt
        Yes yellowhatpro, I am pretty much aligned with the designs.
      • 2022-08-05 21755, 2022

      • lucifer
        alastairp: oh i forgot to mention, another fun fact i learned. in postgres, value of `now()` is fixed for the entire duration of the transaction and equal to the time when the transaction began! if you want actual clock time, you need to use `clock_timestamp()`. i had to patch this at multiple places to make db tests work in LB.
      • 2022-08-05 21708, 2022

      • alastairp
        lucifer: oh yeah, I knew that about now(), but in most cases I guess it was ok?
      • 2022-08-05 21715, 2022

      • alastairp
        regarding db connections... so by scoping to a request we are still only creating one connection per request in the main webserver (as opposed to one per db query?)
      • 2022-08-05 21732, 2022

      • alastairp
        but this causes problems with tests or testcases that include multiple requests?
      • 2022-08-05 21727, 2022

      • alastairp
        ah right - because you need a single connection handle in the test case to be able to roll it back, and if you close it at the end of a request half way through a test then it's no longer valid?
      • 2022-08-05 21700, 2022

      • lucifer
        alastairp: there are multiple places where we order by created which is set to now() and the ordering of results turned out to be wrong. also some places we check < now() so results were incomplete so on.
      • 2022-08-05 21721, 2022

      • lucifer
        yes to the reason for needing a single connection.
      • 2022-08-05 21715, 2022

      • alastairp
        requiring us to push an app context inside every test method seems like a recipe for disaster, unfortunately
      • 2022-08-05 21753, 2022

      • alastairp
        lucifer: didn't we do some stuff in BU tests with a pytest context? I wonder if there are some pytest fixture behaviours which we could use to set up/tear down the connections?
      • 2022-08-05 21743, 2022

      • alastairp
        and I see about the now() - because we no longer have a separate transaction per db method I can see how this is going to cause different results
      • 2022-08-05 21742, 2022

      • alastairp
        ansh: reviewed works, it looks pretty good. just a few things to fix up
      • 2022-08-05 21701, 2022

      • lucifer
        alastairp: iiuc, that had to with not using unittest.TestCase. if we were using that in BU, we could have just used a setUp method or setUpClass etc.
      • 2022-08-05 21723, 2022

      • lucifer
        or if we had to reuse a fixture across TestCase classes.
      • 2022-08-05 21718, 2022

      • lucifer
        i tried to do a push in setUp and pop in teardown instead of using with app.app_context():, which is essentially what the with does but it fails that way do to some reason.
      • 2022-08-05 21749, 2022

      • lucifer
        i wonder if that has to do with how contextvars work...
      • 2022-08-05 21716, 2022

      • alastairp
        mm, right. that would have been my preference too. odd that it didn't work
      • 2022-08-05 21710, 2022

      • lucifer
        i'll try to get that working otherwise we can look at this together again after holidays.
      • 2022-08-05 21707, 2022

      • BrainzGit
        [bookbrainz-site] 14MonkeyDo opened pull request #868 (03master…fix-ac-link): Fix(AC): Fix author credit link https://github.com/metabrainz/bookbrainz-site/pul…
      • 2022-08-05 21742, 2022

      • zas
        atj: I added a config to nginx on crowdsec to test prometheus endpoint. That's not ideal, because it is expected each node running crowdsec exposes its own endpoint.
      • 2022-08-05 21703, 2022

      • zas
        atj: dashboard requires docker, see https://docs.crowdsec.net/docs/observability/dash…
      • 2022-08-05 21701, 2022

      • atj
        thanks for finding that, didn't look at that section of the docs
      • 2022-08-05 21712, 2022

      • atj
        not sure it's worth the effort to automate that step with ansible
      • 2022-08-05 21726, 2022

      • zas
        let's first test this dashboard, we need to add docker to the VM (via ansible)
      • 2022-08-05 21735, 2022

      • atj
        I'll update the PR
      • 2022-08-05 21747, 2022

      • atj
        done
      • 2022-08-05 21753, 2022

      • atj
        all the API communication seems to be under the "/v1" path, so we can probably use the same virtualhost for the dashboard and the API
      • 2022-08-05 21700, 2022

      • BrainzGit
        [bookbrainz-site] 14MonkeyDo merged pull request #868 (03master…fix-ac-link): Fix(AC): Fix author credit link https://github.com/metabrainz/bookbrainz-site/pul…
      • 2022-08-05 21715, 2022

      • ansh
        alastairp: Thanks for the review. I've made the required changes
      • 2022-08-05 21756, 2022

      • monkey
        aerozol: The newest mockup on CB-442 (V2d) looks great! IMO that's a great improvement over the existing pages; we could fiddle with details for months but I think implementing it as is would already be a big win
      • 2022-08-05 21757, 2022

      • BrainzBot
        CB-442: Improve layout of CB entity page https://tickets.metabrainz.org/browse/CB-442
      • 2022-08-05 21726, 2022

      • nawcom has quit
      • 2022-08-05 21723, 2022

      • nawcom joined the channel
      • 2022-08-05 21728, 2022

      • lucifer
        alastairp: oh well, it turns out i was doing something stupid. i was doing `self.app.app_context().push()` and `self.app.app_context().pop()`. and .app_context() creates a new ctx so the invalid ctx was popped and it failed.
      • 2022-08-05 21704, 2022

      • lucifer
      • 2022-08-05 21705, 2022

      • lucifer
        this works
      • 2022-08-05 21708, 2022

      • alastairp
        lucifer: oh, great!
      • 2022-08-05 21729, 2022

      • alastairp
        monkey: how do you think we should go about this redesign, then? something that we should start on now? Or wait for design system, or include into a react rewrite, or... ?
      • 2022-08-05 21708, 2022

      • monkey
        Currently the pages are not react-based? Are they jinja templates?
      • 2022-08-05 21724, 2022

      • alastairp
        100% Jinja
      • 2022-08-05 21741, 2022

      • monkey
        We could just implement them with jinja template. Most of it will be css styles I reckon
      • 2022-08-05 21748, 2022

      • alastairp
        and tbh, probably keen on keeping it like that for the moment
      • 2022-08-05 21752, 2022

      • monkey
        (Except maybe the filtering stuff)
      • 2022-08-05 21723, 2022

      • alastairp
        monkey: cocinista order shipped already!
      • 2022-08-05 21739, 2022

      • monkey
        I don't think anything much on this page requires the design system. On the contrary maybe some elements designed here could end up making their way to the DS in the end
      • 2022-08-05 21757, 2022

      • alastairp
        ok, great
      • 2022-08-05 21741, 2022

      • FichteFoll has quit
      • 2022-08-05 21710, 2022

      • FichteFoll joined the channel
      • 2022-08-05 21734, 2022

      • skelly37 has quit
      • 2022-08-05 21701, 2022

      • aerozol
        monkey: oh excellent! I'm happy with them too 🎉
      • 2022-08-05 21722, 2022

      • aerozol
        I've just asked sound.and.vision to have a look as he's the most active CB user, see if he can spot any opportunities for improvement
      • 2022-08-05 21734, 2022

      • aerozol
        yellowhatpro: I like it! The dark is super easy on the eye holes 👁️
      • 2022-08-05 21735, 2022

      • aerozol
        Quite different to the other pages though isn't it - so if akshaaatt has changes to make it fit in more with his other designs then go for it
      • 2022-08-05 21708, 2022

      • aerozol
        monkey: do you want a mobile mockup?
      • 2022-08-05 21746, 2022

      • monkey
        That would most like ly be useful yes
      • 2022-08-05 21734, 2022

      • thevar1able has quit
      • 2022-08-05 21726, 2022

      • thevar1able joined the channel