Updating the node

When a new version of brainflex-node is released, follow these steps to update to the latest version (v0.1.1).

Note

All commands assume that the working directory is the root of the brainflex-node repository. They will need to be modified if that is not the case.

Update the code

First, check whether you created a work branch:

git branch --show-current

If this prints work (or another branch name you created):

git fetch origin tag v0.1.1 --no-tags
git merge --no-edit v0.1.1

If this prints nothing (you skipped the optional git switch -c work step in Initial setup):

git fetch origin tag v0.1.1 --no-tags
git switch --detach v0.1.1

To confirm the update worked, run:

git describe --tags

If you have no commits of your own, this prints v0.1.1. If you merged into a branch that had your own commits, it prints something like v0.1.1-2-gabc1234, which is also fine.

Troubleshooting: uncommitted changes

If you edited files tracked by Git (e.g. docker-compose.yml), the update stops with an error like:

Output
error: Your local changes to the following files would be overwritten by [merge|checkout]:
        docker-compose.yml
Please commit your changes or stash them before you [merge|switch branches].
Aborting

Nothing has been changed yet: your files and your version are as they were. Commit your changes so they are kept, then update again.

If git branch --show-current printed work (or another branch name):

git commit -a -m "My local changes"
git merge --no-edit v0.1.1

If it printed nothing, first create a branch so that your commit is not lost, then update with git merge (not git switch --detach):

git switch -c work
git commit -a -m "My local changes"
git merge --no-edit v0.1.1

Update Python dependencies

With your virtual environment (or conda environment) activated, run:

uv pip install -r requirements.txt  # or: pip install -r requirements.txt

This only installs packages that are new or changed in this version.

Restart the Fed-BioMed node

Only do this if you have already started the node (see Fed-BioMed node: Part 1):

docker compose down
docker compose up -d