From 384760d269c09bd2fc8911e80b3337184863d5da Mon Sep 17 00:00:00 2001 From: Rihards Gailums Date: Sat, 23 May 2026 19:46:06 +0000 Subject: [PATCH] fix(admin/updates): match the current ctx.NotFound signature The v0.1.1 build failed because three ctx.NotFound calls in routers/web/admin/updates.go (added in #136) used the older two-arg Gitea signature: ctx.NotFound("UpdateJobView", err) // wrong (2 args) This fork's current signature, in services/context/context_response.go, is single-arg: func (ctx *Context) NotFound(logErr error) The build failed with three identical compile errors: routers/web/admin/updates.go:263:3: too many arguments in call to ctx.NotFound routers/web/admin/updates.go:269:3: too many arguments in call to ctx.NotFound routers/web/admin/updates.go:276:3: too many arguments in call to ctx.NotFound Fix: drop the first string argument from each call site. Behaviour is unchanged (NotFound always logs the underlying error; the "name" tag I was passing was previously used only as a log prefix, which the new signature no longer needs because Gitea logs the caller location). Verified the pattern against the actual usages in the codebase: routers/web/shared/packages/packages.go:217: ctx.NotFound(err) routers/web/shared/actions/runners.go:248: ctx.NotFound(util.NewPermissionDeniedErrorf(...)) routers/web/shared/actions/runners.go:355: ctx.NotFound(errors.New("runner not found")) After this lands, the v0.1.1 tag retry is the same dance as v0.1.0: delete the tag ref, recreate against new main HEAD, the workflow re-fires with the warm buildx cache from this run. Co-authored-by: Claude --- routers/web/admin/updates.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/web/admin/updates.go b/routers/web/admin/updates.go index 79ab67d..83bec35 100644 --- a/routers/web/admin/updates.go +++ b/routers/web/admin/updates.go @@ -260,20 +260,20 @@ func UpdateJobView(ctx *gitea_context.Context) { jobID := ctx.PathParam("jobid") if jobID == "" { - ctx.NotFound("UpdateJobView", errors.New("missing job id")) + ctx.NotFound(errors.New("missing job id")) return } c := newUpdaterClient() if c == nil { - ctx.NotFound("UpdateJobView", errors.New("updater not configured")) + ctx.NotFound(errors.New("updater not configured")) return } var job UpdaterJob if err := c.do(ctx, http.MethodGet, "/update/"+jobID, nil, &job); err != nil { // 404 from updater also lands here; surface as not-found rather than 500. - ctx.NotFound("UpdateJobView", err) + ctx.NotFound(err) return } ctx.Data["Job"] = &job