-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to latest version? #1046
Comments
I just remembered there's an export/import function at the bottom of the main page. Guessing that's the intended way of migrating up? Except it doesn't keep starred/unread stories, it just keeps track of which feeds exist, which isn't ideal (I'd like to keep my starred/unreads). Additionally, I tried resetting to approximately the time the dockerhub 0.2 tag image was created and this image seems to be working. So something in the ~163 commits since has changed the behavior of the app. |
Another update: it seems the This may be something worth exploring if there's ever any interest in an ARM/ARM64 build. |
@guidopetri thanks for reporting in! I'm going to have a look at the migrations and will hopefully be able to get them fixed up today. At an initial glance, it looks like that error would happen if didn't have a user in the database, which is a little surprising if you are starting with data from a previous instance. I can add conditional checks for that, but I'd like to understand a little more about your data setup. I'm not great with Docker, so it might take me some time to get that sorted out. If you've got any thoughts on it, I'd be happy to hear it. PRs would be helpful, too, even if only to update the docs. Regarding the encryption, the migration should automatically handle that for you. If it doesn't, I'll do what I can to fix it. |
That's what I'd have expected, too, but it seems the behavior for some library used changed in the past ~160 commits - the exact same database worked just fine with the old version I linked above in my fork. For my data setup: I have a Postgres DB running on Docker on a VPS, and stringer set up as a local user, a version from ~2 years ago almost exactly: 0b64dc0 . The postgres db is version 14.1(-alpine, if it matters). Do you want/need details on the tables themselves? I'm migrating to a server at home, with Postgres 14.1(-alpine) running in Docker, and setting stringer up within Docker as well. I had experimented with this a bit before on a second VPS and it seemed like the migration from one db to another had to work like:
It seems that the migrations step in the empty db is not necessary anymore, but I'm not confident about that. And obviously with the new encryption setup there is definitely a requirement for following the migrations with the data already in the db. On Docker, I am happy to help out, though my time is a bit constrained atm. I'm still migrating other services from VPS -> home server and just found out that my home server has a 64 bit kernel with a 32 bit userland, which is... inconvenient, and I'll have to migrate stuff again and reinstall the OS :'( but I'd be happy to at least extend the docker image to support ARM/ARM64 as well. We could set it up so that a docker image (in each of the architectures) gets built and pushed to dockerhub, maybe? Finally, on the encryption migration, I'm guessing the easiest way for me to run this is to set up the latest commit as a separate container and launching it pointing to the same db? (I believe this is equivalent to bringing the service down, doing |
Okay, I think I see what's going on with the migrations. I think rather than running the migrations on a new instance, you should be able to run The problem with that, though, is that when you import the data, the encryption won't be updated, so you'd also need to manually run the commands from the migration. Since you do have data you want in your database, maybe instead you can do something like this:
Ideally, I think we'd have a setup where the data is stored outside the docker image so that you don't need to go through this process. It's a bit of a pain.
This would be very helpful! I'm pretty sure I've seen other requests for better ARM support, so I think others would benefit from it as well.
That sounds about right. In principle, if you were on a VPS without Docker you should be able to simply |
**What** This makes a couple of updates to the migrations based on [this conversation][is]: * Rename `Api` -> `API`. This is expected by Rails inflections. * Add conditional checks to migrations that look for a user. If a person hasn't set up an account yet, the migrations should still run gracefully. [is]: #1046
**What** This makes a couple of updates to the migrations based on [this conversation][is]: * Rename `Api` -> `API`. This is expected by Rails inflections. * Add conditional checks to migrations that look for a user. If a person hasn't set up an account yet, the migrations should still run gracefully. [is]: #1046
Alright, I've updated the migrations so they should hopefully run smoothly now. I also opened a new issue about data exports, though that's probably a larger effort. |
Thanks so much! I think we can close this issue and open up a new one for Docker/ARM then? If you want to, you can assign that to me. For the migrations, I'll try launching a new container with the latest code pointing to the same db - my understanding is that the db migrations are performed automatically at the beginning (since I didn't do anything to start them last time) so hopefully it Just Works (tm). (fwiw, the postgres data is external to the stringer container) |
Okay, I've made a new issue for the Docker stuff. If anything else comes up, please let me know! |
I'm upgrading from a very old version of stringer, back when we only had one secret token.
To do that, I'm:
Unfortunately it seems like there's a few issues with starting the new image:
/usr/local/bin/supercronic
doesn't have+x
and supervisor returnssupervisor: couldn't exec /usr/local/bin/supercronic: ENOEXEC
add_api_key_to_user
migration fails, becauseconstantize
now returnsAddAPIKeyToUser
but it is currently namedAddApiKeyToUser
AddNullFalseToAssociations
migration fails, due toNoMethodError: undefined method 'id' for nil:NilClass
I'm running this on a raspberry pi (
arm64edit: arm - see below), so I'm unable to use the latest dockerhub images, and have to build from the github branch myself. Any suggestions on how to fix these issues? For the API one, I've managed to circumvent it by just runnings/Api/API
in that file, but I'm not a ruby developer and don't know how to fix the null ID one.Additionally, it seems like upgrading from the old encryption method to the new encryption method isn't very simple. I used to be able to dump the entire db and restore it, but it seems that now, with the different encryption, it must somehow be unencrypted and then re-encrypted. Is there support for this within the stringer app?
The text was updated successfully, but these errors were encountered: