#metabrainz

/

      • alastairp
        put the "2023-01-18T14:28:13+05:30" representation in the tooltip
      • lucifer
        yes, the tooltip does show that
      • alastairp
        mmm, of course - I see the reason to use the offset value in the "standard" case of daylight savings
      • because it'd be nice for it to show 4pm when I was actually listening to it at 4pm, not 3 or 5
      • lucifer
        monkey: hi! have you used luxon before?
      • alastairp
        I don't want to sound like I'm saying "stop everything and throw it away", though I can see how this might sound like that
      • but I wonder if we should stop, make a ticket, and list all of these cases
      • and get aerozol's feedback
      • and work out what we want to show in each of these cases
      • I can think of a few cases off the top of my head: 1) daylight savings, 2) someone gets on a plane and goes somewhere else in a different tz
      • reosarevok
        Sounds sensible to me
      • alastairp
        after thinking through it, I think you're right in the way that you've shown the data in your screenshot
      • reosarevok
        My alternative proposal: use browser time for display on the list, show submitted time + timezone on hover or with some see more option
      • lucifer
        ii agree but i don't think we'll figure out the cases until we do put it for testing or regular use.
      • alastairp
        it's just that this is a very uncommon situation to be in. normally you're going to submit all in one tz, and then there'll be a switch and it'll all be in the other timezone
      • reosarevok: right, I initially thought that (and that's basically what we do now), but that breaks daylight savings
      • as in the summer, all of the things you listened to in the winter will be an hour out (ok, it's a small thing, but this idea of introducing the timezone was our way of preventing this from happening)
      • lucifer
        reosarevok: i think if the datetime iso string include the correct dst offset then dst would be observed fine.
      • uh that was for alastairp ^
      • alastairp
        I'm wondering if we could have a little "/!\ the tz in this listen doesn't really match where you are, but we're showing it as submitted" popup
      • lucifer
        because my hunch is that tz-data accounts for this.
      • alastairp
        lucifer: yes right, I think we're both agreeing on the same thing
      • lucifer
        ah ok, makes sense.
      • there's also this thing of how we show 3 hours ago, 4 hours ago thingy.
      • alastairp
        (and this is kind of why I'm asking for a ticket - for me I find it much easier to look at a list of our decisions instead of always trying to remember what we decided in the last discussion)
      • lucifer
        like aerozol listens a track at 11 PM NZ time, when i look at his page, should it show as 6 hours from now or 1 hour ago?
      • alastairp
        1 hour ago
      • lucifer
        makes sense, will have to account for that in tz handling.
      • reosarevok
        alastairp: how is your playing going? Any luck with inc?
      • alastairp
        reosarevok: O
      • I've been thinking about timezones :)
      • reosarevok
        haha
      • Ok
      • alastairp
        just looking at the spec again
      • lucifer
        LB-1213
      • BrainzBot
        LB-1213: How to display timezone aware listens to users? https://tickets.metabrainz.org/browse/LB-1213
      • alastairp
        <3 lucifer
      • lucifer
        i'll open a draft PR for now because except test/docs its mostly done.
      • alastairp
        > The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00.
      • reosarevok: ^
      • reosarevok
        Hmm. So maybe anyOf and allOf combinations would work?
      • anyOf for the incs, and allOf inside for incs that depend on other incs?
      • anyOf [aliases, recording-rels, allOf [recording-rels, isrcs] ] sort of thing?
      • alastairp
        yeah, right. I'm looking at anyOf at the moment and seeing how it gets represented
      • jasje_
        akshaaatt: apparently the first startup bug was not fixed. The bug is inconsistent and might have not occurred while I was testing my fix.
      • mayhem
        zas: DNS issue is resolved then, yes?
      • zas
        yes, it was one hour after the issue appeared.
      • mayhem
        ok, cool.
      • alastairp
      • reosarevok: I've got it generating the interface and it'll construct a valid query. still trying to set the valid parameters
      • oh wait, it's not a schema
      • it's an enum
      • sigh
      • reosarevok: it seems that "you can only include x if y is set" is going to include a twisty maze of anyOf/allOf
      • reosarevok
        I think so, yes
      • alastairp
        but is that strictly necessary? e.g.
      • > If you request work-level-rels for a recording, you will still need to request work-rels (to get the relationship from the recording to the work in the first place) and any other relationship types you want to see
      • (from the wiki)
      • would could just add this as a description to the specification on /release
      • at least initially
      • reosarevok
        I guess
      • We will return a bad request in that case, with the error
      • $i is not a valid option for the inc parameter for the $resource resource unless you specify one of the following other inc parameters: $params
      • But I guess if it's documented maybe it's fine as a start
      • alastairp
        and the inline "try it out" does nicely show these error messages
      • reosarevok
      • That's their actual suggestion, it seems, so :)
      • alastairp
        OK, let me finish up the artist example and post it on that ticket
      • oh, I wonder how to separate browse and search into 2 separate docs, as the URL is the same, right?
      • reosarevok
        Sigh. Yeah
      • That's kinda the "mutually exclusive" thing there
      • It's one or the other depending on the params
      • It's basically "if there's ?query it's a search"
      • (and documenting ?query itself might be *fun*)
      • alastairp
        description: "A lucene search query"
      • done
      • :)
      • reosarevok
        I mean the actual parameters that can be part of a query
      • But maybe it's not hard, dunno
      • Anyway, I guess yvanzo is waiting for a second meeting? :) So if you want to put what you have up, I can look at it a bit
      • (are you playing with it in https://editor.swagger.io then?)
      • alastairp
      • reosarevok: ^ paste that into editor.swagger.io if you want
      • reosarevok
        Ok, I could play with that while you SOLR
      • jivte joined the channel
      • alastairp
        hi yvanzo, can we talk starting in ~20 minutes? Or after lunch (approx 2pm CET) if that's better
      • jivte
        monkey: Hey for that throttle change it is not for promises and searchUsers is a promise based utility so should I use throttle-promise library or something else can un please help in it. :)
      • yvanzo
        alastairp: as you prefer :)
      • alastairp
        yvanzo: after lunch, in 1h45m would be much better for me, thanks
      • reosarevok
        Ah, good old Spanish lunch
      • yvanzo
        👍 🧑‍🍳
      • reosarevok comes back from his 10 min lunch
      • alastairp
        reosarevok: we have people in the lab who don't eat with us at 1:30, because that's too early for them
      • reosarevok
        I meant more the "lunch taking over an hour" bit :D
      • alastairp
        hey, I didn't say that I'm going to lunch now!
      • reosarevok
        But yeah, my family ate fairly consistently at 3 PM actually
      • yvanzo
        right, you started a few hours ago?
      • reosarevok
        Maaaaybe 2:30 if we were in a hurry
      • vibhoo_24 has quit
      • alastairp
        🙄
      • jivte has quit
      • reosarevok
        alastairp: lol, so I guess *technically* we can make it so Swagger is happy with splitting browse and search by having /artist: and /artist/:
      • 🙄 indeed
      • Not sure if that'd even work though when trying to use try it out
      • Getting really tempted to add an alias mbid/search?query :p
      • alastairp
      • > Basically, you can have two definitions to the same path by adding a slash (/) in the URL.
      • :D
      • mayhem
        I have to say, writing docs is pretty rewarding when that is the only goal for the week.
      • alastairp
        This also means that it is impossible to have multiple paths that differ only in query string, such as: [what we want to do]
      • This is because OpenAPI considers a unique operation as a combination of a path and the HTTP method, and additional parameters do not make the operation unique. Instead, you should use unique paths such as: [what reosarevok wants to do]
      • reosarevok
        Yeah. tbh our API design is kind of a hot mess
      • alastairp
      • reosarevok
        So I'm not surprised it causes issues
      • But better to document it semi-properly even if it's a bit hacky now, then improve on it
      • So if //artist or whatever works, then I'll try it out
      • alastairp
        tbh, generating 2 sections with an extra / or ? is probably a great temporary solution with a small note
      • as long as MBS supports the auto-generated URLs
      • reosarevok
        Yeah
      • I'll go for a walk to leave the house before it's dark
      • Then come back and play with that idea
      • (and maybe comment on whether I can follow your SOLR docs at all :p )
      • jasje_ has quit
      • monkey
        lucifer: I saw your message yesterday and wondered "WTF is a Luxon", so that should answer your question :D
      • Gotta say, luxon looks nice to handle timezone stuff
      • Also I like the sass in their DST docs:
      • >Because our ancestors were morons, they opted for a system wherein many governments shift around the local time twice a year for no good reason. And it's not like they do it in a neat, coordinated fashion. No, they do it whimsically, varying the shifts' timing from country to country (or region to region!) and from year to year. And of course, they do it the opposite way south of the Equator. This is all a tremendous waste of
      • everyone's energy and, er, time, but it is how the world works and a date and time library has to deal with it.
      • Oh, thank fuck someone solved this "where do I put my modal in my react code?" issue for us: https://github.com/eBay/nice-modal-react
      • alastairp
        yvanzo: sorry, it took longer than expected to get my lunch, I'll be another 15mins
      • yvanzo
        np, take your time :)
      • BrainzGit
        [acousticbrainz-server] 14kenrick95 opened pull request #428 (03master…fix-broken-link): Fix broken link to Metabrainz https://github.com/metabrainz/acousticbrainz-se...
      • yvanzo
        zas: Would you recommend any list or API for scanning URLs?
      • (so far urlscan.io and virustotal.com would be quite pricey)
      • BrainzGit
        [acousticbrainz-server] 14alastair merged pull request #428 (03master…fix-broken-link): Fix broken link to Metabrainz https://github.com/metabrainz/acousticbrainz-se...
      • alastairp
        yvanzo: hi, I'm here now
      • zas
        yvanzo: nope, but what's the purpose?
      • yvanzo
        zas: scanning URL edits
      • reosarevok
        To find what? Spam? Broken URLs?
      • yvanzo
        using wolf atm for debugging mb solr session
      • alastairp
        yvanzo: I'm running `docker-compose logs -f --tail 100 search`
      • yvanzo: but http://localhost:8983/solr/#/recording/core-ove..., pointing to wolf shows content
      • zas
        yvanzo: if that's about identifying unsafe websites, maybe https://developers.google.com/safe-browsing/v4
      • alastairp
        yvanzo: when you get a timeout, I see this error message on solr
      • The request took too long to iterate over terms. Timeout: timeoutAt: 11426689695006838 (System.nanoTime(): 11426689945661048), TermsEnum=org.apache.lucene.codecs.blocktree.SegmentTermsEnum@2d9515ef
      • CatQuest
        [23:08] <aerozol> Just rediscovered this snap I took from a co-workers desk years back. Too good! https://usercontent.irccloud-cdn.com/file/itNZg...
      • <-- me when i play games :D