#metabrainz

/

      • reosarevok
        yvanzo: ticket editing permissions seem too important to restrict IMO
      • 2019-07-24 20533, 2019

      • reosarevok
        So I guess we need to live with users changing priorities
      • 2019-07-24 20542, 2019

      • reosarevok
        Can we follow priority changes exclusively?
      • 2019-07-24 20532, 2019

      • akhilesh
        Mr_Monkey: yes, thanks for resolving that issue.
      • 2019-07-24 20532, 2019

      • bitmap
        Cyna: make sure req is being outputted by the sanitizedContext function, we went over this in another branch
      • 2019-07-24 20539, 2019

      • Cyna
        I made some changes, removed the uses of $c in the file that is being hydrated
      • 2019-07-24 20551, 2019

      • Cyna
        Replaced by directly passing in params
      • 2019-07-24 20522, 2019

      • Cyna
        `TypeError: $data.selectionMessage is not a function` getting this in the console now
      • 2019-07-24 20526, 2019

      • reosarevok
        bitmap, yvanzo: do you want to talk PRs then? :)
      • 2019-07-24 20529, 2019

      • bitmap
        reosarevok, yvanzo: I'm around, just making coffee first
      • 2019-07-24 20543, 2019

      • bitmap
        sure :)
      • 2019-07-24 20515, 2019

      • yvanzo
        We can have an automation rule that mails us when priority changes https://docs.automationforjira.com/reference/trig…
      • 2019-07-24 20503, 2019

      • yvanzo
        (there is no notification for field-level change)
      • 2019-07-24 20529, 2019

      • alastairp
        aidanlw17: Cyna: please put your flight numbers on the wiki for the summit so we can coordinate arrival times
      • 2019-07-24 20500, 2019

      • Cyna
        Well My flights haven't been booked yet, As the VISA process is still pending
      • 2019-07-24 20529, 2019

      • bitmap
        soo where should we start? https://github.com/metabrainz/musicbrainz-server/… maybe? (seems to be the oldest open React PR)
      • 2019-07-24 20538, 2019

      • alastairp
        Cyna: great, as soon as you know then :)
      • 2019-07-24 20551, 2019

      • bitmap
        seems to have no conflicts, so should be in a good state. would it help to try doing the code review on irc?
      • 2019-07-24 20521, 2019

      • reosarevok
        yvanzo: ^ :) (works fo rme)
      • 2019-07-24 20550, 2019

      • pristine__
        alastairp: I need help in defining a config var name.
      • 2019-07-24 20503, 2019

      • bitmap
        maybe asking "why is line x doing y" or "i'm not sure about z" here would be faster than back-and-forth on github
      • 2019-07-24 20504, 2019

      • pristine__
        We have a date time value = x and we wish to move date in x to a particular date, something like, date.replace(days=y)
      • 2019-07-24 20529, 2019

      • pristine__
        What should be the name of y ?
      • 2019-07-24 20537, 2019

      • pristine__
        Y is a integer here.
      • 2019-07-24 20543, 2019

      • pristine__
        an*
      • 2019-07-24 20549, 2019

      • Rotab joined the channel
      • 2019-07-24 20526, 2019

      • yvanzo
        bitmap, reosarevok: Rule added.
      • 2019-07-24 20531, 2019

      • bitmap has the branch checked out too
      • 2019-07-24 20537, 2019

      • yvanzo too
      • 2019-07-24 20553, 2019

      • Cyna
        bitmap: `TypeError: $data.selectionMessage is not a function` what does this mean ?
      • 2019-07-24 20501, 2019

      • Cyna
        dependency issue ?
      • 2019-07-24 20512, 2019

      • Cyna
        I've ruled out that its a syntax error
      • 2019-07-24 20535, 2019

      • pristine__
        ruaok can also help:)
      • 2019-07-24 20557, 2019

      • bitmap
        Cyna: search for area_bubble root/components/forms.tt. it must not be applying the knockout bindings correctly ($data should be an area entity)
      • 2019-07-24 20505, 2019

      • yvanzo
        bitmap, reosarevok: I actually started to review it today, shouldn’t be long to finish, can we jump to the next one?
      • 2019-07-24 20514, 2019

      • bitmap
        okay
      • 2019-07-24 20530, 2019

      • bitmap
      • 2019-07-24 20543, 2019

      • reosarevok
        I'll quickly rebase
      • 2019-07-24 20556, 2019

      • reosarevok
        Not that the conflict is very relevant, but
      • 2019-07-24 20512, 2019

      • bitmap
        we haven't added any new NotFound pages since, I hope
      • 2019-07-24 20541, 2019

      • yvanzo
        Cyna: Just for a test, can you please set Priority to Low at https://tickets.metabrainz.org/browse/MBS-9911
      • 2019-07-24 20542, 2019

      • BrainzBot
        MBS-9911: Convert attributes admin templates to React/JSX
      • 2019-07-24 20539, 2019

      • bitmap
        I guess it should be easy to see from components.js after you rebase
      • 2019-07-24 20502, 2019

      • reosarevok
        bitmap: we added genre but IIRC I already updated it for that
      • 2019-07-24 20523, 2019

      • bitmap
        okay, good
      • 2019-07-24 20530, 2019

      • reosarevok
        Rebased, pushed
      • 2019-07-24 20536, 2019

      • yvanzo
        I don’t really the added value of refactoring all NotFound in a single file, there is almost no code deduplication here, am I missing something?
      • 2019-07-24 20509, 2019

      • reosarevok
        They're all the same concept, with mostly small variations on one string
      • 2019-07-24 20516, 2019

      • reosarevok
        It makes much more sense to me for all of it to be together
      • 2019-07-24 20501, 2019

      • reosarevok
        (if we decide to change something of how it works, we can change one file rather than 30)
      • 2019-07-24 20535, 2019

      • Cyna
        yvanzo: done
      • 2019-07-24 20519, 2019

      • aidanlw17
        alastairp: I’ll put mine up right now!
      • 2019-07-24 20529, 2019

      • reosarevok
        Cyna: thanks! yvanzo: works nicely!
      • 2019-07-24 20513, 2019

      • bitmap
        the NotFound pages all previously shared the same structure, so they had the same imports and markup, just the messages differed
      • 2019-07-24 20549, 2019

      • yvanzo
        We could have the rule to automatically restore the previously set priority with an explanatory comment but I feel we should preferably review it.
      • 2019-07-24 20553, 2019

      • bitmap
        so not much actual code/logic was duplicated, but a lot of boilerplate (imports/markup)
      • 2019-07-24 20551, 2019

      • alastairp
        pristine__: can you pastebin the code with a bit more context?
      • 2019-07-24 20554, 2019

      • reosarevok
        Yeah, I agree that if it's not crazy (and it shouldn't be) we should review it :)
      • 2019-07-24 20510, 2019

      • reosarevok
        I suspect around half are just pointless changes, but half are relevant
      • 2019-07-24 20513, 2019

      • Cyna
        bitmap: the bindings werent applied because I didnt add ```<!-- ko with: target() && target().area -->
      • 2019-07-24 20513, 2019

      • Cyna
        {...}
      • 2019-07-24 20513, 2019

      • Cyna
        <!-- /ko -->```
      • 2019-07-24 20550, 2019

      • Cyna
        Its strange adding something like this to React
      • 2019-07-24 20553, 2019

      • Cyna
        So I left it out
      • 2019-07-24 20506, 2019

      • Cyna
        Dont know how to make it work, cause it doesnt work directly
      • 2019-07-24 20528, 2019

      • yvanzo
        Well, I don’t think it hurts.
      • 2019-07-24 20545, 2019

      • pristine__
      • 2019-07-24 20559, 2019

      • pristine__
        line 19
      • 2019-07-24 20504, 2019

      • reosarevok
        yvanzo: the priority thing or the PR?
      • 2019-07-24 20528, 2019

      • pristine__
        I don't think passing "1" is a good idea. I want to define this in config
      • 2019-07-24 20535, 2019

      • pristine__
        alastairp: ^
      • 2019-07-24 20500, 2019

      • pristine__
        ruaok: How have we configured the three workers. I don't understand it through the docker compose. On my local machine, I have one master container and one worker container as reflected in docker compose, and the same docker compose is used on leader, then how three worker containers?
      • 2019-07-24 20520, 2019

      • yvanzo
        reosarevok: the PR
      • 2019-07-24 20501, 2019

      • aidanlw17
        whoever moderates the summit schedule of events https://wiki.musicbrainz.org/MusicBrainz_Summit/19 , the Monday is September 30, rather than October 1!
      • 2019-07-24 20507, 2019

      • reosarevok
        yvanzo: ok, other than that is there something in the code to comment etc? :)
      • 2019-07-24 20511, 2019

      • reosarevok
        aidanlw17: it's a wiki ;)
      • 2019-07-24 20519, 2019

      • aidanlw17
        reosarevok: just dunno if it's ok for me to change the schedule? guessing that's a yes ;)
      • 2019-07-24 20527, 2019

      • reosarevok
        If it's a clear error, sure
      • 2019-07-24 20534, 2019

      • reosarevok
        (otherwise, suggest only maybe :) )
      • 2019-07-24 20544, 2019

      • reosarevok
        yvanzo: I'll take that as a no :)
      • 2019-07-24 20546, 2019

      • aidanlw17
        Ok, thanks!
      • 2019-07-24 20551, 2019

      • reosarevok
        Oh, I saw the comment now
      • 2019-07-24 20500, 2019

      • yvanzo
        reosarevok: sorry, approved on github already
      • 2019-07-24 20504, 2019

      • bitmap
        nice, wanna do a couple more?
      • 2019-07-24 20529, 2019

      • reosarevok
        Works for me
      • 2019-07-24 20540, 2019

      • reosarevok
        I need hours this week anyway, I've been too lazy :p
      • 2019-07-24 20558, 2019

      • bitmap
        https://github.com/metabrainz/musicbrainz-server/… actually has a recent review already
      • 2019-07-24 20520, 2019

      • reosarevok
        Oh! :)
      • 2019-07-24 20535, 2019

      • reosarevok
        I guess the comment is a good one in that the variable is not very clearly named
      • 2019-07-24 20542, 2019

      • reosarevok
        Will rebase + rename!
      • 2019-07-24 20519, 2019

      • bitmap
        though with xByY naming I usually think it's an object where you can lookup an x using y as a key
      • 2019-07-24 20529, 2019

      • yvanzo
        + TODOs should probably be better named/placed to be meaningful outside of the PR.
      • 2019-07-24 20521, 2019

      • reosarevok
        bitmap: any suggestions that make it more clear?
      • 2019-07-24 20529, 2019

      • bitmap
        maybe tracksWith instead of tracksBy?
      • 2019-07-24 20537, 2019

      • reosarevok
        Maybe :)
      • 2019-07-24 20546, 2019

      • yvanzo
        +1
      • 2019-07-24 20520, 2019

      • bitmap
        for TODO: RecordingT should have an optional artistCredit property
      • 2019-07-24 20527, 2019

      • prashanth041 joined the channel
      • 2019-07-24 20501, 2019

      • bitmap
        it makes it sound like we should change RecordingT, but it should only be optional through recordings
      • 2019-07-24 20518, 2019

      • bitmap
        I mean tracks, sorry
      • 2019-07-24 20555, 2019

      • bitmap
        as in track.recording should be something like RecordingWithOptionalArtistCreditT :)
      • 2019-07-24 20513, 2019

      • reosarevok
        Is there a way to say "RecordingT, but with this one difference" without defining it all again
      • 2019-07-24 20515, 2019

      • reosarevok
        ?
      • 2019-07-24 20522, 2019

      • reosarevok
        If there is, we could just change it now I guess
      • 2019-07-24 20542, 2019

      • bitmap
        maybe $ReadOnly<{|...RecordingT, artistCredit?: ArtistCreditT|}> ?
      • 2019-07-24 20551, 2019

      • bitmap
        haven't tested it
      • 2019-07-24 20503, 2019

      • reosarevok
        "Test" means "run flow, see if it screams", right? Can do
      • 2019-07-24 20513, 2019

      • bitmap
        but I think later properties should override old ones in spreads like that
      • 2019-07-24 20556, 2019

      • reosarevok
        No errors, so I guess it's fine
      • 2019-07-24 20501, 2019

      • reosarevok
        For the other, is it enough to give " // TODO: cdtocs needs to be defined eventually: +cdtocs: $ReadOnlyArray<MediumCdTocT>" ? yvanzo?
      • 2019-07-24 20510, 2019

      • reosarevok
        Or "TODO: still missing cdtocs: etc"?
      • 2019-07-24 20512, 2019

      • yvanzo
        isn't it "recording" attribute rather than "RecordingT" here that should have optional "artistCredit"?
      • 2019-07-24 20557, 2019

      • yvanzo
        (but that's better if you fixed it rather than keeping a TODO :)
      • 2019-07-24 20559, 2019

      • reosarevok
        What's the difference? The recording attribute is a RecordingT, right? So it's "a RecordingT but with optional artistCredit
      • 2019-07-24 20501, 2019

      • bitmap
        yup
      • 2019-07-24 20536, 2019

      • yvanzo
        reosarevok: no worry, I was just typing about the comment while you were fixing the real issue.
      • 2019-07-24 20538, 2019

      • bitmap
        the difference is just the wording, adding attribute would make it clear you're not talking about the type
      • 2019-07-24 20549, 2019

      • reosarevok
        Oh!
      • 2019-07-24 20558, 2019

      • reosarevok
        Gotcha
      • 2019-07-24 20522, 2019

      • bitmap
        though I'm not sure my suggestion actually makes the property optional
      • 2019-07-24 20538, 2019

      • bitmap
        this seems to {+artistCredit?: ArtistCreditT} & RecordingT
      • 2019-07-24 20553, 2019

      • yvanzo
        the other TODO wording is fine although I'm not sure it is necessary and correct (shouldn't cdtoc be optional in some case?)
      • 2019-07-24 20542, 2019

      • bitmap
        I'm not sure they're always loaded, but we always output a cdtocs array in Medium::TO_JSON
      • 2019-07-24 20507, 2019

      • bitmap
        so it would just be an empty array if they're not loaded
      • 2019-07-24 20530, 2019

      • yvanzo
        OK then!
      • 2019-07-24 20507, 2019

      • reosarevok
        IS something like this better?
      • 2019-07-24 20509, 2019

      • yvanzo
        Is there a way to check that JSON passed to the renderer matches flow types at run time?
      • 2019-07-24 20510, 2019

      • reosarevok
      • 2019-07-24 20512, 2019

      • bitmap
        we could add something like https://gajus.github.io/flow-runtime/#/ enabled in development mode
      • 2019-07-24 20529, 2019

      • yvanzo
        reosarevok: please add 💿 💿 💿 ;)
      • 2019-07-24 20532, 2019

      • bitmap
        $ReadOnlyArray<💿>
      • 2019-07-24 20540, 2019

      • reosarevok
        Ok, more seriously, I'll push
      • 2019-07-24 20558, 2019

      • yvanzo
      • 2019-07-24 20559, 2019

      • BrainzBot
        MBS-10298: Check flow type at run time
      • 2019-07-24 20515, 2019

      • bitmap
        thx
      • 2019-07-24 20547, 2019

      • alastairp
        pristine__: hmm, a few ideas here
      • 2019-07-24 20535, 2019

      • alastairp
        how many times do you use this method replace_days? if it's only to get the first of the month, then I'd name it something like get_first_of_this_month instead
      • 2019-07-24 20541, 2019

      • alastairp
        in the case that you have at the moment, `days` is ok
      • 2019-07-24 20550, 2019

      • alastairp
        however, in this case I wouldn't do it like this
      • 2019-07-24 20504, 2019

      • alastairp
        instead, I'd pass in the year/month to create_training_data_from_window
      • 2019-07-24 20508, 2019

      • yvanzo
        back to the 1st PR, what is the purpose of https://github.com/metabrainz/musicbrainz-server/…
      • 2019-07-24 20518, 2019

      • alastairp
        this way you could theoretically calculate the data for any month
      • 2019-07-24 20540, 2019

      • prashanth041 has quit
      • 2019-07-24 20506, 2019

      • reosarevok
      • 2019-07-24 20508, 2019

      • alastairp
        normally it's better to pass information like this (what month to act on) as an argument, and collect the data as close to the "user" as possible
      • 2019-07-24 20558, 2019

      • alastairp
        e.g. if it's called by a user or by cron, either pass in this information as an argument, or in the main function get the current month and then pass that into your function
      • 2019-07-24 20542, 2019

      • yvanzo
        reosarevok: OK, thanks, would be nice to explain that we had both host and Referer in the commit message
      • 2019-07-24 20505, 2019

      • reosarevok
        Can do, how would you word it?
      • 2019-07-24 20510, 2019

      • reosarevok
        bitmap: ? :)
      • 2019-07-24 20554, 2019

      • bitmap
        well, fixing the case allows us to access them consistently