Drift between migrations container and source manifests
almereyda opened this issue · 1 comments
Describe the bug
The api-server
migrations declared in
and executed in
api-server/Dockerfile.migrations
Line 20 in 19c70b9
are manually prepared for their execution environment
api-server/Dockerfile.migrations
Lines 13 to 15 in 19c70b9
and would not pick up newer migrations, which are not explicitly cared for in Dockerfile.migrations
. This is in contrast to the initialisation container of the local development environment, which improves on this with dynamically replacing environmental variables within https://github.com/CirclesUBI/land-local/blob/3cb9f3085b63d584eb63667723bdc35821c31fab/modules/api-db-init/seed.sh#L18
ls src/api-db-migrations/*.sql | xargs -I% sh -c 'psql ${CONNECTION_STRING_ROOT} << envsubst < %'
Additionally, a recent changes in the code have led to some drift between the migrations
container and its source SQL declarations, which results in all 0.1.504-fix1
rules not to be applied anymore.
To Reproduce
Steps to reproduce the behavior:
- Set up a clean deployment environment for
api-server
. Take example in theworkload-*-api-server
manifests. - Let the cluster reconciliate the database migrations into the database.
- Find all statements from
0.1.504-fix1
missing in the logs of the initialisation container.
api-server-migrations.txt
Expected behavior
All migrations are loaded when initialising a database from them.
Additional context
We can consider this Dockerfile here as a base layer for the fixture installation in land-local
.
Resolved.