fix(admin/updates): match the current ctx.NotFound signature#137
Merged
Conversation
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 <noreply@anthropic.com>
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.
fix(admin/updates): match the current
ctx.NotFoundsignatureThe v0.1.1 build failed at step #9 (
Build & push Docker image) with three identical compile errors inrouters/web/admin/updates.go(the Slice 4 handler added in #136):Root cause
I matched the older two-argument Gitea pattern (
NotFound(logMsg string, logErr error)) from memory. This fork's current signature inservices/context/context_response.gois single-arg:Fix
Drop the first string argument from all three call sites:
Behaviour is unchanged — NotFound still logs the underlying error.
Pattern verified against the existing codebase
How this was diagnosed without log access
The Azure blob storage that hosts GHA job logs isn't in my sandbox's outbound allowlist, so I couldn't read logs directly. Pivoted to the check-runs annotations API:
That returned the three compile errors with file/line specifics, which is more than enough to fix. Adding this to my mental toolbox for future debugging — annotations are often the cleanest signal even when logs aren't reachable.
After merge
Same dance as v0.1.0 had: delete
v0.1.1ref, recreate against new main HEAD, workflow re-fires. Wall clock should be even faster than v0.1.0 because the v0.1.1 failed run still warmed the buildx cache for the build step — the failed step was the build itself, but the partial buildx layers up to the compile point are cached. Expected ~2-4 min for the retry.Diff