The Problem: Currently, the core_startup.sh script in opengin/core-api/docker/ is configured to unconditionally run clean_databases and go test every time the container starts.
Why this is an issue: For developers working on the frontend or integration, we often need to seed the database with specific data (e.g., using ./init.sh restore_from_github). Because the startup script wipes the DB, any restored data is lost immediately if the container restarts or when it is first built. This leads to 500 Internal Server Errors and null-pointer exceptions in the UI.
Steps to Reproduce:
- Restore data using the backup script.
- Run docker compose restart core.
- Observe the logs showing === Cleaning Databases Before Tests ===.
- Database tables (like attr_ tables) are gone.
Suggested Fix: We should wrap the test and cleanup logic in an conditional check using an environment variable, so it only runs in CI pipelines and not by default in local development.
The Problem: Currently, the core_startup.sh script in opengin/core-api/docker/ is configured to unconditionally run clean_databases and go test every time the container starts.
Why this is an issue: For developers working on the frontend or integration, we often need to seed the database with specific data (e.g., using ./init.sh restore_from_github). Because the startup script wipes the DB, any restored data is lost immediately if the container restarts or when it is first built. This leads to 500 Internal Server Errors and null-pointer exceptions in the UI.
Steps to Reproduce:
Suggested Fix: We should wrap the test and cleanup logic in an conditional check using an environment variable, so it only runs in CI pipelines and not by default in local development.