Update and Plugin System
Hey there! :)
NodeBB is a great piece of software, but it has a few things that bug me a lot. One of them being the upgrade process. I'm currently on the v0.5.x branch and I have to say: Not a single upgrade worked as described in the docs.
NodeBB’s upgrade path is designed so that upgrading between versions is straightforward.
This is clearly not the case. As mentioned above, I wasn't able to get a single upgrade working, because of friggin' git. I already said a couple times that I'm a dev myself, but I never really used git. I just scratched the surface of it, so if problems like "unresolved merge conflicts" or other exceptions (cough - yes, "exceptions") occur, I just don't know how to deal with them.
Okay, there are things like Google or this forum, but I just want to update and not ask for assistance any time I want to install the newest code. I always ended up downloading the release package from GitHub and replacing old files with new ones manually. That works most of the time, even though I'm not sure if I'm really on 0.5.4 now or not. I replaced the files as usually, but it still says: "Hey, 0.5.4 is out, you should update."
~ Another thing is the plugin system. Plugins are great and the way to install and update them is indeed straightforward. I noticed there were a couple plugin updates available for my installation and I updated all of them right away ending up in a broken installation. Had to reset all plugins. No matter which of them I enable now, I will end up in a "NodeBB is spinning up another process ..." loop.
Guys, I don't know how you manage your stuff and I really love your project, but you should really consider changing the way how upgrades work.
@Netto-Hikari Git is used by many, many people.
An unresolved merge conflict would lead me to believe you've made a change to your local install. As you mentioned that you download the release then replace old files with new ones manually. This isn't really the best method, as those files may contain updates. You would want to add your changes again. Not the entire file. Any software that you modify will have an issue updating. The updates were to add support for 0.6.0 and it's breaking changes to make the platform better in the future. If you're not running 0.6.0, then you don't need those updates. nbbpm compatibility was backdated to 0.5.4 so that it wouldn't download an update that isn't for your version. But if you didn't have that backported change, then the latest version will have been downloaded.
You can hardly blame NodeBB for you not knowing how to use Git. That's like blaming the iPhone because you can't complete a level on Candy Crush. There are guides on how to use github that will help you.
I'm by no means a github master, but the commands do tell you what the issues are if any arise.
@a_5mith I installed NodeBB following the docs exactly. That worked as described. I set it up, installed plugins... No problem at all. I didn't change any file by hand.
When it comes to upgrades, I just simply follow the docs and it always says that I have to commit the changes before. I guess the plugins may have changed something... I don't know.
Hi @Netto-Hikari, thanks for your feedback about our upgrade process We definitely try to make the upgrade process fluid and straightforward, but if files have been changed, then yes, there will be problems as git will not know how to handle changed files.
When it comes to upgrades, I just simply follow the docs and it always says that I have to commit the changes before.
Did you mean Step 3? As far as I know, the only thing we ask admins to do before upgrading is back up their data. If you have never changed any of the core files, git should never complain.
If this ever happens, and you are absolutely sure you didn't change anything, then you are advised to run the following:
$ git fetch # to grab the latest code (but not apply it) $ git reset --hard origin/v0.5.x # force your local files to match the NodeBB repository *EXACTLY* $ ./nodebb upgrade # then proceed with upgrade as usual
^ Hooray, more unsolicited advice from strangers on the internet
After running those commands, future attempts to
git pullshould not have git complain.