feat(pgpm): pgpm doctor — OS-aware dependency checks; robust docker daemon detection#1463
Merged
Conversation
…t docker daemon detection
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Turns the quickstart prerequisites page into an executable check and makes
pgpm dockerfail with actionable, OS-specific guidance. No install-time automation —doctoronly runs when invoked.pgpm doctor [--db] [--json](pgpm/cli/src/commands/doctor.ts): checksnode(fail <18, warn <20),docker(binary on PATH ANDdocker infodaemon reachability — distinguishes "not installed" from "installed but daemon down"),docker compose(plugin or standalone, warn-only),psql(fail if missing, warn <17), and with--dba liveSELECT 1viapsqlusinggetPgEnvOptions()/getSpawnEnvWithPg(). Exit 1 on any failure;--jsonemits{ platform, checks, summary }for CI.pgpm/cli/src/utils/doctor.ts:detectPlatform()→macos | linux(+distro from /etc/os-release) | wsl(/proc/version) | windowsdockerInstallGuidance / dockerDaemonGuidance / psqlInstallGuidancereturn per-OS remediation (brew vs apt-get vs dnf vs winget; "open Docker Desktop" vssystemctl start docker+ docker-group hint)CommandRunnerfor testingpgpm dockerhardened:checkDockerAvailable()(binary-only) replaced withensureDockerReady()— start/stop now report daemon-down vs not-installed with the same OS-aware guidance;docker lsrequires the daemon, not just the binary.pgpm/cli/__tests__/doctor.test.ts) with mocked runners covering platform detection, each check's pass/warn/fail paths, and per-OS guidance.Plan: https://github.com/constructive-io/constructive-planning/issues/1258 (PR 1 of the rollout; init-time checks and docs deferred).
Link to Devin session: https://app.devin.ai/sessions/3810d68dc3384dc5b4430a63da7af981
Requested by: @pyramation