medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
439 stars 211 forks source link

Ensure all docker entrypoint scripts fail loudly when any step returns error code #8553

Open garethbowen opened 1 year ago

garethbowen commented 1 year ago

What feature do you want to improve?

To ensure bugs are caught early our docker entrypoint scripts should blow up on unexpected errors. This caught us recently with a jq call which didn't compile but the error was handled and it was always treated as false: https://github.com/medic/cht-core/pull/8544

Describe the improvement you'd like To catch these errors early the entrypoint should fail which will break our CI and catch it before merging.

Describe alternatives you've considered

Rely on manually checking the log files but automation is better. Have test cases which test that each branch is tested which we should have anyway but this is a good catch all.

Additional context

fardarter commented 1 year ago

Related: https://github.com/medic/cht-core/pull/8552