-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Summary
Some operations executed by birdhouse-deploy.sh can fail silently.
This issue is opened as a general discussion about how to handle this kind of situation as a whole (what is our philosophy about managing these cases?), but providing a specific use case that was encountered.
Do we consider these to be edge cases that we don't manage? Do we reinforce strict error handling? Or, do we have some middle ground best-practice to put forward in the docs?
Details
For example, if any of the following commands fail, for example, because "${THIS_DIR}/static" already exists, but with inadequate user/group permissions causing the files to not be created, the birdhouse-deploy.sh execution will happily resume it operations without any apparent failure.
birdhouse-deploy/birdhouse/components/proxy/pre-docker-compose-up
Lines 9 to 13 in 293645a
| mkdir -p "${THIS_DIR}/static" | |
| echo "${BIRDHOUSE_VERSION_JSON}" > "${THIS_DIR}/static/version.json" | |
| echo "${BIRDHOUSE_DEPLOY_SERVICES_JSON}" > "${THIS_DIR}/static/services.json" | |
| echo "${BIRDHOUSE_DEPLOY_COMPONENTS_JSON}" > "${THIS_DIR}/static/components.json" |
At the very least, permissions errors such as in this case would be relevant to be displayed on stderr.
In this specific case, this leads to a seemingly "functional" platform that boots and where services respond without problem, but the informative /version, /services and /components endpoints cause 404 errors.
To Reproduce
Steps to reproduce the behavior:
- Create a
birdhouse/components/proxy/staticdirectory with some limited access (eg: root or specific user read-only) - Run the stack with
birdhouse-deployto achieve a "running" state, and notice that no errors are reported. - Access any of the
/version,/servicesor/componentsendpoint.
Environment
all