Upgrade central to not-most-recent version

Hi,

How to upgrade central to v2023.1 or earlier, instead of the latest version v2023.2? Which commands to use?

Regards,
Saad

I think you should be able to modify the pull command during the upgrade as follows:

git pull origin <commit_hash>

You should be able to get the commit_hash from the list of releases
so for v2023.1.0 it should be 00364ca4767abad989bed50ff408291d246bd5df

I am not sure if the next step (running git submodule update -i) will update according to the central code version, or if it will automatically pull the latest.

Many thanks. I would love to get some more opinion about if all other commands would run OK or not (just trying to avoid getting stuck in the middle of neither-here-nor-there).

Running the not-most-recent version is almost always a bad idea. What high-level problem are you trying to solve by not running the most recent version?

1 Like

Well, the upgrade instructions for v2023.2 (the current recent) demand a very careful and tedious procedure for upgrade since its an infrastructure-intensive process. With couple of my big production projects, I would prefer not to take the risk (only for now) for any upgrade failing for any reason, because of nature of the project. But at the same time, really want to upgrade them from v1.5 to at least v2023.1, so that at least some compatibility remains for future upgrade. I'll see if I could upgrade them to latest some months later.

That sounds like a good approach. Just remember to read all the upgrade notes between your current version and the one you'll be upgrading to.

The only thing that needs to change is that you checkout a version after the clone.

git clone https://github.com/getodk/central
git checkout v2023.1.0
git submodule update -i
...

The rest of the commands should work, but when you need to upgrade in the future, you'll need to remember to git checkout master first and deal with whatever merge conflicts exists.

2 Likes

Hi Yaw,

I am about the upgrade an old version of Central v1.4.2 to v2023.1. Isn't the first command you mentioned going to download a full copy of central? The upgrade notes I see are starting from 'git pull' and not 'git clone https://github.com/getodk/central'. Since the server already has an installed copy, I don't want to override it.

Looking for help before moving ahead...

I would love to get some more opinion about if all other commands would run OK or not (just trying to avoid getting stuck in the middle of neither-here-nor-there).