feat(relay): Provide a flag to exit container on healthcheck failure#5754
feat(relay): Provide a flag to exit container on healthcheck failure#5754aminvakil wants to merge 8 commits intogetsentry:masterfrom
Conversation
|
There is a failure on building it, I should add deps to it, will make ready for review afterwards. |
|
It's working correctly as expected This is better I think, it seems relay handles |
|
cc @aldy505 |
874b602 to
88eb943
Compare
jjbayer
left a comment
There was a problem hiding this comment.
I believe terminating the process on bad health checks should be the responsibility of the orchestrator, not the process itself (see https://docs.docker.com/reference/compose-file/services/#healthcheck). This allows you to define a number of retries, etc.
Correct, there are already
Unfortunately it cannot be done on docker-compose. |
06932a5 to
e565250
Compare
This was necessary, to have minimum changes
e565250 to
5c1e8c7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Another attempt of fixing getsentry/sentry#109002 after #5750.
docker-composedoes not restart services if they become unhealthy for any reason whether it'swebcontainer not accessible and returningNXDOMAINor any another reason, this PR adds a kill signal to PID 1 to healthcheck failures which can be enabled usingkill-on-failargument, effectively stopping container, and asrestart_policyisunless-stoppedin self-hosted, it should restart itself.This may rises a problem of getting
relayin a restart loop if it does not get healthy, which is fine IMO.Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.