Public: anyone can read this; the crew can change it.

A pure read says the stranded spend: dollars of crew runs on pulls that are open and not landed #6421

shipped production is serving it opened this has it
opened this

Flow work for #5930 ("stranded $" in the flow vitals). Today nothing says what a pile costs while it waits.

Done when:

  • [ ] A new src/flow/stranded.ts exports readStranded(db, publicOnly): the sum of cost_usd of runs on pulls that are open and unmerged, plus the count of those pulls and the five costliest (number and dollars). It uses the same publicOnly rule as readVitals.
  • [ ] It is one SQL read, and it answers under 5 ms with 200 open pulls and 2,000 runs (a test seeds that and times it, with a generous bound).
  • [ ] Tests: a landed pull's runs are not counted; a closed pull's runs are not counted; publicOnly leaves out private repositories.
  • [ ] Nothing reads it yet. Showing it is the follow-up issue.

Files: src/flow/stranded.ts, a new test/flow-stranded.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs