themaster402 has joined #spacedock
themaster402 has quit [Client Quit]
Majiir is now known as Snoozee
egg is now known as egg|zzz|egg
<RockyTV> whats up with google and "gli-sli-zli" naming?
<SpaceDock> [SpaceDock-Backend] StollD commented on pull request #28 4af9735: What about `fmt.Println`? https://git.io/v786P
politas has quit [Ping timeout: 201 seconds]
politas_ has joined #spacedock
politas_ is now known as politas
phoenix has joined #spacedock
phoenix has quit [Client Quit]
Dazzyp has joined #spacedock
Daz has quit [Ping timeout: 186 seconds]
Dazzyp is now known as Daz
aradapilot_ has quit [Remote host closed the connection]
aradapilot has joined #spacedock
<RockyTV> o/
<SpaceDock> [SpaceDock-Backend] RockyTV force-pushed rockytv from 4af9735 to c320e7d: https://git.io/v7lxz
<SpaceDock> SpaceDock-Backend/rockytv c320e7d Alexandre Oliveira: Set migrate and setup scripts as subcommands...
<RockyTV> Thomas, can we remove the initial database queries from log?
<Thomas> I dont think so
<RockyTV> also I still get SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data in utils.js in OpenDock
<RockyTV> after installing my backend
<RockyTV> xhr.responseText is undefined
<SpaceDock> [SpaceDock-Backend] StollD pushed 1 new commit to master: https://git.io/v748v
<SpaceDock> SpaceDock-Backend/master 976e504 Dorian Stoll: Merge pull request #28 from KSP-SpaceDock/rockytv...
<Qboid> Starting build #62 for job SpaceDock-Backend (previous build: SUCCESS)
<Qboid> Project SpaceDock-Backend build #62: FAILURE in 10 sec: https://jenkins.tmsp.io/job/SpaceDock-Backend/62/
<Qboid> rockytvbr: Set migrate and setup scripts as subcommands
<RockyTV> 18:49:08 Sorry, we dont have a dist for your system: linux amd64
<Thomas> Yeah
<Thomas> glide: fix your stuff
<Thomas> Hmm, no
<Thomas> github: Fix your unicorns
<Thomas> RockyTV: Can you check the requests in the browser debug window (F12)?
<RockyTV> ya
<RockyTV> 200 OPTIONS localhost:5000/api/users/current
<RockyTV> cause: xhr type: plain
<RockyTV> response payload is empty
<RockyTV> why are we sending OPTIONS TO /api/users/current?
<RockyTV> if I set the dataType to jsonp it "works"
<Thomas> Because a JSONP request uses OPTIONS
<RockyTV> it doesn't make sense
<RockyTV> the way it is, it sends a json GET but it actually sends OPTIONS
<RockyTV> if I change dataType to jsonp, it sends a GET
<Thomas> No, what it should do is send OPTIONS, if the server answers correctly, send GET
<Thomas> and it does that for me
<RockyTV> it doesn't work for me
<RockyTV> 07/31 - 14:02:51 200 1.0014ms 127.0.0.1 OPTIONS /api/users/current
<RockyTV> this is all I see in the sdb app
<Thomas> Can you screenshot the list of requests opendock makes? (from the F12 window)
<RockyTV> server doesn't respond with a Allow: header
<Thomas> Because you dont send all headers a browser would send
<RockyTV> what do you mean?
<Thomas> This is my F12 with opendock
<Thomas> A browser sends Origin headers with the request etc.
<RockyTV> Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
<Thomas> Ohh, I have an idea
<Thomas> You need to set a bool in the sdb config to activate CORS
<Thomas> disable-same-origin: true
<Thomas> It seems that this is set to false
<RockyTV> it worked but now it sends a 403 with GET
<Thomas> Thats ok
<RockyTV> and JSON.parse still fails
<Thomas> There is no user logged in
<Thomas> ... but it shouldnt fail
<RockyTV> wait, I changed something
<RockyTV> okay, need the plugins now :P
<RockyTV> it works!
<Thomas> \o/
<Thomas> Now, if you edit something, and wait some seconds, it will auto update in opendock :D
<VITAS> august will be interresting for cpus
<Thomas> o/ VITAS
<VITAS> intel launches their 8000 series cpus amd x19**
<VITAS> and hi
<VITAS> and then theres vega gfx cards
<Thomas> I have heard that ryzen threadripper is in fact a better cpu with half of its hardware disabled :D
<VITAS> best joke ive read in a long time: google makes adblocker
<VITAS> i suspect to block non google ads?
<Thomas> just like adblock plus
<VITAS> depends on what you call " a better cpu"?
<Thomas> their upcoming server cpus
<VITAS> yes but google sells ads and it has a different size than those adblock bla
<VITAS> guys
<VITAS> many of the server cpu features are useless to normal users
<VITAS> e.g. ecc support
<Thomas> show me a normal user that buys a threadripper :P
<VITAS> but its likely that threaddipper cpus are server cpus in disguise like intels x series are xeons
<VITAS> linustechtips
<VITAS> and his viewers
<VITAS> i personaly am tempted by the amount of pcie lanes
politas has quit [Ping timeout: 383 seconds]
<RockyTV> I never had anything amd
<RockyTV> Thomas, firefox hangs when opendock is updating
<Thomas> it doesnt do that for me
<Thomas> weird
<RockyTV> does setup add mods?
<RockyTV> setup.go
<RockyTV> Thomas, I think I've found a bug in sdb
<Thomas> RockyTV: Yes, it adds two
politas has joined #spacedock
<RockyTV> ok something is wrong
<RockyTV> check the game related parameters https://sr.ht/RSA4.png
<RockyTV> game_short, gameversion and gameversion_id are empty
<RockyTV> shouldn't those be defined according to game?
<Thomas> Yes and no
<Thomas> Ther will always be unfilled parameters
<Thomas> *there
<Thomas> Because of the amount of recursion is allowed
<Thomas> In the end, almost all objects are somehow self-referencing
<Thomas> so there has to be a cut somewhere
<RockyTV> so why not remove game_short from the mod object then?
<Thomas> Wait, thats something different
<Thomas> game_short is not in the mod object
<Thomas> it is added by a plugin
<Thomas> Ah, yeah, but in the end it is the same issue
<Thomas> The transformation does m["game_short"] = mod.Game.Short
<Thomas> and mod.Game isn't initialized
<RockyTV> why is mod.Game not init?
<Thomas> recursion level
<Thomas> for the lists it is entirely disabled
<RockyTV> I don't understand
<Thomas> if you open /api/mods/kerbal-space-program/1
<Thomas> you will see it
<Thomas> Well
<Thomas> If the backend is asked to display all mods
<Thomas> it wont bother fetching their relations
<Thomas> because that takes too much time
<Thomas> it fetches all the data from the table and ignores relations to other objects
<RockyTV> can't we remove those empty fields?
<Thomas> We could but I would like to keep them
<Thomas> because if we keep them we can continue to pass the object to the go json encoder
<RockyTV> what's the point of keeping empty objects?
<Thomas> when we remove them we have to process the objects ourselves or do other yanky stuff
<Thomas> it is simpler, and it doesnt hurt
<Thomas> it is confusing ok, but the backend data isnt meant to be read by end users anyway
<RockyTV> I'm pretty sure when sdb is on prod some people will question why some fields are empty
<RockyTV> some developers, that is
<Thomas> And we can explain it to developers
<Thomas> I mean, sure, we can change it, but to me it would be more confusing to have different fields when calling different routes
<RockyTV> how much performance do we end up trading for displaying the data?
<Thomas> Depends how deep we want to go
<Thomas> Every mod fetches 7 other objects
<Thomas> so if we go to level 1, we end up with 7x more queries being made
<RockyTV> its weird
<RockyTV> because the frontend will "suffer" from it
<RockyTV> instead of getting the game short directly from a list of mods, it'll have to query the backend to get the game short for the specified game id
<RockyTV> btw, is the /api/mods/random going to be a plugin or can it be implemented directly in sdb?
<Thomas> RockyTV: Well, doing one additional request for one mod is cheaper than doing 7 times more queries for probably hundreds of mods
<Thomas> RockyTV: And about the random: I would say plugin
<Thomas> But it wouldn't be a problem for me to implement it in sdb
<RockyTV> I added it as an exception to /api/mods/:gameshort
<RockyTV> because iris was complaining about registering a route in /api/mods/random
<Thomas> Ah yeah, thats a problem
<Thomas> Could you add the same exception to /api/mods/:gameshort/:modid ? Could be useful for game specific randomness
<RockyTV> okay
Azander has quit [Ping timeout: 200 seconds]
Azander has joined #spacedock
<SpaceDock> [SpaceDock-Backend] StollD pushed 1 new commit to master: https://git.io/v74jf
<SpaceDock> SpaceDock-Backend/master 701cc43 Dorian Stoll: Fix some attributes
<Qboid> Starting build #63 for job SpaceDock-Backend (previous build: FAILURE -- last SUCCESS #61 1 day 1 hr ago)
<Qboid> Project SpaceDock-Backend build #63: STILL FAILING in 2 min 23 sec: https://jenkins.tmsp.io/job/SpaceDock-Backend/63/
<Qboid> dorian: Fix some attributes
<RockyTV> Thomas, how do we prevent a user from being called "current" or a gameshort being set to "random"?
<Thomas> we check when a user / game is created and return an error
<SpaceDock> [SpaceDock-Backend] RockyTV pushed 1 new commit to master: https://git.io/v7Bvv
<SpaceDock> SpaceDock-Backend/master 116baf0 Alexandre Oliveira: Add routes for random mod...
<Qboid> Starting build #64 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #61 1 day 1 hr ago)
<RockyTV> oh dang it
<Qboid> Project SpaceDock-Backend build #64: STILL FAILING in 1 min 57 sec: https://jenkins.tmsp.io/job/SpaceDock-Backend/64/
<Qboid> rockytvbr: Add routes for random mod
<SpaceDock> [SpaceDock-Backend] RockyTV pushed 1 new commit to master: https://git.io/v7Bvz
<SpaceDock> SpaceDock-Backend/master ca8e077 Alexandre Oliveira: Fix gameshort random mod route displaying all mods
<Qboid> Starting build #65 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #61 1 day 1 hr ago)
<Qboid> Project SpaceDock-Backend build #65: STILL FAILING in 2 min 4 sec: https://jenkins.tmsp.io/job/SpaceDock-Backend/65/
<Qboid> rockytvbr: Fix gameshort random mod route displaying all mods
<Thomas> Somehow your additions to sdb.go are confusing bash :D
<SpaceDock> [SpaceDock-Backend] RockyTV pushed 1 new commit to master: https://git.io/v7Bf1
<SpaceDock> SpaceDock-Backend/master 0ffc7f9 Alexandre Oliveira: Prevent gameshort 'current' from being used
<RockyTV> jenkins is trying to compile them, isn't it?
<Qboid> Starting build #66 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #61 1 day 1 hr ago)
<RockyTV> er
<RockyTV> tools/
<RockyTV> 22:57:52 ./build_sdb.go:44: syntax error: unexpected sdb, expecting comma or )
<RockyTV> you need to fix your build script, perhaps :P
<Thomas> well, bash is weird, and it totally doesnt work for me in the bash subsystem, but the issue is that it somehow changes \" to "
<Qboid> Project SpaceDock-Backend build #66: STILL FAILING in 1 min 54 sec: https://jenkins.tmsp.io/job/SpaceDock-Backend/66/
<Qboid> rockytvbr: Prevent gameshort 'current' from being used
<RockyTV> oh
<SpaceDock> [SpaceDock-Backend] RockyTV force-pushed master from 0ffc7f9 to 4081d1e: https://git.io/v6CsO
<SpaceDock> SpaceDock-Backend/master 4081d1e Alexandre Oliveira: Prevent gameshort 'random' from being used...
<Qboid> Starting build #67 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #61 1 day 1 hr ago)
<RockyTV> try echoing the file's contents in the build script
<SpaceDock> [SpaceDock-Backend] StollD pushed 1 new commit to master: https://git.io/v7BJt
<SpaceDock> SpaceDock-Backend/master 7f70c7a Dorian Stoll: Use ' instead of "....
<RockyTV> or that :p
<Thomas> Ok, lets see if it is just the linux subsystem on windows being crap, or if the bash script really doesnt apply any plugins :D
<Qboid> Project SpaceDock-Backend build #67: STILL FAILING in 1 min 57 sec: https://jenkins.tmsp.io/job/SpaceDock-Backend/67/
<Qboid> Starting build #68 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #61 1 day 1 hr ago)
<RockyTV> you could try echoing the file instead of using workarounds
<Thomas> I think I used echo when I wrote the script and changed it to printf because it destroyed line endings or something like that
<Thomas> ok, the plugin fetching works on jenkins, so I blame the linux subsystem
<Thomas> ok, it builds \o/
<Qboid> Yippee, build fixed!
<Qboid> Project SpaceDock-Backend build #68: FIXED in 2 min 20 sec: https://jenkins.tmsp.io/job/SpaceDock-Backend/68/
<Qboid> dorian: Use ' instead of ".
<RockyTV> ah
<RockyTV> the powershell script for installing the plugins is borken
<RockyTV> I think
<Thomas> Works perfectly for me
<RockyTV> might be because my glide ins't in gopath/bin
<Thomas> RockyTV: Yeah. I didn't want to assume that glide is in PATH
<Thomas> Or in the same directory
<RockyTV> you do know that gopath/bin (which gets set to lgobin) needs to be on path, right?
<Thomas> Yes, but since gopath/bin is a standarized location in the go ecosystem, it is better to demand adding that to the path that some random location
<Thomas> and everyone could do the same as the plugin script: use the full (or relative) path
Snoozee is now known as Majiir