<DasSkelett[m]>
For now I marked both as Priority: High, feel free to adjust it.
<VITAS[m]>
IS it even used in any software?
<DasSkelett[m]>
The API? No idea. But I would imagine, some mod authors want to use it.
<VITAS[m]>
its good if it works but hnothing breaks atm if it doesnt
<VITAS[m]>
?
<DasSkelett[m]>
Okay
<DasSkelett[m]>
I did some work in the wiki, to clean it up a bit. Maybe more will come over the next days.
<VITAS[m]>
Very thank you my good sir
<VITAS[m]>
You could update the team pages to reflect the current state
<DasSkelett[m]>
okay, I would move all the names I don't know to `### Previous Contributors`, and add in the new ones I know of. Does it really make sense to divide it in categories as it is right now? I don't think there are as many, and it is hard to categorise some.
<VITAS[m]>
organize it as you wish
ThiagoBS has joined #spacedock
<ThiagoBS>
Hi folks! Sorry, I don't know if this is the appropriate place to ask but I'm trying to register to a new spacedock.info account (registered on wednesday) and I'm not getting the activation email. It is not in my spam folder and I also attempted to send the '!activate' email to activation-at-spacedock.info yesterday but no luck.
<ThiagoBS>
I sent an email to support-at-spacedock.info with my info, yesterday, as well.
<VITAS[m]>
whats you r username?
<ThiagoBS>
thiagobs
<VITAS[m]>
sec
<ThiagoBS>
thanks! :)
<VITAS[m]>
check if youre confirmed
<ThiagoBS>
hmm, not yet, pending still
<VITAS[m]>
ok lets try soemthign different
<VITAS[m]>
bow?
<VITAS[m]>
ups now
<ThiagoBS>
yay! I'm in! :)
<ThiagoBS>
thank you very much!! :)
<VITAS[m]>
np
ThiagoBS has left #spacedock [webchat.esper.net]
AllisTauri[m] has joined #spacedock
<AllisTauri[m]>
DasSkelett: updated developers guide on wiki
<DasSkelett[m]>
Thanks! Looks better. Just one thing: why do you list `pip install -r requirements` as extra command under the Python section? It is done in the Dockerfile for backend-dev too.
<RockyTV>
checking the debugger tab, the page is "fine" but my browser renders it with http 500
AllisTauri[m]1 has joined #spacedock
<AllisTauri[m]1>
DasSkelett because what happens in docker happens in docker; while the developer needs those libs in their venv to work with actual code. Otherwise their IDE wouldn't resolve reverences.
<DasSkelett[m]>
Oh, didn't think about IDEs. Makes sense.
<VITAS[m]>
pycharm!
<RockyTV>
VITAS[m], could you check the server/cdn logs?
<AllisTauri[m]>
Yep; but not everyone uses it.
<VITAS[m]>
shortly
<RockyTV>
I think the issue with my profile might be related to the read-only storage problem
<AllisTauri[m]>
So it's best to mention the need to install requirements prior to coding
<DasSkelett[m]>
RockyTV: you mean, now it is mounted as write-only? 😄
<RockyTV>
lol
<RockyTV>
I get the same html only page you got trying to create a mod via the api
<VITAS[m]>
ok
<VITAS[m]>
soooo
<VITAS[m]>
2 things: ill mount storage from the same source as on prod on alpha and beta so you can test (and maybe have the same problems)
<VITAS[m]>
second: rocky what can i do to help with your profile?
<VITAS[m]>
dex.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated di rectory index forbidden by Options directive
<VITAS[m]>
should be a quick fix
<VITAS[m]>
not cdn
<VITAS[m]>
those errors are from apache webserver
<RockyTV>
because I am logged in I get a different page, but it's returning literally a blank html page with a big text written "internal server error"
<VITAS[m]>
not ATS
<VITAS[m]>
ATS has the fancy ones in red
<VITAS[m]>
Aug 9 14:38:49 sd1 gunicorn[747]: [2019-08-09 14:38:49,872] ERROR in app: Exception on /profile/Xinayder [GET]
<VITAS[m]>
qlalchemy.orm.exc.DetachedInstanceError: Instance <User at 0x7fe6e3b6aa58> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error
<RockyTV>
jinja2.exceptions.UndefinedError: 'None' has no attribute 'gameversion'
<RockyTV>
ugh
<VITAS[m]>
the gameversion is something that copmes up in all kinds of situations
<VITAS[m]>
doesnt have to be related to your problem
<RockyTV>
yesterday I had a "gameversion not found" error several times
<VITAS[m]>
hmm idea: it lists all your mods
<VITAS[m]>
and you tried posting one under another game
<VITAS[m]>
and that might be broken
<VITAS[m]>
or
<VITAS[m]>
the profile code is broken in a sense that we only tested it for ksp
<VITAS[m]>
solution: delete mod and disable all games except ksp
<AllisTauri[m]>
We have to use `flask-sqlalchemy` instead of custom-made thread-local sessions
<VITAS[m]>
longterm: test multigame function better
<RockyTV>
I'll submit a pr real quick
<VITAS[m]>
ill try and find your mod post in the db and delete it
<DasSkelett[m]>
I think we could test this with a dummy user and a dummy mod upload for another game on alpha.spacedock.info.
<DasSkelett[m]>
So we can make sure potential fixes work.
<RockyTV>
VITAS[m], don't delete it yet
<RockyTV>
I want to know why it's crashing
<VITAS[m]>
ok..
<RockyTV>
like if you cna copy the row before deleting and pasting it here or on etherpad
<VITAS[m]>
but im very bussy and it might have to stay that way for a while
<DasSkelett[m]>
Reagrding the script to remount the drive if it isn't working, I would need some more information how exactly it is mounted (options, path, fs...)
<VITAS[m]>
exactly
<VITAS[m]>
thats why im asking for the mount point of the kspmod folder on alpha and beta
<VITAS[m]>
so youll get your testbed
<DasSkelett[m]>
Oh yeah ^^ thanks.
<DasSkelett[m]>
I think in this case I also need access to the alpha (and maybe beta later too) server.
<VITAS[m]>
yes
<VITAS[m]>
and i need an ssh key from you
<RockyTV>
hm, I'll try testing creating a mod via the API and then could you check the logs, please? VITAS[m]
<RockyTV>
so we can figure out what's going on
<DasSkelett[m]>
Thought so. I'll PM it to you via Riot (if I can figure out how to do that)
<RockyTV>
VITAS[m], check the logs
<VITAS[m]>
no
<VITAS[m]>
please do that on alpha
<VITAS[m]>
RockyTV: send me an SSH key too and illa dd you too.
<VITAS[m]>
the others can tell you how to connect then
<RockyTV>
we need manual activation on alpha right?
<RockyTV>
I just need a manual activation on my account on alpha
<VITAS[m]>
i think i set mail up too
<VITAS[m]>
but noone tested it yet
<VITAS[m]>
db credentials are in the config file
<VITAS[m]>
added your key to both
<VITAS[m]>
AllisTauri or HebaruSan can tell you how to connect
<RockyTV>
VITAS[m], the activation email doesn't exist
<VITAS[m]>
the hsot can simply sue the mail proxy to send it
<RockyTV>
"Your message wasn't delivered to activatealpha@spacedock.info because the address couldn't be found, or is unable to receive mail. "
<VITAS[m]>
didnt i put it in config.ini?
<RockyTV>
I don't know
<VITAS[m]>
i did
<VITAS[m]>
1.8. is the mail proxy not the server
<VITAS[m]>
prod sues the same settings
<VITAS[m]>
wheres the error from?
<VITAS[m]>
and yes its unable to recive mails
<VITAS[m]>
because it doesnt exist
<VITAS[m]>
but it can send it
<VITAS[m]>
btw mounted 64gb of storage into serv/kspmods on each host
<VITAS[m]>
its dont the same way as prod
<VITAS[m]>
so if one failes...
<RockyTV>
ah well I haven't got an activation email
<VITAS[m]>
then edit the db
<VITAS[m]>
btw HebaruSan i had to do stuff to your mod files because i mounted the storage over them
<VITAS[m]>
(on a and b)
<DasSkelett[m]>
AllisTauri the installation of the requirements (of requirements.txt) can fail for psycopg2:
<DasSkelett[m]>
```
<DasSkelett[m]>
...(truncated)
<AllisTauri[m]>
yes, my fault
<VITAS[m]>
anything else you guys need from me?
Bart[m] has joined #spacedock
<Bart[m]>
Your credit card, a shoe box full of high quality fake passports, 2 kilogram of C4, 20 detonators, a plan of the bank vault, and some catchy music to make a planning montage for our next Hollywood movie.
<RockyTV>
this could work as well, right? {% if user.username == profile.username or mod.published %}
<RockyTV>
it checks if the profile being viewed is the user's, if not then it will only display if the mod is published
<DasSkelett[m]>
okay, your patch throws this:
<DasSkelett[m]>
`jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'endif'. You probably made a nesting mistake. Jinja is expecting this tag, but currently looking for 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.`
<DasSkelett[m]>
Oh yeah, HebaruSan is right, scratch my comment
<DasSkelett[m]>
*edit:* ~~I think this was an attempt to introduce multi-version compatibility, with one version to be the _default_ one~~ -> ~I think this was an attempt to introduce multi-version compatibility, with one version to be the _default_ one~
<DasSkelett[m]>
~~I think this was an attempt to introduce multi-version compatibility, with one version to be the _default_ one~~
<RockyTV>
I think it looks incomplete
<RockyTV>
you don't have anything setting Mod.default_version_id
<DasSkelett[m]>
But something does set it...
<RockyTV>
also, we should probably get rid of fork status
<RockyTV>
if you provide a fallback, it returns the fallback, otherwise it raises an exception
<HebaruSa->
I think it would throw the exception before next was called
<HebaruSa->
It's a parameter, those are processed first
<RockyTV>
yeah but you can't create a mod without versions
<HebaruSa->
Python isn't a lazily evaluated language
<AllisTauri[m]>
HebaruSa- (IRC): could you wait a minute without repeating "revert"?
<AllisTauri[m]>
The code that is there now is completely equivalent to the one that was before; the bug existed.
<AllisTauri[m]>
yes, there are
<AllisTauri[m]>
what you want is this:
<AllisTauri[m]>
no, RockyTV it won't
HebaruSan[m] has joined #spacedock
<HebaruSan[m]>
Explain how
<RockyTV>
wait what
<AllisTauri[m]>
the fallback is evaluated before the call to `next`, so if the `versions` is empty, you get the `IndexError`
<HebaruSa->
That's not the bug
<HebaruSa->
The bug is that if the id isn't set, it doesn't fall back to the first element of hte list
<AllisTauri[m]>
`return next((v for v in self.versions if v.id == self.default_version_id), None) or self.versions[-1]`
<RockyTV>
it's not possible to have a mod with no versions
<AllisTauri[m]>
* `return next((v for v in self.versions if v.id == self.default_version_id), None) or self.versions[0] if self.versions else None`
<RockyTV>
it's restricted by the api, you can't delete a version if you have only one version
<DasSkelett[m]>
Disclaimer: I can't really follow what you are talking about. But despite that, AllisTauri is right, this or a similar bug must have existed before, because the way we discovered this, was with RockyTVs profile on _production_.
<AllisTauri[m]>
the code above is this callback
<HebaruSa->
Ah dammit, I confused 'versions' with 'self.versions', you're right, that len 0 check would have returned None before in the same instance
<AllisTauri[m]>
* the code above is this fallback
<AllisTauri[m]>
but the code that was before never falled back to the first element
<RockyTV>
the reason we had the bug in production was that the commit was 10 days old
<AllisTauri[m]>
but there's `/api/mod/<int:mod_id>/set-default/<int:vid>`
<RockyTV>
honestly
<AllisTauri[m]>
and in `/api/mod/create` the default version is also set
<RockyTV>
setting it to versions[0] will work because then we have a fallback, but it's almost impossible for a mod to not have a version
<AllisTauri[m]>
and in `/api/mod/<mod_id>/update`
<RockyTV>
AllisTauri[m], that's not what happened yesterday, though... I published my mod without a default version and it broke my profile
<AllisTauri[m]>
to sum it up:
<AllisTauri[m]>
1. there's a script that may be called externaly
<AllisTauri[m]>
2. there's a dedicated API to set default version
<AllisTauri[m]>
...(truncated)
<RockyTV>
there's a button that sets the default version, but it's not done automatically
<HebaruSan[m]>
creation/update via the API
<AllisTauri[m]>
**the code in create/update is ugly as hell with respect to ORM/DB usage though; the mod actually may be created and don't have the default version
<HebaruSa->
Does the web interface go throught the API?
<AllisTauri[m]>
irc_RockyTV: it is set automatically
<RockyTV>
HebaruSa-, yep
<AllisTauri[m]>
*at least in the alpha code; let me check the dates
<RockyTV>
all the javascript scripts refer to the api, so it's being used
<HebaruSa->
Wow, interesting
<AllisTauri[m]>
yea, the code is 2016
<AllisTauri[m]>
```
<AllisTauri[m]>
version = ModVersion(secure_filename(version), game_version_id, os.path.join(base_path, filename))
<AllisTauri[m]>
...(truncated)
<RockyTV>
why can't matrix just send these as attachments
<DasSkelett[m]>
That's what I linked earlier 😃
<HebaruSan[m]>
I thought the 'API' was for third party programmatic access, not implementation of the site itself!
<RockyTV>
lol
<AllisTauri[m]>
This should've been
<AllisTauri[m]>
```
<AllisTauri[m]>
...(truncated)
<AllisTauri[m]>
* This should've been
<AllisTauri[m]>
```
<AllisTauri[m]>
...(truncated)
<AllisTauri[m]>
because `default_version` should've been a relationship
<RockyTV>
I'll edit my Pr then
<AllisTauri[m]>
HebaruSan: usually the API dedicated to external use is a subset of the full API. But one would always want to share as many endpoints between the frontend and external interface
<DasSkelett[m]>
But `Mod` doesn't have a `default_version` property? Only the `dev default_version()` and `default_version_id`.
<AllisTauri[m]>
Correct. Because there's not ORM relationship set p for it
<AllisTauri[m]>
So instead of custom-made property that in should've been just:
<AllisTauri[m]>
```
<AllisTauri[m]>
...(truncated)
<DasSkelett[m]>
what's p?
<DasSkelett[m]>
Oh now I got it
<RockyTV>
I've closed my PR that attempted to fix the display issue with published mods.
<RockyTV>
it's supposed to be fixed on alpha
<AllisTauri[m]>
I'm afraid it's more complicated. You're right that the mod shouldn't have been created without default version. But apparently it was; and the code that creates mods is 3yrs old..
<RockyTV>
if we add a relation to default_version we could try to fix it
<HebaruSan[m]>
Ooh I didn't realize SD had a ban on flag packs, that's a bold move
<HebaruSan[m]>
Also mod creation may be broken on alpha currently, it just froze for me
<HebaruSan[m]>
(Wanted to try testing the unpublished on profile thing)
<RockyTV>
I need someone to activate my account
<HebaruSan[m]>
Ahh, /srv/storage/kspmods is root:root 700
<HebaruSan[m]>
Err, 755. Still no good for www-data.
<DasSkelett[m]>
VITAS redid the storage mount earlier, to represent the way it is on production.
<HebaruSan[m]>
Broken? 😃
<DasSkelett[m]>
Exactly!
<HebaruSan[m]>
OK, well if I just chown and chmod it, will that work? Or will a container or a proxy server or something get confused?
<DasSkelett[m]>
Yeah I think he didn't account for ownership and permission on mounting...
<DasSkelett[m]>
And that's a question I can not give an answer to :/
<HebaruSan[m]>
OK, well it's www-data:www-data 770 now. Fingers crossed that it stays that way
<HebaruSan[m]>
Shouldn't there be an error logged if this happens?
<DasSkelett[m]>
That's what he wanted me to write a script for. But to complete it, I need access to the server, to find out how exactly the drive is mounted.
<HebaruSan[m]>
No I just mean, the API code runs and fails, something should be shown to the user and printed to journalctl
<DasSkelett[m]>
Ah okay. That too, yes
<DasSkelett[m]>
So I already have access per se , he meant I should ask you or AllisTauri to tell us how to connect.
<DasSkelett[m]>
So I already have access per se , he said I should ask you or AllisTauri to tell us how to connect.
<HebaruSan[m]>
I'll PM you
RockyTV[m] has joined #spacedock
<RockyTV[m]>
are we using psql on alpha?
<Bart[m]>
VITAS, might want to check in on your family near Cologne, pretty rough thunderstorms in the area (tornados were on the ground in Luxembourg).
VITAS[m] has quit [Quit: Idle timeout reached: 10800s]
<VITAS[m]>
im sure theyre fine and call me if theyre not :)
<VITAS[m]>
i know theyre inside
<VITAS[m]>
RockyTV: yes psql its the exact same servers and setup
<VITAS[m]>
only different db
<VITAS[m]>
so if it works on alpha / beta it should be the same on prod
<HebaruSan[m]>
Who's editing code live on alpha right now?
<HebaruSan[m]>
build-frontend.sh has uncommitted changes
<DasSkelett[m]>
I'm not, hopefully...
<HebaruSan[m]>
Oh the timestamp was 12 hours ago, so not "right now"
<RockyTV[m]>
DasSkelett create mdo api is fine
<DasSkelett[m]>
It is?
<RockyTV[m]>
yep
<RockyTV[m]>
the problem is that `game` expects an int not a string
<DasSkelett[m]>
ohh of course...
<RockyTV[m]>
and I just remembered that one of the things me and thomas did when rewriting/splitting the backend and frontend was type checking all parameters from the api
<DasSkelett[m]>
Yeah I even did that when testing locally, I checked the database and swapped the game name out for the id.
<DasSkelett[m]>
But for some reason I didn't test the same for the prod API
Llamato has quit [Read error: Connection reset by peer]
<VITAS[m]>
The DC staff says the RO remount could stem from them moving the cloud space arround on systems
<VITAS[m]>
they didnt have a guranteed solution
<VITAS[m]>
but they said proxmox has known problems with smb
<VITAS[m]>
so no change
<VITAS[m]>
yet
<DasSkelett[m]>
Okay. I'm working on the script right now. Regarding the remount, did a simple `mount -o [options],remount /mnt/pve... /srv/storage/kspmods` suffice?
<VITAS[m]>
they said i should try mouinting the smb share via the shell not th eui
<VITAS[m]>
but i fear messing up the hd image files for the containers
<VITAS[m]>
and because its late im not doing experiments right now
<VITAS[m]>
when you finish your script ask darklight to look over it and deploy it on prod unless he has a better idea (and can be drawn away from playing warframe)
<RockyTV>
not sure if it's the same but I had the same problem when I moved to linux, I couldn't write to my HDD because it was ntfs
<VITAS[m]>
not the same
<RockyTV>
I edited the fstab file and set it to mount the volume as read-write and it worked
<VITAS[m]>
it is read write most of the time
<VITAS[m]>
but sometimes it turns RO
<RockyTV>
(I also changed it to ntfs-3g)
<VITAS[m]>
and its a smb share
<RockyTV>
DasSkelett, idea: make it only remount if it's read-only
<VITAS[m]>
i blevit that the DC staff is right and the hickup from moving the data between hosts is causing the FS to go in sort of a failsafe mode
<VITAS[m]>
isnt that the idea that the script should only act if the mount is RO?
<VITAS[m]>
but maybe remounting is enough
<AllisTauri[m]>
HebaruSan: it was me, while trying to figure out why the building process was not working; the permissions issue
<HebaruSa->
Allis, can I remove those changes?
<RockyTV>
AllisTauri[m], there's a few whitespace changes on your autodeploy PR, I suppose they were done by your IDE?
<DasSkelett[m]>
RockyTV, VITAS: Right now I have this:
<DasSkelett[m]>
```sh
<DasSkelett[m]>
...(truncated)
<VITAS[m]>
Might be enough to grep mount
<VITAS[m]>
well know it when it comes back again
<VITAS[m]>
you can fix prod manualy via darklight
<VITAS[m]>
and then inspect alpha & beta /serv/ksmods