#metabrainz

/

      • ruaok
      • 2020-11-21 32607, 2020

      • ruaok
        with playlist identifier
      • 2020-11-21 32600, 2020

      • ruaok
        Mr_Monkey: I thought of you when I saw this: https://photos.app.goo.gl/syjH2e5zjdwqV8YDA
      • 2020-11-21 32638, 2020

      • Mr_Monkey
        Horny wurst
      • 2020-11-21 32659, 2020

      • alastairp
      • 2020-11-21 32602, 2020

      • alastairp
        ruaok: ^
      • 2020-11-21 32653, 2020

      • alastairp
      • 2020-11-21 32636, 2020

      • _lucifer
        i have probably debugged the issue with websockets. the client is not sending the correct cors header.
      • 2020-11-21 32635, 2020

      • ruaok
        very good. is it sending the right header now?
      • 2020-11-21 32628, 2020

      • _lucifer
        not yet. trying to work that out now.
      • 2020-11-21 32639, 2020

      • shalini_ joined the channel
      • 2020-11-21 32604, 2020

      • shalini__ joined the channel
      • 2020-11-21 32633, 2020

      • _lucifer
        looks like there is more than one issue at play here. LB is using Flask SocketIO for websockets and Flask CORS to handle cors. apparently, socketio does requires independent handling of CORS.
      • 2020-11-21 32623, 2020

      • _lucifer
        I configure Flask SOcketIO to allow cors from * for now. Before that the request was reaching the webserver and returned a 400. After the change, requests are now failing with
      • 2020-11-21 32626, 2020

      • _lucifer
        Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8081/socket.io/?EIO=3&transp…. (Reason: CORS request did not succeed).
      • 2020-11-21 32650, 2020

      • _lucifer
        i'll continue investigating
      • 2020-11-21 32654, 2020

      • sumedh has quit
      • 2020-11-21 32653, 2020

      • alastairp
        setting cors to * is fine in socketio, I think
      • 2020-11-21 32606, 2020

      • sumedh joined the channel
      • 2020-11-21 32610, 2020

      • alastairp
      • 2020-11-21 32647, 2020

      • alastairp
        ruaok: can you take a look at the above ds hoster - recording_mbid should be [recording_mbid] to facilitate bulk lookups via POST?
      • 2020-11-21 32617, 2020

      • ruaok
        on it.
      • 2020-11-21 32634, 2020

      • ruaok
        I need to take time in the next week to clean up the hoster data sets.
      • 2020-11-21 32636, 2020

      • ruaok
      • 2020-11-21 32602, 2020

      • sumedh has quit
      • 2020-11-21 32607, 2020

      • alastairp
        ruaok: WritablePlaylistRecording push
      • 2020-11-21 32610, 2020

      • alastairp
        pushed
      • 2020-11-21 32614, 2020

      • ruaok
        thx
      • 2020-11-21 32617, 2020

      • ruaok
        thxed
      • 2020-11-21 32651, 2020

      • sumedh joined the channel
      • 2020-11-21 32636, 2020

      • sumedh has quit
      • 2020-11-21 32608, 2020

      • sumedh joined the channel
      • 2020-11-21 32654, 2020

      • BrainzGit
        [listenbrainz-server] amCap1712 opened pull request #1181 (master…playlist): Fix websockets for follow server https://github.com/metabrainz/listenbrainz-server…
      • 2020-11-21 32603, 2020

      • _lucifer
        ruaok: alastairp: Mr_Monkey: works locally. can we test on beta ?
      • 2020-11-21 32615, 2020

      • ruaok
        _lucifer: can you please make the PR against "playlist-feature' branch?
      • 2020-11-21 32621, 2020

      • _lucifer
        ah sure
      • 2020-11-21 32634, 2020

      • alastairp
        ruaok: maybe we can just deploy the follow fixes on beta.lb.org first?
      • 2020-11-21 32643, 2020

      • alastairp
        and if that works, we can merge the work into the playlist branch
      • 2020-11-21 32645, 2020

      • ruaok
        I suppose.
      • 2020-11-21 32653, 2020

      • ruaok
        I'm sorta stopped anyway.
      • 2020-11-21 32601, 2020

      • alastairp
        OK, no problem either way
      • 2020-11-21 32607, 2020

      • ruaok
        _lucifer: I'll try your branch on beta.
      • 2020-11-21 32628, 2020

      • _lucifer
        thanks!
      • 2020-11-21 32640, 2020

      • _lucifer
        i just switched the branch. should I reverse?
      • 2020-11-21 32658, 2020

      • ruaok
        naw
      • 2020-11-21 32603, 2020

      • ruaok
        I'll pull from your repo
      • 2020-11-21 32607, 2020

      • ruaok
        any config changes needed for your branch, _lucifer
      • 2020-11-21 32628, 2020

      • _lucifer
        no
      • 2020-11-21 32634, 2020

      • ruaok
        ok
      • 2020-11-21 32641, 2020

      • ruaok
        listenbrainz-follow-dispatcher-beta and listenbrainz-web-beta updated on lemmy.
      • 2020-11-21 32612, 2020

      • ruaok
        I see things in the playlist section. that's good, yes?
      • 2020-11-21 32625, 2020

      • _lucifer
        yes but i made a mistake
      • 2020-11-21 32631, 2020

      • _lucifer
        changed the login to test
      • 2020-11-21 32657, 2020

      • _lucifer
        i'll push the fix rn
      • 2020-11-21 32631, 2020

      • _lucifer
        pushed the fix for that
      • 2020-11-21 32602, 2020

      • alastairp
        _lucifer: looking at your changes, they make sense 👍
      • 2020-11-21 32603, 2020

      • alastairp
        thanks
      • 2020-11-21 32626, 2020

      • alastairp
        I'm just thinking out loud, do we set CORS headers on the main LB API for POST methods?
      • 2020-11-21 32637, 2020

      • alastairp
        I'm thinking about submitting a listen from a different domain, for example
      • 2020-11-21 32644, 2020

      • ruaok
        deployed again.
      • 2020-11-21 32627, 2020

      • _lucifer
        awesome, thanks!
      • 2020-11-21 32636, 2020

      • alastairp
      • 2020-11-21 32649, 2020

      • _lucifer
      • 2020-11-21 32603, 2020

      • alastairp
        _lucifer: ah yes, that's the decorator that I was thinking of
      • 2020-11-21 32604, 2020

      • alastairp
        good oen
      • 2020-11-21 32607, 2020

      • alastairp
        good one
      • 2020-11-21 32632, 2020

      • ruaok
        I can't tell if its working or not... since we're not submitting to beta...
      • 2020-11-21 32614, 2020

      • _lucifer
        its not working yet.
      • 2020-11-21 32639, 2020

      • ruaok
        how will you know if it is?
      • 2020-11-21 32639, 2020

      • _lucifer
        i can see errors in the console. can you check the if the follow server is running ?
      • 2020-11-21 32611, 2020

      • ruaok
      • 2020-11-21 32635, 2020

      • ruaok
      • 2020-11-21 32640, 2020

      • ruaok
        the logs from the dispatcher
      • 2020-11-21 32644, 2020

      • _lucifer
        the console should not display errors and the follow server should return one of the responses we define in the dispatcher
      • 2020-11-21 32603, 2020

      • _lucifer
        (to know that it is working)
      • 2020-11-21 32609, 2020

      • ruaok
        me nods
      • 2020-11-21 32641, 2020

      • Mr_Monkey
        shivam-kapila: How's it going on on your side?
      • 2020-11-21 32624, 2020

      • Mr_Monkey
        Here I've got a solid base for the playlistS and playlist pages, just about to implement some drag&drop.
      • 2020-11-21 32605, 2020

      • sumedh has quit
      • 2020-11-21 32650, 2020

      • ruaok
        alastairp: when I call db_playlist.get_by_id(playlist_mbid) and it doesn't exist what can I expect to happen?
      • 2020-11-21 32605, 2020

      • alastairp
        you'll get None
      • 2020-11-21 32637, 2020

      • _lucifer
      • 2020-11-21 32637, 2020

      • alastairp
        or ValueError if the argument isn't a valid UUID
      • 2020-11-21 32616, 2020

      • ruaok
        I'm already checking for invalid UUID, so, None it is.
      • 2020-11-21 32601, 2020

      • _lucifer
        this is my local logs. the dispatcher seems to be working locally but not in beta.
      • 2020-11-21 32614, 2020

      • ruaok
        so, remember that in beta, no one is submitting listens to beta, so no traffic is being sent via the websocket.
      • 2020-11-21 32628, 2020

      • ruaok
        try submitting listens to beta and see if those come through.
      • 2020-11-21 32657, 2020

      • _lucifer
        will try that.
      • 2020-11-21 32632, 2020

      • _lucifer
        Mr_Monkey: how can i check the value of `this.props` used in react for the current window
      • 2020-11-21 32607, 2020

      • Mr_Monkey
        There is a React devtools extension that will give you access to the react components
      • 2020-11-21 32650, 2020

      • Mr_Monkey
      • 2020-11-21 32602, 2020

      • _lucifer
        thanks!
      • 2020-11-21 32632, 2020

      • Mr_Monkey
        Ah _lucifer actually there's a simpler solution, sorry!
      • 2020-11-21 32613, 2020

      • Mr_Monkey
        We inject the props in the web page itself, look for the element with id `react-props`
      • 2020-11-21 32647, 2020

      • Mr_Monkey
      • 2020-11-21 32602, 2020

      • _lucifer
        ruaok: i tried submitting listens to beta but that didn't work. However, i noticed another thing I get no such domain error on trying to open https://beta-sockets.listenbrainz.org/ but a 404 on https://sockets.listenbrainz.org/
      • 2020-11-21 32628, 2020

      • ruaok
        one sec.
      • 2020-11-21 32633, 2020

      • alastairp
        ruaok: get playlist by mbid: should it include recordings? Or maybe a flag to say if you want to include them or not. get all playlists for a user? Seems like it shouldn't return recordings in the normal case (e.g. for Mr_Monkey's default view)
      • 2020-11-21 32613, 2020

      • ruaok
        alastairp: flag seems wise, but I suspect I will always want recordings.
      • 2020-11-21 32640, 2020

      • ruaok
        > tried submitting listens to beta but that didn't work.
      • 2020-11-21 32658, 2020

      • ruaok
        _lucifer: did the listens not arrive or the listens arrived, but were not sent via sockets?
      • 2020-11-21 32658, 2020

      • alastairp
        I think default True for single playlist and default False for playlists by a user feels right for now. I'll leave the flag in, and we can revisit it later
      • 2020-11-21 32612, 2020

      • _lucifer
        ruaok: the sockets thing did not work,
      • 2020-11-21 32622, 2020

      • ruaok
        ok, thats good.
      • 2020-11-21 32640, 2020

      • _lucifer
        the listen showed up in BP but sockets still error out on beta.
      • 2020-11-21 32649, 2020

      • ruaok
        and sockets.listenbrainz.org is for production, so errors there should, at least in theory not be a problem right this sec.
      • 2020-11-21 32601, 2020

      • ruaok
        what error do you get on beta?
      • 2020-11-21 32623, 2020

      • alastairp
        ruaok: next: get playlists (plural) for a user - for the requesting user, this would include private playlists, but if it's for a different user you won't want to show the private ones. Do you want to filter that in sql, or in the api view?
      • 2020-11-21 32638, 2020

      • _lucifer
        i tried to open it directly in browser
      • 2020-11-21 32658, 2020

      • _lucifer
      • 2020-11-21 32630, 2020

      • ruaok
        alastairp: I am leaning towards SQL, that reduced the data that is flowing.
      • 2020-11-21 32648, 2020

      • alastairp
        ruaok: OK, will add a parameter for you to set
      • 2020-11-21 32655, 2020

      • ruaok
        k
      • 2020-11-21 32622, 2020

      • ruaok
        _lucifer: that's because that record doesn't exist. sigh.
      • 2020-11-21 32637, 2020

      • ruaok
        I'll add it. for now, add the entry to your /etc/hosts to continue
      • 2020-11-21 32626, 2020

      • ruaok
        DNS record added. will take time to propagate.
      • 2020-11-21 32615, 2020

      • ruaok
      • 2020-11-21 32630, 2020

      • alastairp
        yeah, I just found that one
      • 2020-11-21 32629, 2020

      • ruaok
        I'll try and see.
      • 2020-11-21 32634, 2020

      • ruaok
        alastairp: do you have a feeling for how to express a boolean as a URL ? arg? private=t ? private=1 ?
      • 2020-11-21 32622, 2020

      • alastairp
        in acousticbrainz we require it to be 'true' exactly
      • 2020-11-21 32628, 2020

      • ruaok
        I'll do that.
      • 2020-11-21 32629, 2020

      • ruaok
        ok, pushed my changes, with all tests failing, since there are not underpinning guts yet.
      • 2020-11-21 32627, 2020

      • alastairp
        oh, one thing I wanted to ask:
      • 2020-11-21 32645, 2020

      • alastairp
        do the unit tests set up access to, and clear after each test, the timescale db?
      • 2020-11-21 32657, 2020

      • ruaok
        alastairp: I don't recall.
      • 2020-11-21 32621, 2020

      • alastairp
        ruaok: pushed
      • 2020-11-21 32628, 2020

      • ruaok
        thx
      • 2020-11-21 32634, 2020

      • alastairp
        ruaok: OK, I'll double check that, I'll need ts database for db unit tests
      • 2020-11-21 32652, 2020

      • _lucifer
        the record is updated now i think. the console logs show that wss connection succeeded
      • 2020-11-21 32609, 2020

      • ruaok
        fix confirmed?
      • 2020-11-21 32627, 2020

      • _lucifer
        yeah but the youtube thing broke :(
      • 2020-11-21 32653, 2020

      • _lucifer
        BP is not working on follow page of beta.lb
      • 2020-11-21 32637, 2020

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #1804 (master…MBS-11243): MBS-11243: Convert cover art forms and pages to React https://github.com/metabrainz/musicbrainz-server/…
      • 2020-11-21 32604, 2020

      • _lucifer
        Mr_Monkey: console shows Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('https://beta.listenbrainz.org').
      • 2020-11-21 32659, 2020

      • shivam-kapila
        _lucifer: that occurs most of the time
      • 2020-11-21 32659, 2020

      • Mr_Monkey
        Yeah, I've seen some of those errors. Ignore them for now, I'll get to it. As far as I could tell it doesn't prevent the youtube player from working
      • 2020-11-21 32630, 2020

      • shivam-kapila
        Mr_Monkey: things going good. I will show something in some time
      • 2020-11-21 32644, 2020

      • Mr_Monkey
        Any blockers?
      • 2020-11-21 32649, 2020

      • shivam-kapila is high on loads of coffee
      • 2020-11-21 32651, 2020

      • Mr_Monkey
        (or questions?)
      • 2020-11-21 32627, 2020

      • shivam-kapila
        Mr_Monkey: none yet. but I think I will soonish
      • 2020-11-21 32637, 2020

      • Mr_Monkey
        Cool :)
      • 2020-11-21 32657, 2020

      • _lucifer
        ruaok: can you check the follow server logs again when possible. this issue seems to be unrelated to the websockets issue
      • 2020-11-21 32643, 2020

      • ruaok
      • 2020-11-21 32624, 2020

      • ruaok
      • 2020-11-21 32629, 2020

      • ruaok
        that looks most interesting
      • 2020-11-21 32657, 2020

      • ruaok
        that error appears multiple times.
      • 2020-11-21 32632, 2020

      • _lucifer
        yeah according to the current implementation it should occur whenever the page loads first
      • 2020-11-21 32644, 2020

      • _lucifer
        so websockets issue is fixed.