mayhem: i made a few changes to the cache to make it work and left it running overnight on wolf. going fine so far.
mayhem
Great! Still using Spotipy?
lucifer
mayhem: sort of, i forked it and edited it to accept a custom retry strategy.
alastairp: the dumps you mentioned yesterday, do those include mb_metadata_cache table?
reosarevok
mayhem: Wonder if we're listed somewhere in a list as hiring or some weird shit
Given we keep getting hail mary job proposals
mayhem
I have no idea, reosarevok . Just keep ignoring them.
lucifer: oh, good idea!
reosarevok
Yeah, I guess. I considered answering to one and asking where they got the idea of writing to us
But they might get encouraged :p
alastairp
morning lucifer, actually - good point
looking back at my notes, we weren't planning on including it, but perhaps it's a good addition
BrainzGit
[critiquebrainz] 14anshg1214 opened pull request #456 (03master…handle_deleted_and_redirected_entities): Handle Deleted and Redirected Edition Groups https://github.com/metabrainz/critiquebrainz/pu...
atj
zas: well, it looks to be working, but doesn't seem aggressive enough with blocking the SSH brute force attacks
hmm, perhaps I'm missing something
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
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
monkey
I suspect so too
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.
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:.
not ideal but it seems to work.
akshaaatt
Yes yellowhatpro, I am pretty much aligned with the designs.
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.
alastairp
lucifer: oh yeah, I knew that about now(), but in most cases I guess it was ok?
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?)
but this causes problems with tests or testcases that include multiple requests?
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?
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.
yes to the reason for needing a single connection.
alastairp
requiring us to push an app context inside every test method seems like a recipe for disaster, unfortunately
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?
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
ansh: reviewed works, it looks pretty good. just a few things to fix up
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.
or if we had to reuse a fixture across TestCase classes.
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.
i wonder if that has to do with how contextvars work...
alastairp
mm, right. that would have been my preference too. odd that it didn't work
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
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... ?
monkey
Currently the pages are not react-based? Are they jinja templates?
alastairp
100% Jinja
monkey
We could just implement them with jinja template. Most of it will be css styles I reckon
alastairp
and tbh, probably keen on keeping it like that for the moment
monkey
(Except maybe the filtering stuff)
alastairp
monkey: cocinista order shipped already!
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
alastairp
ok, great
FichteFoll has quit
FichteFoll joined the channel
skelly37 has quit
aerozol
monkey: oh excellent! I'm happy with them too 🎉
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
yellowhatpro: I like it! The dark is super easy on the eye holes 👁️
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