-
Notifications
You must be signed in to change notification settings - Fork 25
ENG-1252: Add moose doctor cli command
#3001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Created using jj-spr 1.3.6-beta.1
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| // Show summary | ||
| let error_count = output.summary.by_severity.get("Error").unwrap_or(&0); | ||
| let warning_count = output.summary.by_severity.get("Warning").unwrap_or(&0); | ||
| let info_count = output.summary.by_severity.get("Info").unwrap_or(&0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Severity summary keys use wrong case format
The format_human_readable_output function queries by_severity HashMap using capitalized keys ("Error", "Warning", "Info"), but DiagnosticOutput::new stores them as lowercase ("error", "warning", "info"). This causes get() to always return None, and the summary always displays 0 issues regardless of actual findings.
| details: format!("Failed to setup redis client: {:?}", e), | ||
| }) | ||
| })? | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Redis URL parameter ignored regardless of input
The redis_url parameter is accepted via CLI but never actually used. Both the if and else branches call setup_redis_client(project.clone()), ignoring the provided redis_url. Users passing the --redis-url flag will have it silently discarded and the project's Redis config used instead, which violates the principle of least surprise.
onelesd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add the command to the framework-docs and framework-docs-v2
Note
Introduces a
moose doctorCLI to run infrastructure diagnostics with severity/time/component filtering, JSON/human output, verbosity, and telemetry, plus E2E coverage.Commands::Doctorwith--severity,--component(glob),--since,--json,-v/-vv/-vvv,--clickhouse-url,--redis-url.top_command_handlerto execute diagnostics and capture usage.apps/framework-cli/src/cli/routines/doctor.rs):humantime) and optional glob pattern viaglob.InfrastructureMapfrom Redis; filter components; buildDiagnosticRequestand run ClickHouse diagnostics.ActivityType::DoctorCommandand capture usage for the new command.apps/framework-cli-e2e/test/cli-doctor.test.ts):--since, combined options, and invalid inputs.globcrate to CLI.Written by Cursor Bugbot for commit 4bb5979. This will update automatically on new commits. Configure here.