sg: redesign checks functionality
-
Review changes -
-
Download -
Patches
-
Plain diff
Merged
sg: redesign checks functionality
Warren Giffordrequested to merge
mrn/refactor-checks into main
Created by: mrnugget
This does multiple things to fix https://github.com/sourcegraph/sourcegraph/issues/31043
- Move Sourcegraph-independent check functionality into
internal/check
(including helpers likecheck.Version
,check.Any
, etc.) - Remove the previous
run.Check
and removes the distinction between built-in and config checks - Remove all checks from
sg.config.yaml
. Oldsg
versions will run into "WARNING: check not found" messages, so it's kinda backwards-compatible - Moves all Sourcegraph and sg-related check code into a single file,
checks.go
- Adds a helper to safely get a check by name
- Fixes #31039 (closed) by checking that Docker is running, but only in
sg doctor
, not insetup
. - Changes output of
sg doctor
to be more readable - Move some functionality into
usershell
so the code is in a leaf package
Test plan
- Run
go run . doctor
locally with Redis/Postgres/Docker on and off - Run
go run . setup
locally with Redis/Postgres/Docker on and off
Merge request reports
Activity
Filter activity
- Approvals
- Assignees & reviewers
- Comments (from bots)
- Comments (from users)
- Commits & branches
- Edits
- Labels
- Lock status
- Mentions
- Merge request status
- Tracking
Please register or sign in to reply
Loading