#metabrainz

/

      • Leftmost
        Helps if postgres is running when I try to INSERT.
      • 2015-12-20 35412, 2015

      • stanislas
        LordSputnik, Leftmost: I've pulled password and it is still 'alfa'
      • 2015-12-20 35405, 2015

      • Leftmost
        stanislas, one moment. You'll need a password hash.
      • 2015-12-20 35445, 2015

      • Nyanko-sensei has quit
      • 2015-12-20 35446, 2015

      • Leftmost
        Set the password field to the following:
      • 2015-12-20 35448, 2015

      • Leftmost
        $2b$12$AJTVpce37LM9Dk93qzRe.eMSw1ivsAmoa037.eS6VXoLAyK9cy0YG
      • 2015-12-20 35459, 2015

      • Leftmost
        Then use password `bb'
      • 2015-12-20 35438, 2015

      • Leftmost
        That is, when you create the editor, set password='$2b$12$AJTVpce37LM9Dk93qzRe.eMSw1ivsAmoa037.eS6VXoLAyK9cy0YG' and then when POSTing to the oauth endpoint use password='bb'.
      • 2015-12-20 35451, 2015

      • stanislas
        which one to use when initalizing user ?
      • 2015-12-20 35412, 2015

      • stanislas
        aa, ok
      • 2015-12-20 35420, 2015

      • stanislas
        haven't seen your last message
      • 2015-12-20 35407, 2015

      • stanislas
        should it be unicode ?
      • 2015-12-20 35419, 2015

      • stanislas
        Leftmost: ^
      • 2015-12-20 35449, 2015

      • stanislas
        Leftmost: It works :)
      • 2015-12-20 35453, 2015

      • stanislas
        finally
      • 2015-12-20 35412, 2015

      • Leftmost
        The first one is a hashed and salted password, which is what needs to be stored in the database. (We do this for security reasons, so that someone who gets a hold of the database can't figure out anyone's passwords.) When a user logs in, they send across their password and our code uses the information stored in the database to hash the incoming password and check if it's the right one.
      • 2015-12-20 35420, 2015

      • stanislas
        Leftmost: That's exactly how I have imagined it.
      • 2015-12-20 35404, 2015

      • opatel99
        Leftmost: Does BB have an active loading spinner?
      • 2015-12-20 35415, 2015

      • opatel99
        I would think not
      • 2015-12-20 35445, 2015

      • stanislas
        Leftmost: The deleting line doesn't work still.
      • 2015-12-20 35450, 2015

      • stanislas
        It is reporting 401
      • 2015-12-20 35411, 2015

      • stanislas
        Leftmost: I've commited the changes.
      • 2015-12-20 35457, 2015

      • LordSputnik
        opatel99: it does have a loading spinner, but we don't use it anywhere
      • 2015-12-20 35418, 2015

      • opatel99
        LordSputnik: What about the generating margins...?
      • 2015-12-20 35419, 2015

      • Leftmost
        stanislas, when you POST to the oauth endpoint, it should send a response with an access token. You'll need to use that access token when you hit the DELETE creator endpoint.
      • 2015-12-20 35438, 2015

      • Leftmost
        I don't know exactly how to do that in python, though
      • 2015-12-20 35438, 2015

      • Leftmost
        .
      • 2015-12-20 35436, 2015

      • LordSputnik
        stanislas: yeah, the response for auth will contain an access token, you'll have to include that in the "Authorization" header of the delete request
      • 2015-12-20 35444, 2015

      • Nyanko-sensei joined the channel
      • 2015-12-20 35416, 2015

      • LordSputnik
        stanislas: (the value of the header should be 'Bearer ' + access_token)
      • 2015-12-20 35420, 2015

      • stanislas
        ok, trying it now
      • 2015-12-20 35449, 2015

      • opatel99
        Leftmost: https://iezztilwtb.localtunnel.me LordSputnik
      • 2015-12-20 35405, 2015

      • stanislas
        LordSputnik: I have this header (for example 'Bearer 9NHeEeBuiMOpKGsX0PRJEqGjunJXUN')
      • 2015-12-20 35418, 2015

      • stanislas
        There is an argument in delete called headers
      • 2015-12-20 35440, 2015

      • stanislas
        how can i pass this header as this argument ?
      • 2015-12-20 35417, 2015

      • LordSputnik
        stanislas: see Headers parameter of http://werkzeug.pocoo.org/docs/0.11/test/#werkzeu…
      • 2015-12-20 35432, 2015

      • stanislas
        I know, i've seen this site before
      • 2015-12-20 35412, 2015

      • LordSputnik
        opatel99: the contact links should still be grey, also the search input needs decreasing in size still :)
      • 2015-12-20 35423, 2015

      • opatel99
        LordSputnik: On it
      • 2015-12-20 35433, 2015

      • stanislas
        LordSputnik: I know that there is 'headers' parameter, but it's not specified how I should pass it to delete
      • 2015-12-20 35400, 2015

      • stanislas
        delete(url,headers=[my_header]) >
      • 2015-12-20 35416, 2015

      • stanislas
        delete(url,headers=my_header] ?
      • 2015-12-20 35438, 2015

      • stanislas
        * delete(url,headers=my_header)
      • 2015-12-20 35408, 2015

      • opatel99
        LordSputnik: Search on home page or on the navbar?
      • 2015-12-20 35415, 2015

      • oliverl has quit
      • 2015-12-20 35415, 2015

      • stanislas
        LordSputnik: My current delete looks like that : response2 = self.client.delete('/creator/{}/'.format(random_instance_gid),headers=Headers([('Bearer', access_token)]))
      • 2015-12-20 35448, 2015

      • Leftmost
        The header's name is Authorization, the content 'Bearer ' + access_token.
      • 2015-12-20 35425, 2015

      • triggerwarning joined the channel
      • 2015-12-20 35427, 2015

      • dcentral joined the channel
      • 2015-12-20 35410, 2015

      • stanislas
        Leftmost: like this : response2 = self.client.delete('/creator/{}/'.format(random_instance_gid),headers=Headers([('Authorization', 'Bearer' + access_token)])) ?
      • 2015-12-20 35437, 2015

      • Leftmost
        The space is important, but otherwise I think that'd work.
      • 2015-12-20 35445, 2015

      • LordSputnik
        'Bearer '
      • 2015-12-20 35410, 2015

      • LordSputnik
        opatel99: home page
      • 2015-12-20 35416, 2015

      • stanislas
      • 2015-12-20 35426, 2015

      • stanislas
        Leftmost: ^
      • 2015-12-20 35440, 2015

      • stanislas
        This is what appeared now
      • 2015-12-20 35440, 2015

      • opatel99
      • 2015-12-20 35405, 2015

      • triggerwarning has quit
      • 2015-12-20 35405, 2015

      • triggerwarning joined the channel
      • 2015-12-20 35403, 2015

      • stanislas
        opatel99: This url you posted doesn't work for me
      • 2015-12-20 35430, 2015

      • dcentral has quit
      • 2015-12-20 35430, 2015

      • triggerwarning has quit
      • 2015-12-20 35458, 2015

      • opatel99
      • 2015-12-20 35410, 2015

      • opatel99
        Srry
      • 2015-12-20 35424, 2015

      • stanislas
        LordSputnik, Leftmost: I am getting to sleep - it is 2 AM for me now, thanks for help so far :)
      • 2015-12-20 35420, 2015

      • sle has quit
      • 2015-12-20 35435, 2015

      • LordSputnik
        stanislas: you've found a bug ;)
      • 2015-12-20 35438, 2015

      • LordSputnik
        I think
      • 2015-12-20 35402, 2015

      • LordSputnik
        Ahh OK, that is a bug, but you should cover it with another test (ie. test that the endpoint doesn't error if the user leaves the revision note blank)
      • 2015-12-20 35435, 2015

      • yeeeargh has quit
      • 2015-12-20 35441, 2015

      • LordSputnik
        For now, you'll want to add some JSON data, with something like '{"revision": {"note": "A Test Note"}'
      • 2015-12-20 35414, 2015

      • opatel99
        LordSputnik: anything else?? Or should I make patch and generate screenshots
      • 2015-12-20 35416, 2015

      • LordSputnik
        opatel99: let's go for a first round of screenshots on the task (zip/tar.gz file please!), then we can more easily see how things look on the pages behind authentication
      • 2015-12-20 35422, 2015

      • LordSputnik
        Don't worry about the code for now
      • 2015-12-20 35456, 2015

      • LordSputnik
        opatel99: I won't be able to check them tonight (1:21AM here) but I'll do my best to go through them in about 10 hours time and comment on the task
      • 2015-12-20 35414, 2015

      • opatel99
        Leftmost: ?
      • 2015-12-20 35430, 2015

      • Bookzombie has quit
      • 2015-12-20 35432, 2015

      • opatel99
        LordSputnik: Okay. Submitting tonight
      • 2015-12-20 35454, 2015

      • LordSputnik
        Then we can do 1 or 2 more rounds if you're around tomorrow at about 7-10 UTC, and then hopefully finalize things :)
      • 2015-12-20 35435, 2015

      • opatel99
        LordSputnik: Im down with that
      • 2015-12-20 35459, 2015

      • darwin
        games
      • 2015-12-20 35400, 2015

      • Bookzombie joined the channel
      • 2015-12-20 35428, 2015

      • CatQuest
        "side-scrolling skateboarding video game ".. nah I'll pass, not my tpe of thang. maybe kuno?
      • 2015-12-20 35423, 2015

      • chirlu`
        bitmap: Regarding http://explain.depesz.com/s/tXwa, it reads the whole edit_note table and much of edit, too, essentially everything after reosarevok joined MB.
      • 2015-12-20 35448, 2015

      • chirlu`
        And as “hit=344439 read=467499” indicates, more than half of that data was not in cache.
      • 2015-12-20 35404, 2015

      • chirlu`
        Perhaps we should indeed rename the feature to “Edit notes received in the past three months” or something and have a hard cut-off point in time.
      • 2015-12-20 35449, 2015

      • chirlu`
        Together with an index on post_time, this should make it reasonably fast because only a small part of edit_note needs to be considered.
      • 2015-12-20 35436, 2015

      • darwin
        (agree)
      • 2015-12-20 35409, 2015

      • chirlu`
        Alternatively, if we want all-time edit notes, we could add a materialized view that stores the relationship between edit-note-leaver and original-editor directly.
      • 2015-12-20 35442, 2015

      • chirlu`
        Then add an index on original-editor for that view.
      • 2015-12-20 35447, 2015

      • chirlu`
        With that, we wouldn’t need to join edit_note and edit just to find out who was the original editor for each note.
      • 2015-12-20 35427, 2015

      • chirlu`
        Sort of a multi-table index (that isn’t possible otherwise).
      • 2015-12-20 35440, 2015

      • opatel99
        What is the optimal way to output a patch?
      • 2015-12-20 35403, 2015

      • chirlu`
        Optimal for what goal?
      • 2015-12-20 35450, 2015

      • opatel99
        chirlu`: As in does `git diff > output.diff` suffice for most needs?
      • 2015-12-20 35415, 2015

      • chirlu`
        Really depends on the needs. :)
      • 2015-12-20 35425, 2015

      • chirlu`
        Normally, git format-patch will be preferred.
      • 2015-12-20 35401, 2015

      • opatel99
        chirlu`: Okay will do so
      • 2015-12-20 35439, 2015

      • LordSputnik
        zas: It looks like configuring OAuth2 for discourse won't be a trivial thing
      • 2015-12-20 35402, 2015

      • LordSputnik
        It'll require a couple of days of work by someone who's familiar with Ruby (I can do neither of those!)
      • 2015-12-20 35431, 2015

      • LordSputnik
        It also may require modification of the MB web service, or provision of a new endpoint to serve JSON user data when presented with an access token (if https://github.com/discourse/discourse-oauth2-bas… is used, which seems to be the most promising solution)
      • 2015-12-20 35407, 2015

      • opatel99
        LordSputnik: Leftmost I uploaded all my files. Should I press submit or hold off until we discuss?
      • 2015-12-20 35451, 2015

      • bitmap
        chirlu`: I prefer the materialized table idea
      • 2015-12-20 35408, 2015

      • chirlu`
        Really?
      • 2015-12-20 35447, 2015

      • opatel99
        bitmap: What is a materialized table?
      • 2015-12-20 35415, 2015

      • bitmap
        chirlu`: it's *very* fast on my slave server
      • 2015-12-20 35442, 2015

      • chirlu`
        bitmap: Yes, I’d expect so, but it is also quite complex.
      • 2015-12-20 35419, 2015

      • bitmap
        I mean, it's just a trigger, isn't it?
      • 2015-12-20 35424, 2015

      • chirlu`
        opatel99: Essentially, the result of a SELECT over some tables stored in a new table.
      • 2015-12-20 35444, 2015

      • chirlu`
        bitmap: And a schema change. :)
      • 2015-12-20 35458, 2015

      • bitmap nods
      • 2015-12-20 35409, 2015

      • Leftmost
        You'd need to update the materialized view every time someone left an edit note, presumably. That could be costly, depending on edit note frequency.
      • 2015-12-20 35424, 2015

      • Leftmost
        (That, or present users with out-of-date information, which could be confusing.)
      • 2015-12-20 35458, 2015

      • chirlu`
        Leftmost: It’s only an INSERT on the materialized view per INSERT on edit_note.
      • 2015-12-20 35431, 2015

      • chirlu`
        Because we don’t allow moving edit notes to a different edit etc.
      • 2015-12-20 35414, 2015

      • Leftmost
        Ahh, didn't realize you could INSERT. I'd been thinking about materialized views for a partial solution to collection edit speed (though I'm not sure how effective it would be).
      • 2015-12-20 35453, 2015

      • chirlu`
        Hm, for collections we would need to store a list of all edits affecting one particular collection.
      • 2015-12-20 35404, 2015

      • bitmap
        chirlu`: not saying we shouldn't restrict the post_time for now though
      • 2015-12-20 35406, 2015

      • chirlu`
        That would really be complicated and also require a lot of storage.
      • 2015-12-20 35424, 2015

      • bitmap
        just that eventually I'd like the page to load in under 10 seconds for people
      • 2015-12-20 35414, 2015

      • chirlu`
        It should do that with a time limit and a post_time index, though.
      • 2015-12-20 35426, 2015

      • Leftmost
        I think I was looking at something other than the edit-collection link, but I don't immediately recall what.
      • 2015-12-20 35419, 2015

      • bitmap
        true, it was closer to 5 or 6 seconds on reosarevok's when I tried it
      • 2015-12-20 35443, 2015

      • chirlu`
        Still quite long, that’s true.
      • 2015-12-20 35444, 2015

      • chirlu`
        Leftmost: Aggregated list of all entities contained in a user’s collections?
      • 2015-12-20 35439, 2015

      • chirlu`
        One thing I’m really looking forward to with the Postgres upgrade (apart from index-only scans) is the slow query log.
      • 2015-12-20 35415, 2015

      • bitmap
        is that log_min_duration_statement?
      • 2015-12-20 35448, 2015

      • chirlu`
        Yes, it exists in 9.1 already, but becomes useable in 9.2.
      • 2015-12-20 35403, 2015

      • bitmap
        ah
      • 2015-12-20 35408, 2015

      • chirlu`
        In 9.1 it only looks at exactly identical queries.
      • 2015-12-20 35439, 2015

      • bitmap
        oh, that does sound useful then
      • 2015-12-20 35448, 2015

      • bitmap
        (the 9.2 one)
      • 2015-12-20 35418, 2015

      • chirlu`
        I.e. you looking up your edits is considered to be a totally different query than me looking up my edits, at the moment.
      • 2015-12-20 35423, 2015

      • chirlu`
        Ah no, it was the pg_stat_statements extension: http://www.postgresql.org/docs/9.2/static/pgstats…
      • 2015-12-20 35404, 2015

      • chirlu`
        “are combined into a single pg_stat_statements entry whenever they have identical query structures” ← that’s new in 9.2
      • 2015-12-20 35435, 2015

      • bitmap
        I'd really like if we could upgrade sooner than later, and just not explicitly use any >9.1 features until May or whenever we planned
      • 2015-12-20 35446, 2015

      • chirlu`
        Perhaps we can.
      • 2015-12-20 35413, 2015

      • Lotheric_ joined the channel
      • 2015-12-20 35451, 2015

      • Leo__Verto joined the channel
      • 2015-12-20 35459, 2015

      • Leo__Verto has quit
      • 2015-12-20 35428, 2015

      • Lotheric has quit
      • 2015-12-20 35415, 2015

      • Leo_Verto has quit
      • 2015-12-20 35426, 2015

      • bitmap
        I'll ask in the meeting
      • 2015-12-20 35452, 2015

      • bitmap
        gotta start reading all the release notes and make an upgrade plan though
      • 2015-12-20 35433, 2015

      • JonnyJD joined the channel
      • 2015-12-20 35430, 2015

      • JonnyJD has quit
      • 2015-12-20 35447, 2015

      • typhoe has quit
      • 2015-12-20 35445, 2015

      • typhoe joined the channel
      • 2015-12-20 35428, 2015

      • opatel99
        Just fixed my laptop with duct tape and super glue.
      • 2015-12-20 35425, 2015

      • Bookzombie
        leftmostcat pushed 1 commits to bookbrainz-site: https://github.com/bookbrainz/bookbrainz-site/com…