#metabrainz

/

      • navap joined the channel
      • navap has quit
      • akashgp09_ joined the channel
      • wargreen has quit
      • strider joined the channel
      • strider has quit
      • strider joined the channel
      • lucifer
        akshaaatt: Hi! I have reviewed 73 and 68. Regarding 70, reosarevok had expressed some concerns regarding using artist images from WikiPedia. Let's confirm if we can do that before working ahead on that.
      • ruaok: command to open door using POST request should replace this right?
      • ruaok
        moin, yes the entire thing can go and be replaced with a requests call
      • lucifer
        moin!
      • 👍
      • CatQuest
        yea I don't think we can use wikipedia/commons/wikimedia images
      • akshaaatt
        @lucifer: Great! Cool
      • ruaok
        lucifer: I've added you to the guest list for the office. you should be able to try it the door buzzer.
      • it will only work from production machines
      • zas
        moiiin
      • ruaok
        moin!
      • zas
        ruaok: how do we do for backup machine?
      • ruaok
        I've set a port forward for port 2022, but I couldn't get it to work. I'll have to look at it again.
      • I do have a port forward to the office door buzzer RPi which is one the same network. so, that could be a route in if you need access right this second.
      • zas
        ok
      • Toasty joined the channel
      • ruaok
        hmm, the back up server isn't answering pings. I'll have to check it once I get to the office.
      • alastairp
        morning
      • akshaaatt
        @lucifer: #68 has been resolved :)
      • lucifer
        ruaok: i have updated prod. i see the open option here https://officebrainz.org/door/. is someone at the office to see if it works?
      • ruaok
        hang on. I can see if the request comes into the RPi.
      • try it now, lucifer
      • lucifer
        clicked it. do you see anything?
      • ruaok
        no.
      • did it delay by 5/10 seconds?
      • no, something is still not working right -- the call seems to return right away.
      • it should block for the for 5 or 10 seconds.
      • lucifer
        my bad, i didn't see that the code in flask view is commented out. https://github.com/metabrainz/office/blob/docke...
      • fixing it.
      • ruaok, trying again.
      • ruaok
        k
      • lucifer
        ISE now, sorry let me my fix the request again.
      • ruaok
        np
      • lucifer
        tried again. this time i don't see any error in the logs. did it work?
      • ruaok
        looks like it!
      • !m lucifer
      • BrainzBot
        You're doing good work, lucifer!
      • lucifer
        awesome :D
      • ruaok
        I'll head to the the office soon to check things out and poke at the backups.
      • lucifer
        akshaaatt: thanks for working on it. i made one more change and merged the PR.
      • akshaaatt
        Cool
      • Any uodates regarding #70 @lucifer ?
      • Updates*
      • lucifer
        akshaaatt: no not yet. i'll wait for reo's answer to know if we can add the feature. i'll review it after that.
      • akshaaatt
        Great! Cool once we have that PR dealt with I'll work on some more massive updates.
      • lucifer
        nice, let's discuss the further work later today if you are available?
      • akshaaatt
        I'll just go get lunch rn. We can schedule a meeting around 3:30pm rn if that works?
      • lucifer
        sure, works for me.
      • akshaaatt
        Cool
      • ruaok
        lucifer: did I ever add you to the LB-exceptions emails?
      • "Incremental dump 448 is more than 26 hours old: 4 days, 2:00:00.370655"
      • :(
      • alastairp
        I'm just responding to some emails then I'll take a look at lucifer's PR that he opened last week
      • that should get us in a position where we can fix dumps (again)
      • lucifer
        ruaok: yes i have been receiving those :). the dumps are failing because of permission issues. the PR to get rid of the lbdumps user is open which should fix it.
      • ruaok
        ok.
      • this feels like our own personal "never ending war" from 1984
      • alastairp
        lucifer: I saw a lot of startup errors over the weekend. I'll take a look and see if we can characterise what happened and why
      • lucifer
        alastairp: right, i had seen those. many of those are related to when consul restarts services.
      • thanks! i wanted to take a look but i dont know much about how/when consul decides to restart.
      • alastairp
        yeah, so as we discussed on friday(?) we should try and get some more info into the messages about which services are missing at each stage
      • yeah, I think the big thing is that no one knows when or why things restart. So adding a bit more to the logging here should tell us
      • I'm not sure what exit code 14 is
      • lucifer
        yes, right we decided to grep the info in `finish` files as well
      • alastairp, also i see in some consul tutorials that consul agent logs details about reload at info level. we could probably run one or two of our containers with log-level info or debug to get more detailed insight.
      • texke joined the channel
      • alastairp
        lucifer: cool, I didn't know about that. let's try it
      • however - this is the agent, not consul-template?
      • lucifer
        alastairp, ah yes. right. this is about consul agent. i just checked our consulagent container already has info level logs. for consul template, there's so we can probably get some info from it as well. https://github.com/hashicorp/consul-template/bl...
      • alastairp
        right. debug might be a bit too much, if it prints something for every key it gets
      • lucifer
        yeah, let's start with info and see what we get.
      • ruaok
        wooo, I waltzed into the office as normal. just with HTTPS this time. :) :)
      • akshaaatt
        @lucifer: while deploying the Android app on playstore, we can do the version naming on a scale of 3 I feel that would look much clean. Like for versionCode we can do 2.2.9 version name instead of 4.5 and this really doesn't affect anything since it's just the naming scheme. If we don't make this change then we'll be on version 10 soon enough
      • versionCode 39*
      • And yeah btw I'm here and ready for the meet :)
      • lucifer
        akshaaatt: sure, i don't have any preference for the version name and we don't have a fixed policy on deciding that. in our other projects, we just use the current date as the version but Play Store already shows the release date so its redundant.
      • let's discuss the tasks ahead then.
      • akshaaatt
        Yaas
      • lucifer
        i see there are 3 open PRs atm, i know #70 is ready for review. what's the status of other two and do you need any help or want to discuss anything about those?
      • akshaaatt
        The tagger update can be merged if you want to.
      • But I'll be working on it anyway for the next 2 weeks
      • Will finish the tagger implementation with the lookup songs and a few fixes
      • Other than that the PR can be merged at any time.
      • I did need some help with the Tests PR #67
      • lucifer
        I think merging incrementally smaller changes is nicer, I'll take a look at and review it today.
      • akshaaatt
        Coool
      • I'll just open up the codebase to discuss #67 more clearly
      • lucifer
        sure
      • akshaaatt
        So you asked me to write tests for the collectionrepo
      • And I created a fake class for it
      • Downloaded my collections json both public and private
      • Could you check if the downloaded json are correct?
      • lucifer
        i think the structure is correct but these `_` look wrong. https://github.com/metabrainz/musicbrainz-andro...
      • akshaaatt
        Wait let me go step by step. So I created the interfaces first
      • And separated the implementation classes
      • Are they good?
      • I did this step for Collection, Login and the Tagger as well
      • lucifer
        yes, the inteface and implementation separation looks fine. but there's one issue in how it is used.
      • Here, the interface should be injected not the implementation.
      • so that we are able to swap in the fake implementation during testing.
      • akshaaatt
        Right! I had some issue with that
      • lucifer
        hilt errors i think?
      • akshaaatt
        Yeaahh
      • lucifer
        that's expected because Hilt does not know which implementation to inject there. hence, we need to explictly tell it
      • akshaaatt
        Hmm. Interesting.
      • lucifer
        this is how we do it for LookupRepository, we bind the prod implementation to the interface.
      • akshaaatt
        Makes sense
      • Got it. I can make this change.
      • lucifer
        so whenever Hilt creates a component it will insert LookupRepositoryImpl where LookupRepository is required, which works because in production Hilt manages all components. in tests we create the components manually, so we put the FakeLookupRepository ourself.
      • akshaaatt
        Yeaaah I get it now! That's cool
      • lucifer
        i have reviewed the tagger PR, will test it later.
      • akshaaatt
        Great!
      • lucifer
        Do you have any other queries regarding these PRs?
      • akshaaatt
        Yeah continuing on the tests PR,
      • While writing the tests, the CollectionRepositoryTest basically fetches the data from our resources right?
      • And we use the MockServer to do that
      • lucifer
        yes right, the MockWebServer serves the test json files.
      • akshaaatt
        I think I didn't understand the dispather part
      • How do we serve the json file to it?
      • It's just that one line of endpoint I couldn't wrap my head around
      • lucifer
      • akshaaatt
        Yeah I see this
      • We return the data that's all cool
      • But how we fetch that data is what I need to understand
      • lucifer
        yeah, so that is a shortcut. we extract the entity name from the url. and and then load the json file named "{entity}_lookup.json". i have named the files as artist_lookup.json and release_lookup.json so on.
      • akshaaatt
        Ohhh
      • lucifer
        if i had done it properly it would be a switch case which maps the url to name of the file that should be served
      • akshaaatt
        Right right all cool then
      • I have 2 files to fetch though
      • One for public and the other for private
      • lucifer
        right, so you'll need to an if case in the dispatcher to check for which file to serve. the `request` variable will container the url and stuff.
      • akshaaatt
        Coool
      • lucifer
        you can check it and see which file should be served.
      • akshaaatt
        Right
      • Thanks a lot @lucifer ! 💯
      • lucifer
        it might also have some convenience methods but i don't remember offhand so will need to check its .
      • *docs
      • akshaaatt
        I'll work on finalizing these 2 PRs in a day or two. The tagger one is final for when you wanna merge. This tests one is what I'll complete in a while I guess.
      • Right now even I'll try to go through the docs of Wikimedia
      • Let's merge that PR of UI today