-
TestGomusConnection.test_version
failedSee Update gomus version. Before fixing this test, make sure that
test_valid_session_id
passes or fix that first. -
test_valid_session_id
failed
Nearly all project dependencies are specified by using a fixed version. This protects our solution against breaking changes from any package updates. However, updating packages, in general, is a good idea, because relying on old packages a) impedes further development as new features in libraries cannot be used, b) can break the connection to external access points whose interface has changed, and c) may leave recently discovered security leaks unfixed. Thus, updates should be carried out on a regular schedule.
-
Check out a new branch.
-
Connect to the docker (
make connect
), and runmake upgrade-requirements
. -
Revise the changes in
requirements.txt
andpackage*.json
. -
If
pip check
fails, you need to manually add the required dependencies todocker/requirements.txt
. This is necessary because of pypa/pip#988.Remark: You may need to "touch" the Dockerfile manually by editing its first line to make sure that the previous docker cache is not reused, which would lead to the changes in
requirements.txt
are not checked at all! -
Create a merge request with your changes and make sure the CI passes.
-
Once it passes, merge the branch.
-
Check your current version:
docker -v
-
Visit https://docs.docker.com/engine/release-notes/ to learn about open CVEs.
-
Identify upgradable packages:
apt list --installed | grep docker
-
Upgrade relevant packages:
apt upgrade <package name>
Each used docker image is specified either in docker/docker-compose.yml
or in the linked Dockerfile.
For more information about the docker containers, please refer to the documentation.
- First of all, search for breaking changes of an update, e.g., here for Postgresql. You can find all existing CVEs for Postgresql here.
- To update a docker image, edit the
image
key in the yaml file respectively theFROM
command in the Dockerfile. Be careful to watch for any breaking changes in the updates. - Restart the container by running
make shutdown-<docker> startup-<docker>
. - Re-run the CI to preclude any regressions.
Hypothesis (not confirmed): For some major version upgrades, just rebuilding the container won't work because the database format might have changed.
In this case, use make db-dump
and make db-restore
before and after rebuilding the container.
As always, convince yourself afterward that the database is still intact and contains all data.
From time to time, Giant Monkey uses to publish a new version of go~mus.
As we are scraping certain contents from the gomus web interface, each of these changes can possibly break our gomus tasks.
The TestGomusVersion
assertions will report any version change.
- Check out the gomus changelog (barberini.gomus.de > Helpdesk > Changelog) and search for possible breaking changes (for example, the layout of the customer data could have changed).
- Make sure all other gomus tests pass.
- If there are any breaking changes, the gomus tasks need to be updated.
- Run
make patch-gomus-version
inside of the container.
- In the past, we have experienced a few changes in the gomus HTML format without the version number being incremented.
In this case, the
TestGomusConnection.test_version
scraper needs to be updated. See !169.
For accessing gomus, we use a session ID that was obtained from a manual browser session. While this session ID used to be valid for multiple months in past, it will expire at some time and need to be renewed.
Steps to be done are described in the example of Chromium and related browsers. If you need to do this in Firefox/Safari/Netscape Navigator, you will need to improvise.
- Open the gomus website.
- (If logged in, log off first (to make sure you use the freshest possible session ID).)
- Log in.
- Open the developer console by pressing F12.
- Switch to tab Application.
- In the left bar, from the Storage section, choose Cookies >
https://your-museum.gomus.de
. - From the cookies list, find
_session_id
and copy its value into the clipboard. - Log in to the VM and open the
keys.env
file from the secrets folder. - Patch
GOMUS_SESS_ID
with the copied value.