feat(doctor): sweep the linked sites, fold check into site:doctor - #1485
Open
prabowosd wants to merge 2 commits into
Open
feat(doctor): sweep the linked sites, fold check into site:doctor#1485prabowosd wants to merge 2 commits into
prabowosd wants to merge 2 commits into
Conversation
lerd doctor ends with a [Sites] section: every linked site runs the cheap half of the site doctor and gets one line, the counts plus the first thing wrong, naming lerd site:doctor <domain> for the detail. The framework command checks, composer audit, npm audit and the response-time lookup stay on the per-site command, and one engine's database list is reused across the sweep instead of costing a container exec per site. Validating .lerd.yaml moves into the site doctor as its own check, so every surface runs it and lerd check becomes a deprecated alias. A worker declared in the project's own custom_workers now counts as defined on a plain site too, not only on a custom-container one.
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.
There are three health commands and none of them knows about the others, so anyone who wants to know whether something is wrong has to run all three, and the one people reach for first never looks at their sites.
lerd doctornow ends with a[Sites]section: every linked site runs through the site-level checks and gets one line, the counts plus the first thing that is wrong, with the command to run for the detail. A machine where podman, DNS and the ports are all fine while three sites are failing no longer reports itself healthy.The sweep has to stay quick, so it runs the cheap half of the site doctor and leaves the framework command checks,
composer audit,npm auditand the response-time lookup tosite:doctoron a named site. The one expensive check it keeps is whether the site's database exists, because that is what catches a site 500ing on every request, and it is no longer expensive: one engine's database list is reused for a few seconds rather than costing a container exec per site. On a fourteen site machine the sweep adds about two seconds to a doctor run.lerd checkwas the third entry point and everything it validated is about the project rather than the environment, so.lerd.yamlvalidation moves into the site doctor as its own check. Every surface that runs the doctor validates it now, the dashboard and the MCP tool included, andcheckstays as a deprecated alias forsite:doctorin the current directory. Folding it in also fixed a worker it was wrong about: one declared in the project's owncustom_workerswas only recognised on a custom-container site, so a plain site running one was told it had no definition to match.The reclaim offer the issue asks for is already there, doctor lists it as an optional fix and
--fixrunslerd cleanupafter confirming.Closes #1358