Repository navigation
feat(server): log pipeline phase durations (RIG-10960) - #178
Merged
rigel-nemo[bot] merged 1 commit intoNov 19, 2026
Merged
rigel-nemo[bot] merged 1 commit into
rigel-nemo[bot] merged 1 commit into
Conversation
Pipeline create can take minutes and end in a write i/o timeout, but the logs do not say which phase is slow. Each phase of create and start now logs one debug line with a phase name, a duration, the repo, and the pipeline number. The phases are store-insert, config-fetch, parse, queue-push, forge-status-publish and forge-status-start. Behaviour and ordering do not change; the timers only wrap the existing calls. A new startPhase helper in server/pipeline/phase_timing.go holds the logging. Its two unit tests pin the log shape and the error path. Co-authored-by: Matt Wilkinson <matt@rigel.build>
Author
Author
|
All-clear at 94df995 |
|
Checks read:
|
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
Logs a debug line with its duration for each phase of pipeline create and start: store insert, config fetch, parse, queue push, and both forge-status updates (
forge-status-publish,forge-status-start). Each line carriesphase,duration,repo,repo_id,number, anderrorwhen the phase failed.Why do we need it
Pipeline create sometimes takes several minutes and ends in a write i/o timeout, so callers with a short client timeout give up. Nothing shows which phase is slow. Reading the code points at the forge status updates, which run up to three times per create with one forge call per workflow, but that has not been measured.
Summary
server/pipeline/phase_timing.go:startPhasereturns adone(err)that logs one debug line.create.goandstart.go. Call order and error handling are unchanged.Verification
go build ./...,go vetandgo test ./server/pipeline/...pass, andgofmtis clean.Risks
None at the default log level. Turning on debug logging adds 6 lines per create.
Spec impact
Spec-impact: none (debug logs only)
Refs RIG-10960
Co-authored-by: Matt Wilkinson matt@rigel.build