Repository navigation
Release: consistent health checks - #125
Merged
Merged
Conversation
Adds the standard health check set agreed for all Laravel Cloud apps: CacheCheck, OptimizedAppCheck, PendingMigrationsCheck, ProductionConfigCheck (production only), SchedulePolicyCheck and StorageRoundTripCheck. SecurityAdvisoriesCheck loses ->lastDayOfMonth(): spatie only runs a check when its cron is due in the minute of the request, and Oh Dear asks once an hour, so the check was skipped on practically every run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds PostmarkTokenCheck, registered only when the mailer is postmark: it asks Postmark for the server behind the configured token and fails when the token is missing or rejected, before mails pile up in failed jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every codebar Laravel app now registers the same checks in the same
order. Checks that do not apply report ok instead of being left out:
- DatabaseCheck, DatabaseConnectionCountCheck (warn > 50, fail > 80),
JobsCheck, FailedJobsCheck and PendingMigrationsCheck report
"no database" when config('health.uses_database') is false.
- PostmarkTokenCheck reports ok when the mailer is not postmark.
- EntraClientSecretCheck finds its credentials in microsoft-entra-sso or
services.microsoft and reports ok when no SSO is configured.
- StorageRoundTripCheck warns instead of failing while the default disk is
local (a bucket will be added to every app).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The standard health checks get one test file per class (DatabaseCheck, DatabaseConnectionCountCheck, DatabaseAvailability) and tests for every branch, so the 100 % coverage gate holds. PendingMigrationsCheck is now tested against a mocked migrator; DatabaseConnectionCountCheck is no longer final so its thresholds can be tested without a real connection count. EntraClientSecretCheck drops the unused configKey() override. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release of the consistent health check set.
P1: consistent health checks
CacheCheck,OptimizedAppCheck,PendingMigrationsCheck,ProductionConfigCheck(production only),SchedulePolicyCheckandStorageRoundTripCheck, with unit tests.SecurityAdvisoriesCheckno longer uses->lastDayOfMonth(): spatie only runs a check when its cron is due in the minute of the request, and Oh Dear asks hourly, so it was skipped on practically every run.P2: Postmark token
PostmarkTokenCheck, registered only whenmail.defaultispostmark.Note:
StorageRoundTripCheckfails if the production default disk islocal; checkFILESYSTEM_DISKon Cloud before merging.🤖 Generated with Claude Code