Closed anonym-HPI closed 1 year ago
@lukasrad02 As you have made the type PR, could you look at it?
The code from the error message is part of the position refactoring (#607, #612), done by @benn02, but I can take a look at this, too.
@anonym-HPI Can you provide us the exercise JSON causing this failure? The stack trace seems like the failure occurs during a migration of an exercise.
My first guess is that it could be caused by something missing in Migration 16, which was added later to this migration (see https://github.com/hpi-sam/digital-fuesim-manv/pull/625/files#diff-8d25d0591771a2492c80daa33599bb9080338b966884b5cad23db357848cd1c7) since Benildur said that it is not strictly necessary and we therefore don't need a new migration.
I think I completed the Migration with #612, but maybe there is still something missing
But it seems like there is an Element of which the position has not been set in the migrations
I don't know excactly which exercise it is. The whole server does not start. Do you want to have a dump of the database?
Do you have the Exercises as distinct JSON Files?
I have not done anything with a particular exercise, I went to the website and saw a bad gateway error from nginx and logged on to the server to fix and looked at the logs I get via docker compose logs -f
.
I can send you a dump of the database, but I don't have a particular exercise that resulted in a crash of the container. Just all exercises started and not deleted in the last month on fuesim-manv.de, which could be more than a few.
I could clear the database, but this would just make the error go away, but not fix the issue, that probably resulted in a migration error or so.
So I think I maybe did something that could maybe fix it but since I don't have a test case maybe try it out before merging?
I think I completed the Migration with #612, but maybe there is still something missing
I'm afraid that altering migration 16 with a later commit does not affect exercises that have already been migrated to version 16 with the old migration.
I will try, building the container locally, just a moment.
Do you want to have a dump of the database?
Yes, this would be nice!
I think I completed the Migration with #612, but maybe there is still something missing
I'm afraid that altering migration 16 with a later commit does not affect exercises that have already been migrated to version 16 with the old migration.
That would explain it... So I need to write a new migration? That is not optimal
I added a new migration 20 that repeats the missing part of 16 and 18
So tried it, with the branch, including 20, getting the following error (but the website can be served, as the container does return error code 0, but the backend is not available), a part of what the logs show:
This probably resulted in another error, the backend shouldn't be down and returning error code 0, but instead error code 1.
Just restarted the container and got also this, maybe these are just a result of restarting the container:
I kept a backup of the database before trying the branch, so you can change the branch without needing a migration 21
I don't understand this it seems like there is a patient with the property metaPosition, but this cant be because everywhere where I added this in 16 I removed it in 18, and I didn't add any of those in 20
Also, this indicates a bigger flaw in migration 18 and possibly 16
If I read the logs correctly, There is an add patient action with a patient that has a metaPosition even thou delete typedAction.patient.metaPosition is called on those Actions in 18 and those actions are not touched in 19 and 20.
I think since the migration works from very old states to the newest dev and the States that are broker can't be fixed we can close this issue since there is nothing more we can do
I think since the migration works from very old states to the newest dev and the States that are broker can't be fixed we can close this issue since there is nothing more we can do
Agreed, but do you know what fixed it in the end? Have not seen anything new committed to dev making changes to migration?
The problem was #597, and it got fixed with #612 but if #597 is applied (which was the case) then it can't be restored and will always fail after.
The docker container at fuesim-manv.de is down, the database is not fresh, this error is coming up. Pulled to have newest images and restarted them:
Could be a result of https://github.com/hpi-sam/digital-fuesim-manv/pull/616
Database shows the following:
LOG: could not receive data from client: Connection reset by peer
, probably because the container aborts and retries.