Skip to content

Better observability of errors when services fail to come up #4947

Description

@jonathonherbert

In CI, @lindseydew noticed playwright tests failing as a result of boxes not coming up in CI (action run).

The failure mode was opaque — the services failed to pass healthcheck before timeout:

media-api [FAILED: localhost:9001/management/healthcheck did not pass its healthcheck within 120000ms]

Behind the scenes, logs were very clear as to what had gone wrong:

@8el980fe9: Execution exception[[RuntimeException: Required string configuration property missing: capi.preview.url]] in /build/common-lib/src/main/scala/com/gu/mediaservice/lib/config/CommonConfig.scala:277

Me and @lindseydew paired to come up with a better experience, which we think is different per environment:

  • in CI, dump the app logs for the failed service as it times out.
  • locally, provide a command to output logs from the relevant service, e.g. cat ./<app>/application.log

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions