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
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
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?
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.
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.
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
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.
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