balena-io-modules / device-diagnostics

on-device diagnostics tool
9 stars 8 forks source link

Should show a default success message if a device's service's container passes health checks #297

Closed myarmolinsky closed 2 years ago

myarmolinsky commented 2 years ago

Expected Behavior

If a user surfaces healthchecks for a service's container and they pass but the user has not provided a success message, we show a default success message like "SERVICE_NAME is healthy". Perhaps the same should be done with errors (if necessary) i.e. "SERVICE_NAME failed healthchecks"

Actual Behavior

If a user surfaces healthchecks for a service's container and they pass but the user has not provided a success message, we see 'exit code: 0, output: ' which is not meaningful

Steps to Reproduce the Problem

  1. Add device healthchecks for a specific service on a device without providing a success message
  2. See that when running device health checks, successfully passing checks for this particular service will show you that it is healthy but the message will be 'exit code: 0, output: ' instead of anything meaningful
klutchell commented 2 years ago

I just noticed there are already some TODOs in that function! https://github.com/balena-io-modules/device-diagnostics/blob/6eb9b6dd5f43032856a7aba166aaa62c79dba1b8/scripts/checks.sh#L569-L590

klutchell commented 2 years ago

@myarmolinsky do you still have the screenshot you took of the current behaviour that you could attach here?