Testing changes ¶
Each time we update the underlying version of Python or the base OS the steps below are a good way to verify compatibility.
- Make sure the change is compatible with the python dependencies of dependent projects
- In your
docker-python-webrepository, rebuild the local image:
docker compose build app --no-cache
Test Benefits with the updated local base image ¶
In your benefits repository:
- In the benefits Dockerfile:
ghcr.io/cal-itp/docker-python-web:main
# becomes
docker-python-web:app
- Rebuild Benefits image
docker compose build client --no-cache
- Open Benefits devcontainer with “Rebuild Without Cache and Reopen in Container”
- Run app locally and go through a few full flows
- Verify that unit tests pass
Test eligibility-server with the updated local base image ¶
In your eligibility-server repository
- In the eligibility-server Dockerfile:
ghcr.io/cal-itp/docker-python-web:main
# becomes
docker-python-web:app
- Rebuild eligibility-server image
docker compose build server --no-cache
- Open eligibility-server devcontainer with “Rebuild Without Cache and Reopen in Container”
- Verify that unit tests pass
And confirm the update works in benefits:
- Use the local
eligibility_server:latestimage as the Benefits compose.ymlserverservice - Rebuild the benefits container
- Run app locally and test the Courtesy Card flow
Follow-up ¶
After a Python upgrade is complete, we follow-up in dependent projects above by updating:
.github/workflows/.python-versiontool.black.target-versioninpyproject.toml
We also update related projects that use an official image for the sake of parity.