Loading
docs(api): describe remote repository statistics (S17 repository statistics on remote repositories plan: 8/8)
Summary
- Problem: the repository statistics route serves remote repositories now (Steps 5 to 7). But the API text still says a remote repository answers
404, and that every npm answer has dist-tags. - Impact: anyone reading the API reference or the Bruno collection. The monolith team reads them to move the remote sidebar onto this route (gitlab#632276). Nothing changes on the wire.
- Change: the text now matches what the route does:
- A remote repository counts what its cache holds. A virtual one still answers
404. - A remote npm repository answers with the Maven shape, so it has no
dist_tags_count. - A remote npm, Docker or OCI repository reads
downloads_countas0until #292 gives those paths a writer. - The on-call note in
database-query-patterns.mdnames the remote Maven and npm query labels, and says what was measured for each. - On a remote repository,
manifests_countmatches the manifests list. The cache records no referrer link, so the "can exceed the list" note is now hosted-only. NamespaceStatistics.downloads_countsaid only Maven archive GETs book the counter. Hosted npm tarball GETs and hosted Docker and OCI reads book it too. Remote npm, Docker and OCI reads do not.
- A remote repository counts what its cache holds. A virtual one still answers
- Downsides: none in behavior. It is text, plus one test assert message that repeated the "no npm response validates" claim.
Checklist
- Ran it: n/a, nothing runs differently.
redocly lintpasses onv1.yaml, and theinternal/managementapicontract tests pass. - Interfaces and data: descriptions only. No field, schema branch or status changes. S17 already describes this behavior.
- Failure: n/a.
- Rollout: n/a.
- Hot path: no.
- Database: no query change. The on-call note quotes the plans from !3543 (merged) (Maven remote) and !3541 (merged) (npm remote). It cites the merge commits, because the commits they were measured at are not on
main. The measured statements are the merged ones: npm is identical, and Maven differs only in a zero-id error value. - Security: no.
- ADRs: ADR-009 and ADR-021.
scripts/adr-freshness.shreports the mirror two upstream commits behind: ADR-020 and ADR-009 amendments. I read the upstream ADR-009. It says the management APIs serve all three kinds, and puts no kind limit on repository statistics, so this text holds it. ADR-021 is unchanged: the route keeps its permission. - E2E: none. Step 5 already changed
e2e.maven.setup.repository-statistics. - Simplicity: I left the version statistics text alone. That route stays hosted-only, and its text still says so.
Plan and spec amendments
- Step 8 said to add "the three remote query names" to the on-call paragraph. Step 3 already put the container one in that section, so the step now says Maven and npm.
- S05 said in five places that AR's statistics route is hosted-only. The route row now says hosted and remote. The statistics field and the client's
404list no longer give AR as the reason a remote repository is skipped. The sidebar note and the mislabelled-figure follow-up point at gitlab#632276.
Found, not fixed
- The monolith sidebar-counts plan still says AR serves no remote statistics. gitlab#632276 moves the remote sidebar onto this route and owns amending it. Until then the page still reads
artifactsCounton a remote repository, and S05 says so.
Closes #1674 (closed)
Edited by Dzmitry (Dima) Meshcharakou