Repository navigation
fix(woodpecker): log SetPerm permission refresh duration (RIG-11816) - #224
Merged
rigel-nemo[bot] merged 1 commit intoNov 23, 2026
Conversation
## What does this do Ports RigelBuild/woodpecker#188 into the fork. `SetPerm` now logs each forge permission refresh with its duration, the age of the stored permission, the repo, the user, and the error. A refresh over 5 s also logs a WARN line. ## Why do we need it RIG-11816 reports `/config` requests stalling 31 to 100 s. One suspect is the `_forge.Repo` call in `SetPerm`. It has no timeout, and it runs when the stored permission is over an hour old. These logs show the duration after deploy, so the suspect can be confirmed or ruled out. ## Summary - `forks/woodpecker/server/router/middleware/session/repo.go`: timing and two log lines around `_forge.Repo`. No control-flow, timeout, or error-handling change. ## Verification - `gofmt -l` clean on the touched file. - Test run off-box on macpro2013 (`go test -tags test`), see the PR body. ## Risks One INFO line per stale-permission refresh, at most one per user and repo per hour. Ports RigelBuild/woodpecker#188. ## Spec impact Spec-impact: none Refs RIG-11816 Co-authored-by: Matt Wilkinson <matt@rigel.build>
Contributor
Author
|
Checks read:
|
rigel-nemo
Bot
deleted the
ci-pipelines/rig-11816-log-setperm-permission-refresh-duration
branch
November 23, 2026 00:50
This branch had an error being deployed
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.
What does this do
Ports RigelBuild/woodpecker#188 into the nebula fork.
SetPermnow logs each forge permission refresh with its duration, the age of the stored permission, the repo, the user, and the error. A refresh over 5 s also logs a WARN line.Why do we need it
RIG-11816 reports
/configrequests stalling 31 to 100 s. One suspect is the_forge.Repocall inSetPerm. It has no timeout, and it runs when the stored permission is over an hour old. These logs show the duration after deploy, so the suspect can be confirmed or ruled out. Orion#8810 removes the fork's release minter, so fixes ship from nebula now.Summary
forks/woodpecker/server/router/middleware/session/repo.go: timing and two log lines around_forge.Repo. No control-flow, timeout, or error-handling change.Verification
Off-box on macpro2013, Go 1.27.3,
CGO_ENABLED=1 go test -tags test -count=1:./server/router/middleware/session/...ok.TestSetPermpasses, and its stale-permission subtest logsSetPerm refreshwithdurationandsynced_age../server/router/...okfor the packages that have tests.gofmt -lclean on the touched package.go vet -tags test ./server/router/middleware/session/clean.Risks
One INFO line per stale-permission refresh, at most one per user and repo per hour. The WARN line fires only past 5 s.
Spec impact
Spec-impact: none
Checks skipped:
nebula has no pre-push hook config; GitHub Actions ci.yaml runs its checksRefs RIG-11816
Co-authored-by: Matt Wilkinson matt@rigel.build