K2GO-443 feat(forgejo): repo refresh on the durable job engine - #630
Merged
Merged
Conversation
…node 1.3.13) Forgejo is the third content updater. It is a git operation (fetch + fast-forward/merge + authenticated push per seeded example repo), not a file download, so it goes on the job engine WITHOUT aria2 and without pause/resume: repo-count is the progress and a retry re-runs the idempotent refresh. The runner (sockets/forgejo.exec.ts) wraps the existing refresh_forgejo orchestration and reports per-repo progress (repo N of M + current repo) from a new K2GO_PROGRESS marker the orchestration emits. The seed (install) path is untouched; the legacy POST /forgejo/refresh wrapper stays for now.
…te progress) ForgejoRepoRefresh drives the forgejo job type through the shared RestContentClient: a determinate bar (repo N of M) with the current repo name (the job detail) and Cancel, replacing the indeterminate bar + status-file poll. No pause/resume (git). ForgejoSeedClient keeps the seed (drive); its now-unused refresh helpers retire with the legacy route later.
…ed / up to date) The job phase alone cannot say a repo conflicted (refresh_forgejo returns 0 even then). The runner now tallies the per-repo outcomes (same classes as the legacy status route) and carries them in the final detail (K2GO_SUMMARY changed problems total); ForgejoRepoRefresh parses it in onDone and keeps the 'some could not be updated' / 'already up to date' messages instead of a flat 'updated'.
…t/K2GO-443-forgejo-job-engine
…tus line The refresh showed only the current repo and a bar with no number, so an all-up-to-date refresh (git has nothing to fetch, so it is near-instant) read as no progress. The status line now shows "<pct>% <repo>" (percent from onProgress, repo from onLog, both via render()). The percent is coarse by nature (repo count: 0/33/66 for 3 repos), but it is the visible progress the user expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forgejo is the third content updater. "Update repos" moves from the fire-and-forget wrapper to the
durable job engine. Forgejo is a git operation (per seeded example repo: fetch to a side ref, classify by
ancestry, fast-forward or clean 3-way merge, authenticated push), not a file download, so it runs on the
engine WITHOUT aria2 and without pause/resume: repo-count is the progress and a retry re-runs the
idempotent refresh. The seed (install) path is untouched.
dash-node 1.3.13: forgejo is a job type (POST /forgejo/download, GET /forgejo/jobs/:id with
{phase, percent, detail}, retry/cancel over the generic /:type/* surface). The runner
(sockets/forgejo.exec.ts) wraps the existing refresh_forgejo orchestration and reports per-repo progress
(repo N of M + the current repo) from a new K2GO_PROGRESS marker the orchestration emits, and carries the
per-repo outcome tally (changed/problems/total) in the final detail so the app keeps the
"some could not be updated" / "already up to date" messages.
App: ForgejoRepoRefresh drives the forgejo job through the shared RestContentClient (determinate bar,
current repo, Cancel), replacing the indeterminate bar + status-file poll. ForgejoSeedClient keeps the
seed; its now-unused refresh helpers retire with the legacy route later. The older POST /forgejo/refresh
(wrapper) stays for now.
Verified on device (OnePlus, fresh Full): forgejo seeds (admin + 3 repos) and a refresh runs end to end
on the job engine (per-repo progress, "updated" / "already up to date").