Find a workflow run past the first page of the run list #290
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/run-lookup-past-first-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every run command turns a run number into the internal id by reading the run list, and that read stopped after 50 runs. Forgejo sends no
Linkheader onactions/runs, onlytotal_count, so the pagination that followed the header never left page one. In a busy repository any run older than the newest 50 came back as "workflow run #N was not found". That is the unexplained half of #248:rasterstate/paragonhas over 10,000 runs, andfj run view 5400 --log-failedcould not see past the last few hours.The lookup now asks the server for the run number (
run_number=N), which is one request however old the run is. A server that ignores the filter answers with its newest page, and in that case fj walks the list as before. The walk itself followstotal_countwhen there is noLinkheader, sofj run list --paginatereturns more than one page as well. A page that adds no new run ends the walk whatever the total says, so an overstated count cannot spin it.Checked against paragon with a build of this branch: runs 10453, 10095 and 5400 all return their failed logs, and all three were "not found" on v0.6.0. Run 5399, the other example in the issue, is a green run by run number (the id in the issue came from a different namespace), so the empty result was right. It now reads "Run #5399 has no failed jobs" instead of "No matching jobs in this run".
One cost to know about: a server that ignores the filter has its first page fetched twice, once by the probe and once by the walk.
The lockfile commit is the same quinn-proto bump as #288, carried here so the audit gate passes on its own.
Closes #248