#metabrainz

/

      • akhilesh
        Mr_Monkey: did you pushed code without linting check yesterday?
      • 2019-06-06 15707, 2019

      • Mr_Monkey
        Woops, that is a possibility…
      • 2019-06-06 15718, 2019

      • akhilesh
        you moved error.js from server/helpers to common but not updated that use in other files Mr_Monkey
      • 2019-06-06 15711, 2019

      • akhilesh
        May I fix?
      • 2019-06-06 15751, 2019

      • Mr_Monkey
        akhilesh: Right, I see now that I missed a couple. Go right ahead
      • 2019-06-06 15724, 2019

      • akhilesh
        ok
      • 2019-06-06 15727, 2019

      • Mr_Monkey
        Yes, too much refactoring yesterday. I stumbled towards the end !
      • 2019-06-06 15745, 2019

      • akhilesh
        Thanks for yesterday! That will help to me, no worries about little things. I will look in to that Mr_Monkey .
      • 2019-06-06 15741, 2019

      • D4RK-PH0ENiX has quit
      • 2019-06-06 15708, 2019

      • BrainzGit
        [acousticbrainz-server] alastair opened pull request #346 (master…bulk-limit): Set the maximum bulk query number to 25 and add documentation https://github.com/metabrainz/acousticbrainz-serv…
      • 2019-06-06 15709, 2019

      • alastairp
        iliekcomputers: I noticed in AB that we were still using service integrations for readthedocs instead of webhooks. I've updated it to a webhook
      • 2019-06-06 15712, 2019

      • alastairp
        not sure what LB uses
      • 2019-06-06 15752, 2019

      • alastairp
        theoretically it builds when we make a release, which should coincide with our deployments. We can test it next time we release
      • 2019-06-06 15701, 2019

      • D4RK-PH0ENiX joined the channel
      • 2019-06-06 15723, 2019

      • D4RK-PH0ENiX has quit
      • 2019-06-06 15749, 2019

      • D4RK-PH0ENiX joined the channel
      • 2019-06-06 15756, 2019

      • akhilesh
        Mr_Monkey: If no identifiers found for an existing entity, and request wants to access identifiers by `/<entity>/<bbid>/identifiers `, what will be the status of response code and message?
      • 2019-06-06 15754, 2019

      • akhilesh
        status code and message?
      • 2019-06-06 15712, 2019

      • akhilesh
        as response
      • 2019-06-06 15727, 2019

      • Mr_Monkey
        You should return a valid object but with no identifiers
      • 2019-06-06 15705, 2019

      • akhilesh
        ok
      • 2019-06-06 15740, 2019

      • Mr_Monkey
        That way, as a consumer of the API, I know that if I send a correct request I can expect, say, an array, even if it is empty
      • 2019-06-06 15730, 2019

      • akhilesh
      • 2019-06-06 15740, 2019

      • akhilesh
        like this Mr_Monkey ^
      • 2019-06-06 15754, 2019

      • Mr_Monkey
        Correct
      • 2019-06-06 15715, 2019

      • akhilesh
        Ok
      • 2019-06-06 15726, 2019

      • akhilesh
        Mr_Monkey: what should message, if the entity does not exist and request require identifiers? , the status code is 404.
      • 2019-06-06 15742, 2019

      • Mr_Monkey
        akhilesh: The same as a get request for the entity itself. We'll review the messages later, but something along the lines of "Entity not found"
      • 2019-06-06 15711, 2019

      • akhilesh
        ok
      • 2019-06-06 15714, 2019

      • Mr_Monkey
        or "Work not found" in this case
      • 2019-06-06 15753, 2019

      • Mr_Monkey
        akhilesh: I think using express middleware might be helpful. Anywhere there is a `:bbid` in the routes, use a middleware to load the entity from the DB. That means there is only on place you need to return a 404 if the entity is not found
      • 2019-06-06 15710, 2019

      • Mr_Monkey
        I'll find you an example of how it is used in the BB website
      • 2019-06-06 15717, 2019

      • iliekcomputers
        alastairp: i made changes to the ratelimit pr
      • 2019-06-06 15735, 2019

      • Mr_Monkey
      • 2019-06-06 15759, 2019

      • akhilesh
        I Think in BB website, first load entity data in middleware because the entity is required to create props with help of that data. Mr_Monkey
      • 2019-06-06 15706, 2019

      • akhilesh
        Is it an issue with the method used by me?
      • 2019-06-06 15718, 2019

      • Mr_Monkey
        akhilesh: By using middleware, instead of calling `getWorkFromDB` for each endpoint, and having to check if the entity exists, send a 404 if it doesn't, etc… you end up having that mechanism in a single place, the middleware
      • 2019-06-06 15752, 2019

      • Mr_Monkey
        So that if you want to change something in that mechanism, you only have one place to change it instead of in each endpoint, wich would be error prone
      • 2019-06-06 15736, 2019

      • yvanzo
        hey iliekcomputers, lemme know when you have time to debug sir :)
      • 2019-06-06 15741, 2019

      • iliekcomputers
        yvanzo: hey, i'm up for doing it right now, what's up? :D
      • 2019-06-06 15747, 2019

      • Mr_Monkey
        akhilesh: Have a read through this: https://expressjs.com/en/4x/api.html#router.param
      • 2019-06-06 15716, 2019

      • Mr_Monkey
        the router.param section
      • 2019-06-06 15754, 2019

      • yvanzo
        iliekcomputers: cool, you can get a working docker compose here: https://github.com/yvanzo/musicbrainz-docker/tree…
      • 2019-06-06 15705, 2019

      • yvanzo
        That can be used to reproduce SOLR-109
      • 2019-06-06 15706, 2019

      • BrainzBot
        SOLR-109: Indexer doesn't return even though reindexing completed https://tickets.metabrainz.org/browse/SOLR-109
      • 2019-06-06 15709, 2019

      • iliekcomputers
        is SOLR-109 what we're trying to fix?
      • 2019-06-06 15710, 2019

      • BrainzBot
        SOLR-109: Indexer doesn't return even though reindexing completed https://tickets.metabrainz.org/browse/SOLR-109
      • 2019-06-06 15726, 2019

      • yvanzo
        Yes.
      • 2019-06-06 15739, 2019

      • yvanzo
        Trying to understand which part is failing to start with.
      • 2019-06-06 15759, 2019

      • Mr_Monkey
        akhilesh: I'm trying to think of the most elegant solution to require different 'relations' when loading an entity from the DB depending on the endpoint. There's a good solution I'm sure, but in any case having a common entity loader for all entity endpoints will make the code much more manageable
      • 2019-06-06 15740, 2019

      • iliekcomputers
        right, okay, let me try to set it up and reproduce it.
      • 2019-06-06 15732, 2019

      • yvanzo
        iliekcomputers: you don’t need replication token, and you should use development setup
      • 2019-06-06 15735, 2019

      • Mr_Monkey
        akhilesh: As a first refactoring step, having a common function you can call from any entity endpoint that: checks the bbid is valid, loads the entity with relations, checks if the entity exists and sends a 404 otherwise is a good first step
      • 2019-06-06 15722, 2019

      • akhilesh
        Mr_Monkey: then, what about load entity via middleware plan?
      • 2019-06-06 15725, 2019

      • Mr_Monkey
        akhilesh: I need a bit more time to find an elegant solution for how to call it with different sets of relations to load, but you can still go ahead and create a single function `loadEntity(req, res, relations)`
      • 2019-06-06 15748, 2019

      • Mr_Monkey
        (passing `res` so that in that function you can send a 404 if there's no entity)
      • 2019-06-06 15709, 2019

      • akhilesh
        ok
      • 2019-06-06 15713, 2019

      • Mr_Monkey
        and using req to attach the loaded entity to the request
      • 2019-06-06 15746, 2019

      • Mr_Monkey
        It's pretty close already to how middleware works in express
      • 2019-06-06 15718, 2019

      • Mr_Monkey
        akhilesh: I think you should be able to do this: `router.get('/:bbid/aliases', makeEntityLoader('Work', ['aliasSet.aliases.language'], 'Work not found'), async (req, res, next) => {
      • 2019-06-06 15718, 2019

      • Mr_Monkey
        …`, the makeEntityLoader middleware can then access req.params.bbid
      • 2019-06-06 15718, 2019

      • Mr_Monkey
        You should be able to copy the existing `makeEntityLoader` function and simplify it for your need
      • 2019-06-06 15730, 2019

      • Mr_Monkey
        (for example you won't need these lines: https://github.com/bookbrainz/bookbrainz-site/blo…)
      • 2019-06-06 15708, 2019

      • Mr_Monkey
      • 2019-06-06 15709, 2019

      • akhilesh
        ok
      • 2019-06-06 15756, 2019

      • ruaok
        anyone remember which machine at hetzner does FTP?
      • 2019-06-06 15711, 2019

      • ruaok
        williams?
      • 2019-06-06 15723, 2019

      • ruaok
        seems so, but I forget how to add something to the FTP volume. I've got a one-off file to put out there.
      • 2019-06-06 15726, 2019

      • ruaok
        anyone?
      • 2019-06-06 15743, 2019

      • reosarevok
        Can't (quickly) find anything in syswiki
      • 2019-06-06 15708, 2019

      • reosarevok
        zas: once you tell ruaok maybe you can document it? FtpServer.md is pointless
      • 2019-06-06 15728, 2019

      • reosarevok
        And BackupSystem.md says "Currently we only back up hosts at DigitalWest." so seems horribly outdated too
      • 2019-06-06 15722, 2019

      • zas
        williams
      • 2019-06-06 15752, 2019

      • zas
        in /home/ftp/
      • 2019-06-06 15756, 2019

      • zas
        pay attention to permissions if you add files there
      • 2019-06-06 15719, 2019

      • ruaok starts writing documentation
      • 2019-06-06 15743, 2019

      • reosarevok
        !m ruaok
      • 2019-06-06 15743, 2019

      • BrainzBot
        You're doing good work, ruaok!
      • 2019-06-06 15759, 2019

      • ruaok
        :)
      • 2019-06-06 15725, 2019

      • ruaok
        do we still need 20110711-update-derived.tar.bz2 20110711-update.tar.bz2 ?
      • 2019-06-06 15733, 2019

      • ruaok
        only 8 years old.
      • 2019-06-06 15719, 2019

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #1098 (master…MBS-10218): MBS-10218: Fix page param (cover_art -> cover-art) https://github.com/metabrainz/musicbrainz-server/…
      • 2019-06-06 15720, 2019

      • BrainzBot
        MBS-10218: Release page: Cover Art tab not selected / highlit https://tickets.metabrainz.org/browse/MBS-10218
      • 2019-06-06 15723, 2019

      • yvanzo
        I don’t know what it is (but 12M), bitmap?
      • 2019-06-06 15711, 2019

      • ruaok
        it think that was NGS migration stuff.
      • 2019-06-06 15753, 2019

      • reosarevok
        yvanzo: very hard PR to review, if you're bored :p
      • 2019-06-06 15708, 2019

      • yvanzo
        reosarevok: ty, already busy with dear sir :)
      • 2019-06-06 15717, 2019

      • reosarevok
        Yes sir
      • 2019-06-06 15741, 2019

      • yvanzo
        reosarevok: we should probably freeze beta by tomorrow, which PRs should come first?
      • 2019-06-06 15744, 2019

      • reosarevok
      • 2019-06-06 15744, 2019

      • BrainzBot
        SOLR-104: Add genre lists to search results
      • 2019-06-06 15752, 2019

      • reosarevok
        (for when you're bored with sir)
      • 2019-06-06 15730, 2019

      • reosarevok
        Well, other than that tiny bug which we might as well merge
      • 2019-06-06 15755, 2019

      • reosarevok
        You could check if you're happy with bitmap's changes in https://github.com/metabrainz/musicbrainz-server/…
      • 2019-06-06 15715, 2019

      • reosarevok
      • 2019-06-06 15727, 2019

      • reosarevok
        bitmap: same with https://github.com/metabrainz/musicbrainz-server/… which yvanzo has already approve
      • 2019-06-06 15730, 2019

      • reosarevok
        d
      • 2019-06-06 15741, 2019

      • yvanzo
        reosarevok: would be nice to wait changing sir/mmd-schema until sir v1 gets published.
      • 2019-06-06 15754, 2019

      • culinko joined the channel
      • 2019-06-06 15754, 2019

      • culinko has quit
      • 2019-06-06 15754, 2019

      • culinko joined the channel
      • 2019-06-06 15702, 2019

      • reosarevok
        As you wish :) You know better than I do about that side, just got reminded that's on sir side
      • 2019-06-06 15722, 2019

      • BrainzGit
        [musicbrainz-server] reosarevok merged pull request #1087 (master…MBS-9914-pt-2): MBS-9914: Convert the area public pages to React https://github.com/metabrainz/musicbrainz-server/…
      • 2019-06-06 15723, 2019

      • BrainzBot
        MBS-9914: Convert the area public pages to React https://tickets.metabrainz.org/browse/MBS-9914
      • 2019-06-06 15706, 2019

      • ruaok
        reosarevok: wanna sanity check FtpServer.md for me, please? I just committed it.
      • 2019-06-06 15720, 2019

      • ruaok starts walking the opposite direction from estonia
      • 2019-06-06 15733, 2019

      • culinko
        hey everyone :) i have a question about CA edits. is it intended that the clickable part of the image is being extended on the right side?
      • 2019-06-06 15719, 2019

      • culinko
        let me make a screenshot of it
      • 2019-06-06 15742, 2019

      • reosarevok
        ruaok: is "copy" lowercased for a reason? :)
      • 2019-06-06 15747, 2019

      • ruaok
        pristine__: see ~vansika/artist-artist-relations-2019-06-06.tar.bz2
      • 2019-06-06 15749, 2019

      • reosarevok
      • 2019-06-06 15729, 2019

      • BrainzGit
        [acousticbrainz-server] alastair merged pull request #346 (master…bulk-limit): Set the maximum bulk query number to 25 and add documentation https://github.com/metabrainz/acousticbrainz-serv…
      • 2019-06-06 15735, 2019

      • ruaok
        reosarevok: just to mess with your head.
      • 2019-06-06 15745, 2019

      • ruaok
        that is not what I expected you to complain about
      • 2019-06-06 15723, 2019

      • reosarevok
        ... lol
      • 2019-06-06 15727, 2019

      • reosarevok
        Ok, just saw the rest
      • 2019-06-06 15735, 2019

      • ruaok
        pristine__: sample row
      • 2019-06-06 15737, 2019

      • ruaok
        {"count": 664, "artist_mbid_0": "b202beb7-99bd-47e7-8b72-195c8d72ebdd", "artist_mbid_1": "f4d5cc07-3bc9-4836-9b15-88a08359bc63"}
      • 2019-06-06 15739, 2019

      • ruaok
        :D
      • 2019-06-06 15743, 2019

      • reosarevok
        Eh, who keeps one of those anymore?
      • 2019-06-06 15751, 2019

      • reosarevok
        Old people :p
      • 2019-06-06 15751, 2019

      • ruaok
        you do, apparently.
      • 2019-06-06 15705, 2019

      • ruaok
        I dont think old people do that sort of stuff anymore.
      • 2019-06-06 15720, 2019

      • culinko
        see the example here: https://i.imgur.com/DFWukhg.png - the red border shows the frame with the image link. it's interesting that it always stretches exactly to the end of lines of release/types/filename rows. shouldn't the frame only be around the image?
      • 2019-06-06 15709, 2019

      • culinko
      • 2019-06-06 15743, 2019

      • travis-ci joined the channel
      • 2019-06-06 15743, 2019

      • travis-ci
        Project bookbrainz-site build #2231: failed in 7 min 4 sec: https://travis-ci.org/bookbrainz/bookbrainz-site/…
      • 2019-06-06 15743, 2019

      • travis-ci has left the channel
      • 2019-06-06 15759, 2019

      • reosarevok
        culinko: no idea how that works exactly, I don't think it's intended as such
      • 2019-06-06 15712, 2019

      • culinko
        can you repro?
      • 2019-06-06 15718, 2019

      • reosarevok
        Yeah
      • 2019-06-06 15723, 2019

      • reosarevok
        I guess I can take a look if you add a ticket :p
      • 2019-06-06 15729, 2019

      • culinko
        at first i thought the frame has a fixed width but it's always following the longest line of text above the image
      • 2019-06-06 15733, 2019

      • culinko
        i'll ad it
      • 2019-06-06 15728, 2019

      • akhilesh
      • 2019-06-06 15720, 2019

      • akhilesh
      • 2019-06-06 15730, 2019

      • culinko
      • 2019-06-06 15731, 2019

      • BrainzBot
        MBS-10220: The frame with CA link has bigger width than the thumbnail image
      • 2019-06-06 15727, 2019

      • akhilesh
        Mr_Monkey: look into above, something is wrong, I think how to pass bbid
      • 2019-06-06 15742, 2019

      • Mr_Monkey
        akhilesh: Can you describe what's happening?
      • 2019-06-06 15759, 2019

      • Mr_Monkey
        akhilesh: Ah, I see something that might be the problem. I think `return async (req, res, next, bbid)` is incorrect. You shouldn't have bbid in there, but instead get it from the req object: req.params.bbid
      • 2019-06-06 15728, 2019

      • pristine__
        ruaok: seen
      • 2019-06-06 15743, 2019

      • Mr_Monkey
        `(req, res, next, bbid)` would be a valid signature for router.param
      • 2019-06-06 15743, 2019

      • pristine__
        shouldn't that be msid?
      • 2019-06-06 15748, 2019

      • pristine__
        and not mbid
      • 2019-06-06 15743, 2019

      • akhilesh
        Mr_Monkey: I confused with this, May you push this for only one endpoint please?
      • 2019-06-06 15704, 2019

      • Mr_Monkey
        akhilesh: Here's the corrected middleware:
      • 2019-06-06 15710, 2019

      • Mr_Monkey
      • 2019-06-06 15751, 2019

      • reosarevok
        yvanzo, bitmap: https://beta.musicbrainz.org/edit/61662922 - what was the reason edits fail if tracks surrounding the one being edited have changed?
      • 2019-06-06 15736, 2019

      • ruaok
        pristine__: I don't have msid in that context. So, it can't be.