Re-run workflow runs from fj on private repos #297
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
Make
fj run rerun <n> [--failed | -j <job>]actually re-run a workflow run. Today it stops with "Forgejo has no API route to rerun a workflow run. Open the run in the web UI instead." The web UI route (POST /{owner}/{repo}/actions/runs/{run}/rerun, and/jobs/{job}/rerunfor one job) takes a session cookie and CSRF token, not an API token. A POST with a bearer token tofjord.sh/.../actions/runs/140/rerunreturns 405.Options, in order of preference:
/api/v1rerun endpoint, if the Forgejo version on rasterhub exposes one (check the current version's swagger first).Client::requestandis_trusted_url.Why
The fleet agents on shop-dev-01 babysit CI and have to re-run flaky or infra-failed runs (for example fjord-apple#86, a SwiftPM cache collision on the runner). They have only the fj token, no browser session, so today every re-run goes to a person or turns into an empty commit.
Acceptance
fj run rerun <n> -R owner/repore-runs a run on a private repo;--failedand-jre-run only those jobs.Client::requestand respectsis_trusted_url.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --allpass (in CI).Dependencies
Shares its auth path with rasterstate/fj#103.