What I can certainly do is remove the `search_larger_time_range` part in user.py as part of the PR #992, since it doesn't serve any purpose anymore, and leave you to deal with the API endpoint separately. Would that work for you ruaok ?
2020-07-31 21350, 2020
white_snack joined the channel
2020-07-31 21352, 2020
white_shadow has quit
2020-07-31 21319, 2020
shivam-kapila
I may code the python stuff
2020-07-31 21316, 2020
shivam-kapila
Mr_Monkey: we should make a db call again at api level as it may lead to request timeouts
2020-07-31 21359, 2020
Mr_Monkey
I'm not following
2020-07-31 21305, 2020
white_snack has quit
2020-07-31 21308, 2020
shivam-kapila
You correctly suggest to do the comparision at api and fetch more listens in one call itself
2020-07-31 21335, 2020
shivam-kapila
Or send you a param and then you will send another request with that param
2020-07-31 21307, 2020
shivam-kapila
Param -> search_larger_time_range
2020-07-31 21329, 2020
white_snack joined the channel
2020-07-31 21309, 2020
shivam-kapila
Did I make myself clear this time? 😅
2020-07-31 21328, 2020
shivam-kapila
correctly = currently*
2020-07-31 21355, 2020
_lucifer
white_snack: i am onto it. just some minor fixes required. i'll leave the review on the pull request soon
2020-07-31 21317, 2020
Mr_Monkey
shivam-kapila: No, sorry, I'm still not with you.
2020-07-31 21317, 2020
Mr_Monkey
If it's about the mechanics of the API, I might not be familiar enough to follow.
2020-07-31 21350, 2020
Mr_Monkey
>Or send you a param and then you will send another request with that param
2020-07-31 21350, 2020
Mr_Monkey
I'm not suggesting we send a response from the API call that suggests doing another API call.
2020-07-31 21313, 2020
white_snack has quit
2020-07-31 21319, 2020
Mr_Monkey
Rather, during the API call if the DB returns $count_1 listens, less than the required $count_2 and the user has more than $count_1, then extend the time range.
2020-07-31 21339, 2020
Mr_Monkey
Are you suggesting this could cause a timeout of the API request?
2020-07-31 21301, 2020
Mr_Monkey
I suppose it depends on how long the DB calls take, but possible?
2020-07-31 21310, 2020
shivam-kapila
Yes exactly I mean this
2020-07-31 21329, 2020
shivam-kapila
That calling db 2 times might lead to timeout
2020-07-31 21321, 2020
ruaok
Mr_Monkey: let me ponder that I'm a bit, with friends atm.
2020-07-31 21334, 2020
Mr_Monkey
OKay :) Enjoy !
2020-07-31 21326, 2020
Mr_Monkey
shivam-kapila: Gotcha. I'm all caught up now :) Yes, that could be an issue. Not sure how one would deal with that.
2020-07-31 21313, 2020
iliekcomputers
search 5 days, then 10, then 20, then 40 and so on?
2020-07-31 21326, 2020
iliekcomputers
instead of searching 5, then all of history
2020-07-31 21330, 2020
shivam-kapila
No actually its 5 and then 50
2020-07-31 21335, 2020
kepstin
so the way the api works is that you pass it a start timestamp T, and it returns up to N listens, in a timestamp range between T and T+(something), right?
2020-07-31 21335, 2020
shivam-kapila
Currently
2020-07-31 21350, 2020
shivam-kapila
kepstin: right
2020-07-31 21304, 2020
shivam-kapila
Limiting it to a count if specified as API param
2020-07-31 21315, 2020
kepstin
i'm wondering if the api could just return "I searched up to end timestanp T+something" and the client could then just do another search starting at T+something if it didn't get enough results
2020-07-31 21338, 2020
shivam-kapila
Thats what I am suggesting
2020-07-31 21340, 2020
shivam-kapila
too
2020-07-31 21308, 2020
kepstin
(although you'd have to know when you've passed the first listen so you stop making requests, of course)
2020-07-31 21308, 2020
shivam-kapila
But make the client side automatically make call so that user doesnt have to deal with this stuff
2020-07-31 21334, 2020
kepstin
i wouldn't do this automatic "load more" when someone just visits the /user/name front page - they should have to do something to indicate they'd like to browse past listens before it goes to the paginated listen view
2020-07-31 21348, 2020
kepstin
(honestly, moving the paginated listen history to a separate page from the "/user/username" home page might be a good idea? so the home page only shows "recent listens", but there's a link to a paginated view to browse all listens)
2020-07-31 21338, 2020
shivam-kapila
You suggest making a profile page?
2020-07-31 21341, 2020
kepstin
I'd personally like the user home page to be more of a "dashboard" style layout that shows a few recent listens and maybe some graphs and charts together.
2020-07-31 21302, 2020
shivam-kapila
Oh that can be nice
2020-07-31 21329, 2020
kepstin
(admittedly, that's partly because that sort of thing is what i'm used to from last fm)
2020-07-31 21337, 2020
shivam-kapila
kepstin: can you please open a ticket for these suggestions. I like your idea :)
2020-07-31 21326, 2020
Mr_Monkey
So, I agree that if we have request timeout issues we could return a specific code or flag from the API endpoint that indicates there should be more listens to fetch, implement an optional time_range param on the API endpoint, and let the front-end deal with fetching again (either automatically or manually ["load more" button click] ).
2020-07-31 21347, 2020
shivam-kapila
That might be nice
2020-07-31 21313, 2020
Mr_Monkey
The dashboard thing *might* work, but we'll still have the same issue in some cases unless we explicitly say we're presenting the most recent listens *from the past 5 days*
i'm not sure if they're a legit user or actually spamming
2020-07-31 21350, 2020
Mr_Monkey
Yeah, that user has been flagged already. Totally spamming
2020-07-31 21321, 2020
shivam-kapila
Where do we see spam status
2020-07-31 21307, 2020
Mr_Monkey
Nowhere currently.
2020-07-31 21318, 2020
Mr_Monkey
Or…in our collective memory.
2020-07-31 21334, 2020
iliekcomputers
most of the songs are minutes long, I figure it could be just this user listening to the same stuff 24 hours a day
2020-07-31 21350, 2020
shivam-kapila
Strange
2020-07-31 21308, 2020
Mr_Monkey
I doubt it. That's the user's bands, and listening habits changed from normal listening to 24/7 promoting their own bands.
2020-07-31 21324, 2020
shivam-kapila
Tht still maked 20 hours approx
2020-07-31 21339, 2020
iliekcomputers
ugh
2020-07-31 21353, 2020
shivam-kapila
He is surely spamming
2020-07-31 21306, 2020
iliekcomputers
we need a disable user button in the admin page.
2020-07-31 21317, 2020
Mr_Monkey
+1
2020-07-31 21320, 2020
_lucifer
as LB grows, it'll need some sort of protection against spam
2020-07-31 21339, 2020
_lucifer
something like spambrainz integration
2020-07-31 21336, 2020
Mr_Monkey
> If any request times out simply show try again
2020-07-31 21336, 2020
Mr_Monkey
But that doesn't solve the timeout issue, does it?
2020-07-31 21346, 2020
shivam-kapila
No it wont
2020-07-31 21328, 2020
shivam-kapila
But that will save us from 2 API calls in most cases
2020-07-31 21351, 2020
shivam-kapila
Hopefully
2020-07-31 21305, 2020
kepstin
the db issues are part of the reason why i think the listen browsing page should be separate from the user's main page - just browsing to a user page shouldn't trigger a request loop to the backend
2020-07-31 21336, 2020
iliekcomputers
Freso: could we reach out to https://musicbrainz.org/user/hds once and politely ask them to stop their LB spam? (https://listenbrainz.org/user/hds, 1196 listens per day for their own band). I'm happy to do it, although I think you're the better person to reach out here. :)
2020-07-31 21334, 2020
Mr_Monkey
kepstin: it won't. Currently, when you load a user's page the most recent listens are loaded with it, without a need for an API call.
2020-07-31 21351, 2020
iliekcomputers
in the meanwhile, i'll build some tooling to manually disable users.
2020-07-31 21335, 2020
shivam-kapila
Mr_Monkey: do you need help with python bits
2020-07-31 21340, 2020
kepstin
Mr_Monkey: that's fine, as long as the javascript code doesn't thing "oh hey, i got less than 25 listens, better request more" on page load :)
2020-07-31 21305, 2020
Mr_Monkey
Yeah I agree we need to be careful of the solutions we implement to avoid stupid workflows
2020-07-31 21350, 2020
Mr_Monkey
And to be fair, if page load is significantly increased just to avoid showing the user a "load more" button, then it's the wrong solution, so point taken.
2020-07-31 21311, 2020
Mr_Monkey
shivam-kapila: I'm going to not touch the python stuff at all, 'cause I'm a python n00b, but you can coordinate with ruaok when he's back in front of a computer, since he said he'd have a look tomorrow.
2020-07-31 21301, 2020
shivam-kapila
okay thanks
2020-07-31 21324, 2020
shivam-kapila
Hope didnt interfere in thele flow :)
2020-07-31 21330, 2020
Mr_Monkey
The more I think about it, the clearer it is that we need the combination of "load more" button and the appropriate `time_range`param for the API endpoint. That way we don't increase initial page load time by automatically looking for more listens but instead make it a user-requested action.
2020-07-31 21346, 2020
Mr_Monkey
shivam-kapila: Not at all, on the contrary it was good to discuss the details.
2020-07-31 21307, 2020
Mr_Monkey has to leave, bai !
2020-07-31 21317, 2020
shivam-kapila
Mr_Monkey: oh yes thats an edge case too
2020-07-31 21356, 2020
iliekcomputers
yvanzo: fyi, gsoc evals are due at 18 UTC today.
2020-07-31 21337, 2020
white_snack joined the channel
2020-07-31 21316, 2020
yvanzo
iliekcomputers: still on it, thanks
2020-07-31 21339, 2020
ruaok
Mr_Monkey: shivam-kapila can one of you make a gist or ticket with what has been decided for the range fix?
2020-07-31 21314, 2020
ruaok
diru1100: have still have t filled out your eval.
2020-07-31 21334, 2020
shivam-kapila
He hasnt filled yet?
2020-07-31 21345, 2020
shivam-kapila
Shall I give him a call?
2020-07-31 21355, 2020
ruaok
diru1100 == Rohit, no?
2020-07-31 21300, 2020
shivam-kapila
yes
2020-07-31 21322, 2020
ruaok
Not filled it out.
2020-07-31 21327, 2020
ruaok
So, please call him.
2020-07-31 21334, 2020
shivam-kapila
Okay I will
2020-07-31 21335, 2020
sumedh joined the channel
2020-07-31 21337, 2020
ruaok
Missing it is being failed no?
2020-07-31 21342, 2020
shivam-kapila
yep
2020-07-31 21304, 2020
ruaok
He's on the track to failing...
2020-07-31 21356, 2020
shivam-kapila
he isnt picking up
2020-07-31 21308, 2020
diru1100
ruaok: Yes, I have filled my form. It shows completed.
2020-07-31 21355, 2020
ruaok
Oh, shit. Sorry. Not complete by mentor.
2020-07-31 21358, 2020
ruaok
My bad.
2020-07-31 21321, 2020
ruaok
yvanzo: hey, can you please submit that review now??
2020-07-31 21338, 2020
ruaok
Sorry for the scare.
2020-07-31 21310, 2020
diru1100
😅 its alright :)
2020-07-31 21303, 2020
white_snack has quit
2020-07-31 21333, 2020
yvanzo
sent
2020-07-31 21326, 2020
yvanzo
sorry for the stress, there was no hesitation though
2020-07-31 21307, 2020
ruaok
> Nice work! All MetaBrainz Foundation Inc. evaluations are complete.
2020-07-31 21311, 2020
ruaok
Yay.
2020-07-31 21322, 2020
shivam-kapila
Maually failed all?
2020-07-31 21327, 2020
shivam-kapila
Manually*
2020-07-31 21340, 2020
ruaok
Next deadline I'll set it for 24 hours earlier. Anyone who fails to make that deadline must buy chocolate for the team.
2020-07-31 21333, 2020
iliekcomputers
ishaanshah: hey, i'm around
2020-07-31 21310, 2020
ishaanshah
iliekcomputers: Hi!
2020-07-31 21334, 2020
iliekcomputers
how are you?
2020-07-31 21343, 2020
ishaanshah
Doing well
2020-07-31 21300, 2020
ishaanshah
Today was not productive for me
2020-07-31 21312, 2020
ishaanshah
Testing trouble 😅
2020-07-31 21318, 2020
yvanzo
ruaok: the good, the bad and the hungry ;)
2020-07-31 21325, 2020
iliekcomputers
oh, no worries, we all have those kind of days :)
2020-07-31 21342, 2020
ishaanshah
The tests are done now
2020-07-31 21352, 2020
ishaanshah
I will work on frontend on Monday
2020-07-31 21306, 2020
iliekcomputers
sure, sounds good.
2020-07-31 21311, 2020
iliekcomputers
thanks for taking the time to help out alastairp yesterday.
2020-07-31 21331, 2020
ishaanshah
He has given some really useful feedback
2020-07-31 21339, 2020
iliekcomputers
as always :)
2020-07-31 21303, 2020
ishaanshah
I will think a bit more about the import process over the weekend
2020-07-31 21325, 2020
alastairp
yeah, that was really useful to get an overview of how everything works
2020-07-31 21340, 2020
alastairp
I have a few ideas for improving the development workflow, hopefully will push those through next week
2020-07-31 21358, 2020
iliekcomputers
ishaanshah: mhmm, sounds good. i'd still prioritize the gosc work over the improvements to the dev env for now
2020-07-31 21301, 2020
iliekcomputers
alastairp: thanks!
2020-07-31 21313, 2020
ishaanshah
Yep, I will open up some tickets
2020-07-31 21323, 2020
ishaanshah
and pick them up later after gsoc
2020-07-31 21323, 2020
alastairp
yeah, I'm happy to take feedback on recommendations for improvements, and I'll do them to not use up ishaanshah's time
2020-07-31 21348, 2020
alastairp
ruaok: agreed. note that you didn't specify what chocolate we must buy