fj run cancel: fallback web URL uses the internal run id, so the link 404s #200
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happens
fj run cancelcorrectly reports that Forgejo can't cancel a run via an API token and falls back to giving a web URL to do it in the browser. But that fallback URL is built from the internal Actions run id, not the per-repo run number the web UI uses, so the link 404s..../actions/runs/14191returns 404. The working URL for the same run is:Root cause (hypothesis)
A run has two identifiers:
14191here), whichfj api repos/{owner}/{repo}/actions/tasksreturns in theidfield, and1351here), which the web UI and the/actions/runs/<n>route use.The cancel fallback echoes the id it was handed straight into the web URL, but the web route expects the per-repo run number. So the one actionable thing the error offers (a click-through to cancel in the browser) is a dead link, and the user has to go hunt for the real run number.
Suggestions
index/number rather than using the internal id.fj api ... /actions/taskssurfaces the internalid, whilefj run/ the web route key off the per-repo number. Accepting and displaying the per-repo run number everywhere infj run(what the web UI shows) would keep ids copied between commands and URLs from silently breaking.Environment