Skip to content

🐛 [BUG]: Silently failing birdhouse-deploy operations #512

@fmigneault

Description

@fmigneault

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.

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:

  1. Create a birdhouse/components/proxy/static directory with some limited access (eg: root or specific user read-only)
  2. Run the stack with birdhouse-deploy to achieve a "running" state, and notice that no errors are reported.
  3. Access any of the /version, /services or /components endpoint.

Environment

all

Concerned Organizations

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions