Page MenuHomePhorge

health/status endpoint
Needs ReviewPublic

Authored by mollekopf on Mar 27 2023, 11:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 10:00 PM
Unknown Object (File)
Thu, Mar 14, 9:45 PM
Unknown Object (File)
Feb 12 2024, 11:31 AM
Unknown Object (File)
Jan 26 2024, 5:09 AM
Unknown Object (File)
Jan 16 2024, 3:04 AM
Unknown Object (File)
Jan 16 2024, 2:20 AM
Unknown Object (File)
Jan 13 2024, 2:35 PM
Unknown Object (File)
Jan 2 2024, 5:56 AM
Subscribers

Diff Detail

Repository
rK kolab
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsrc/app/Console/Commands/Status/Health.php:25PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Unit
No Test Coverage
Build Status
Buildable 42320
Build 17093: arc lint + arc unit

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Mar 27 2023, 11:34 AM
machniak added inline comments.
src/app/Http/Controllers/API/V4/HealthController.php
23

I would be careful here. The output may contain errors/exceptions. While services routes might be secure, I think it would be nice to have some clean and structured response, i.e. JSON?

33

200 is the default, we're not using this argument in most of other places.

Only check the required dependencies for now

It's faster this way

src/app/Http/Controllers/API/V4/HealthController.php
23

It's a bit of a workaround of course to simply return the command output, but the idea is to return information to what is failing exactly, and potentially why if we can.
Ideally we'd run individual checks with individual error messages combined in a nice json return value, but that will require some refactoring.

We could decide to only return what is failing and leave the why to logging (so only ok/errpr per check), but I feel like we're making our job unnecessarily difficult if we have to go dig through logs.