Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
priority/p2-mediumPriority P2: standard workscope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Description
Problem
devops gh metrics and the Project Metrics dashboard (#926, merged into release/v0.2.25 as 62d9954) undercount, and they show a failed read as zero. Both problems are in src/devops_cli/github/metrics.py:
- Only the first page is read.
get_label_taxonomy_metricsreadsrepos/{repo}/issues?state=open&per_page=100without--paginate. On 2026-10-02 this repository has 199 open issues, so the counts cover at most the first 100. That endpoint also returns pull requests, which are counted as issues.get_milestone_metrics(milestones?state=all&per_page=100) andget_ci_workflow_metrics(actions/runs?per_page=…) also read one page. The milestones read is complete today (46 milestones) but will cut off silently past 100. - A failed read looks empty. Each reader catches
Exception, logs a warning and returns[]. The dashboard and the command then report zero releases, milestones or labels instead of failing. refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768 removed this pattern from the release reads. - Releases are read outside the roadmap store.
get_milestone_metricsreads milestones with its owngh apicall, though refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768 madeRoadmapStore.releases()the one way to read Releases.
Acceptance criteria
- Every REST listing in
metrics.pyreads all pages:api --paginatedirectly before the endpoint, withper_page=100, throughrun_gh. The issue listing drops entries that carrypull_request. - Milestone metrics come from
get_roadmap_store(repo).releases(). - A failed or malformed read raises
GitHubOperationError.devops gh metricsexits 1 and names the failed read, and the telemetry emitter records nothing for that run instead of zeros. - Offline tests with a stub runner:
- a two-page issue listing is counted in full, with its pull requests left out;
- a failed read for each reader exits 1;
- the milestone metrics read the in-memory roadmap store.
Key questions
- Should a partial report still be printed when one reader fails? No (proposed). The command fails as a whole, matching refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768's fail-closed reads. A partial dashboard that shows zero is the defect.
- Keep
GhCliClient.api? Yes for non-listing calls (proposed). The listings move torun_ghwith--paginate, the formrun_ghpages correctly.
Metadata
Metadata
Assignees
Labels
priority/p2-mediumPriority P2: standard workscope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 3, 2026
Merged into #974: both edit the same three metrics readers and emitter, and #974's gauges would show a failed read's zero for an hour. #974 now carries the paginated, fail-closed reads and the store-backed milestones.