#metabrainz

/

      • supersandro20000 joined the channel
      • 2020-04-14 10523, 2020

      • supersandro2000 has quit
      • 2020-04-14 10520, 2020

      • Chinmay3199 has quit
      • 2020-04-14 10514, 2020

      • rohitdandamudi has quit
      • 2020-04-14 10537, 2020

      • shivam-kapila has quit
      • 2020-04-14 10506, 2020

      • travis-ci joined the channel
      • 2020-04-14 10506, 2020

      • travis-ci
        Project bookbrainz-data-js build #1427: passed in 1 min 54 sec: https://travis-ci.org/bookbrainz/bookbrainz-data-…
      • 2020-04-14 10506, 2020

      • travis-ci has left the channel
      • 2020-04-14 10520, 2020

      • rohitdandamudi joined the channel
      • 2020-04-14 10510, 2020

      • Kode joined the channel
      • 2020-04-14 10534, 2020

      • Wizzup_ joined the channel
      • 2020-04-14 10538, 2020

      • loujine_ joined the channel
      • 2020-04-14 10520, 2020

      • Kode_ has quit
      • 2020-04-14 10520, 2020

      • Wizzup has quit
      • 2020-04-14 10520, 2020

      • loujine has quit
      • 2020-04-14 10501, 2020

      • BrainzGit has quit
      • 2020-04-14 10506, 2020

      • v6lur joined the channel
      • 2020-04-14 10516, 2020

      • Darkloke joined the channel
      • 2020-04-14 10539, 2020

      • prabal joined the channel
      • 2020-04-14 10507, 2020

      • prabal
        @reosarevok: thanks but i don't think it's possible this way :P
      • 2020-04-14 10547, 2020

      • KrachbummNT joined the channel
      • 2020-04-14 10550, 2020

      • Chinmay3199 joined the channel
      • 2020-04-14 10530, 2020

      • Zastai joined the channel
      • 2020-04-14 10518, 2020

      • iliekcomputers
        moin
      • 2020-04-14 10549, 2020

      • ishaanshah[m]
        iliekcomputers: Morning!
      • 2020-04-14 10512, 2020

      • ishaanshah[m]
        I read your comment on the importer PR
      • 2020-04-14 10537, 2020

      • ishaanshah[m]
        The message part of the importer is handled by Importer.tsx
      • 2020-04-14 10504, 2020

      • ishaanshah[m]
        So I am not sure how we I can include it the snapshot test
      • 2020-04-14 10518, 2020

      • ishaanshah[m]
        Can you help me out here
      • 2020-04-14 10540, 2020

      • supersandro20000 has quit
      • 2020-04-14 10504, 2020

      • supersandro2000 joined the channel
      • 2020-04-14 10531, 2020

      • reosarevok
        yvanzo, bitmap: I don't get it :D
      • 2020-04-14 10511, 2020

      • goldenshimmer has quit
      • 2020-04-14 10511, 2020

      • kepstin has quit
      • 2020-04-14 10512, 2020

      • MagnusSvensson[m has quit
      • 2020-04-14 10533, 2020

      • reg[m] has quit
      • 2020-04-14 10533, 2020

      • heyarne[m] has quit
      • 2020-04-14 10538, 2020

      • ishaanshah[m] has quit
      • 2020-04-14 10538, 2020

      • adi5026[m] has quit
      • 2020-04-14 10540, 2020

      • elomatreb[m] has quit
      • 2020-04-14 10530, 2020

      • reosarevok
        Oh nvm, now I saw
      • 2020-04-14 10542, 2020

      • reosarevok
        rohitdandamudi: we tried this last year but didn't get in
      • 2020-04-14 10555, 2020

      • reosarevok
        Not sure if they have more slots this year though, it was the pilot year last time
      • 2020-04-14 10509, 2020

      • kepstin joined the channel
      • 2020-04-14 10508, 2020

      • rohitdandamudi
        I see..
      • 2020-04-14 10513, 2020

      • rohitdandamudi
        And I didn't see any mention of increase in slots, but not many organisations are participating from what I have heard.
      • 2020-04-14 10502, 2020

      • Gazooo has quit
      • 2020-04-14 10541, 2020

      • Gazooo joined the channel
      • 2020-04-14 10546, 2020

      • Cyna
        Mr_Monkey: let me know when you'll be back... need help with creating revisions
      • 2020-04-14 10519, 2020

      • Cyna
        I think the code is right but the revision is not being created for the other entities
      • 2020-04-14 10509, 2020

      • ruaok
        Moooin
      • 2020-04-14 10538, 2020

      • c1e0 joined the channel
      • 2020-04-14 10550, 2020

      • reg[m] joined the channel
      • 2020-04-14 10551, 2020

      • heyarne[m] joined the channel
      • 2020-04-14 10551, 2020

      • MagnusSvensson[m joined the channel
      • 2020-04-14 10551, 2020

      • adi5026[m] joined the channel
      • 2020-04-14 10551, 2020

      • goldenshimmer joined the channel
      • 2020-04-14 10557, 2020

      • ishaanshah[m] joined the channel
      • 2020-04-14 10557, 2020

      • elomatreb[m] joined the channel
      • 2020-04-14 10504, 2020

      • iliekcomputers
        ishaanshah[m]: hey
      • 2020-04-14 10508, 2020

      • iliekcomputers
        i see what you mean
      • 2020-04-14 10538, 2020

      • iliekcomputers
        can you open a ticket, i think we should do some code refactoring here
      • 2020-04-14 10516, 2020

      • iliekcomputers
        I think there should only be one `updateMessage` function, in the modal and that should be called in the rest of the places
      • 2020-04-14 10523, 2020

      • iliekcomputers
        that way we can just call it in the test as well
      • 2020-04-14 10537, 2020

      • Cyna
      • 2020-04-14 10522, 2020

      • ishaanshah[m]
        Yes, that makes sense
      • 2020-04-14 10503, 2020

      • ishaanshah[m]
        I will open a ticket
      • 2020-04-14 10537, 2020

      • prabal
        Cyna: Did you have a look how other entities are handled while editing a relationship?
      • 2020-04-14 10503, 2020

      • prabal
        I think it might be similar to in case of delete relationship too?
      • 2020-04-14 10510, 2020

      • prabal
        ( I haven't seen your code yet tho )
      • 2020-04-14 10519, 2020

      • Cyna
        I assumed that too but the issue is that there is no reflection of revision on any other entities other than the main entity
      • 2020-04-14 10531, 2020

      • ishaanshah[m]
        iliekcomputers: LB-530
      • 2020-04-14 10532, 2020

      • BrainzBot
        LB-530: Refactor the LastFm Modal code https://tickets.metabrainz.org/browse/LB-530
      • 2020-04-14 10552, 2020

      • iliekcomputers
        thx
      • 2020-04-14 10551, 2020

      • prabal
        Cyna: .
      • 2020-04-14 10559, 2020

      • prabal
      • 2020-04-14 10530, 2020

      • prabal
      • 2020-04-14 10519, 2020

      • Cyna
        Thanks I'll have a look in sometime.... I was trying to figure out a way to pass multiple ids to the parent promise
      • 2020-04-14 10529, 2020

      • Cyna
        Ill see if i can get it done
      • 2020-04-14 10547, 2020

      • prabal
        I may be wrong too, so ignore if this don't make any sense..
      • 2020-04-14 10505, 2020

      • shivam-kapila joined the channel
      • 2020-04-14 10541, 2020

      • c1e0_ joined the channel
      • 2020-04-14 10514, 2020

      • c1e0 has quit
      • 2020-04-14 10547, 2020

      • zas
        I'll upgrade openresty on kiki & herb, switch to herb right now, shit might happen
      • 2020-04-14 10518, 2020

      • Cyna
        No issues Ive made some SQL scripts to test the changes on delete.
      • 2020-04-14 10543, 2020

      • zas
        switching back to kiki
      • 2020-04-14 10516, 2020

      • Mr_Monkey
        Hi Cyna ! I was looking over the WIP PR: I think this line might be your problem: https://github.com/bookbrainz/bookbrainz-site/pul…
      • 2020-04-14 10550, 2020

      • Mr_Monkey
        Not sure what that ends up doing, but maybe not push the other entities into the array, which might be why they're not being included in the revision
      • 2020-04-14 10551, 2020

      • Cyna
        Ohh so the function really takes an array... Can i get back in 30 mins. Lunch time for me 😅
      • 2020-04-14 10501, 2020

      • Mr_Monkey
        Sure thing. i'll keep looking at the PR
      • 2020-04-14 10542, 2020

      • Mr_Monkey
        actually it looks like `await array.push(…` still works, so while it needs to be corrected that's not the issue
      • 2020-04-14 10541, 2020

      • CatQuest
        ooh summer of docs, let's <s>do</s> try it!
      • 2020-04-14 10521, 2020

      • ruaok
        I prefer not to. right now we need to reduce the things we focus on, not increase them.
      • 2020-04-14 10531, 2020

      • CatQuest
        aw
      • 2020-04-14 10504, 2020

      • reosarevok
        Aww but also sensible
      • 2020-04-14 10521, 2020

      • reosarevok
        Because otherwise it'd be me doing it and I shouldn't take on more stuff
      • 2020-04-14 10534, 2020

      • reosarevok
        Cyna: will you have some time to look into the comments on your PRs soonish? :)
      • 2020-04-14 10541, 2020

      • reosarevok
        Would be sweet to get those merged
      • 2020-04-14 10528, 2020

      • shivam-kapila
        ruaok: Hii. I am ready for some code today. From where should I pick up?
      • 2020-04-14 10539, 2020

      • Cyna
        Sure... Sorry for the delay reosarevok . I'll try to get them ready by tonight
      • 2020-04-14 10509, 2020

      • reosarevok
        Cyna: no worries! If you're busy you're busy
      • 2020-04-14 10518, 2020

      • reosarevok
        Not like we pay you for this :p
      • 2020-04-14 10545, 2020

      • Cyna
        Lol
      • 2020-04-14 10549, 2020

      • ruaok
        shivam-kapila: great. start by taking a look at the failing integration tests for apis.
      • 2020-04-14 10504, 2020

      • ruaok
        the most recent code is on the timescale branch.
      • 2020-04-14 10552, 2020

      • shivam-kapila
        Got it. Picking it up. Thanks
      • 2020-04-14 10539, 2020

      • Cyna
        I'm back Mr_Monkey.
      • 2020-04-14 10500, 2020

      • Mr_Monkey
        Cyna: 👋
      • 2020-04-14 10529, 2020

      • Cyna
        I've done console log to check whether the other entites are getting filled. They are
      • 2020-04-14 10549, 2020

      • Mr_Monkey
        Yep, the issue is somewhere else
      • 2020-04-14 10553, 2020

      • Cyna
        Maybe I'll have to add async to all the promises
      • 2020-04-14 10530, 2020

      • Cyna
        That would be cause, otherEntites are initially [] and get filled asyncronously
      • 2020-04-14 10535, 2020

      • Mr_Monkey
        Well, hang on a minute before starting that
      • 2020-04-14 10542, 2020

      • Cyna
        ohh
      • 2020-04-14 10506, 2020

      • Mr_Monkey
        I think there's a piece of the puzzle missing: here (https://github.com/bookbrainz/bookbrainz-site/pul…) you're setting a revision with the same dataID that they had before, which doesn't look right to me if you're changing their data
      • 2020-04-14 10518, 2020

      • Darkloke has quit
      • 2020-04-14 10504, 2020

      • Mr_Monkey
        this block looks odd to me generally. I can't follow what's happening
      • 2020-04-14 10507, 2020

      • Mr_Monkey
      • 2020-04-14 10506, 2020

      • Mr_Monkey
        I don't think I tried saving multiple models like that, maybe that's where the issue comes from?
      • 2020-04-14 10540, 2020

      • Mr_Monkey
        But also this crucial detail:
      • 2020-04-14 10534, 2020

      • Mr_Monkey
        The `RevisionModel` here refers to, say a `WorkRevision` if you're deleting a Work entity. If that work has an Author relationship, you're trying to save a WorkRevision for the Author entity, which won't work
      • 2020-04-14 10548, 2020

      • Mr_Monkey
        Same for RevisionHeader
      • 2020-04-14 10559, 2020

      • Mr_Monkey
        Sorry, `HeaderModel`
      • 2020-04-14 10535, 2020

      • Mr_Monkey
        Let me run the code locally and try it with a Work -> Work relationship
      • 2020-04-14 10523, 2020

      • Cyna
        reosarevok: could you help me out here https://github.com/metabrainz/musicbrainz-server/…
      • 2020-04-14 10544, 2020

      • Cyna
        I dont understand... do you mean that its translation is currently not supported ?
      • 2020-04-14 10552, 2020

      • reosarevok
        Sure, let me see
      • 2020-04-14 10534, 2020

      • reosarevok
        O
      • 2020-04-14 10543, 2020

      • Cyna
      • 2020-04-14 10552, 2020

      • reosarevok
        *Oh. That means we did not translate it in our current edit code (because it sucks)
      • 2020-04-14 10511, 2020

      • Cyna >*Oh. That means we did not translate it in our current edit code (because it sucks)
      • 2020-04-14 10516, 2020

      • reosarevok
        But we should be able to do lp_attributes(type.name, 'release_group_primary_type')
      • 2020-04-14 10523, 2020

      • Cyna
        ok I'll fix it
      • 2020-04-14 10534, 2020

      • reosarevok
        Check it actually works, but I think it should anyway
      • 2020-04-14 10504, 2020

      • Cyna
        I dont have any translation setup.. I'll be relying on CI for that 😅
      • 2020-04-14 10544, 2020

      • reosarevok
        I don't think CI really does translation much but I can check it myself when testing
      • 2020-04-14 10548, 2020

      • Cyna
        Mr_Monkey: as for the above block. I was in the assumtion that newEntityRevisionPromise creates revisions for entities that are passed into it as an array. so first I passed the main `entity` and then the array of other entities. The dataId of main has to be null as in the other codes but the otherEntities follow the same dataId
      • 2020-04-14 10502, 2020

      • Cyna
        reosarevok: That would be great !
      • 2020-04-14 10513, 2020

      • reosarevok
        I mean, if it did test for it properly we would already translate it ;p
      • 2020-04-14 10514, 2020

      • Cyna
        Give me another 5 mins and I'll push the PR
      • 2020-04-14 10519, 2020

      • reosarevok
        Ok, no worries!
      • 2020-04-14 10535, 2020

      • Mr_Monkey
        Cyna: (If you need to do one thing at a time we can talk about this at a later point :) ) Well, the otherEntities would need a new dataId since they've been modified (in this case only the relationshipSetId).
      • 2020-04-14 10515, 2020

      • Mr_Monkey
        There is a utility that would save you some trouble I think: `saveEntitiesAndFinishRevision` that handles saving, parent revision, notes and a few other things in one go
      • 2020-04-14 10507, 2020

      • Cyna
        > If you need to do one thing at a time we can talk about this at a later point :)
      • 2020-04-14 10535, 2020

      • Cyna
        Thanks but I need to get good with the codebase before the gsoc period to even stand a chance to complete it. So I'm working extra hard
      • 2020-04-14 10542, 2020

      • D4RK-PH0ENiX has quit
      • 2020-04-14 10504, 2020

      • Cyna
        > saveEntitiesAndFinishRevision
      • 2020-04-14 10515, 2020

      • Cyna
        I'll have a look at the code and get back in sometime
      • 2020-04-14 10513, 2020

      • Mr_Monkey
        OK. Don't hesitate to ping me if you have questions, but the gist of it is: make modifications to the entities (you've done that) and send all the entities to saveEntitiesAndFinishRevision and that should be it.
      • 2020-04-14 10537, 2020

      • Mr_Monkey
        You might have to `.set(dataId: null)` on the mainEntity, or something like that.