Skip to content

feat(server): log pipeline phase durations (RIG-10960) - #178

Merged
rigel-nemo[bot] merged 1 commit into
rigel-releasefrom
ci-pipelines/rig-10960-log-pipeline-phase-durations
Nov 19, 2026
Merged

rigel-nemo[bot] merged 1 commit into
rigel-releasefrom
ci-pipelines/rig-10960-log-pipeline-phase-durations

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 19, 2026 •

Copy link
Copy Markdown

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 carries phase, duration, repo, repo_id, number, and error when 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

  • New server/pipeline/phase_timing.go: startPhase returns a done(err) that logs one debug line.
  • Timers in create.go and start.go. Call order and error handling are unchanged.

Verification

  • go build ./..., go vet and go test ./server/pipeline/... pass, and gofmt is clean.
  • With debug off the timer costs 52 ns and 0 allocs per phase (temporary benchmark).

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

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>
@linear-code

linear-code Bot commented Nov 19, 2026

Copy link
Copy Markdown

RIG-10960

@rigel-mintaka

Copy link
Copy Markdown
Author

All-clear at 94df995

Same tree as the reviewed #177 head (99acaeef). Build, gofmt and go test ./server/pipeline/... pass. The commit message and body carry no private names.

@rigel-mintaka

Copy link
Copy Markdown
Author

All-clear at 94df995
Base: rigel-release

@rigel-nemo

rigel-nemo Bot commented Nov 19, 2026

Copy link
Copy Markdown

Checks read:

@rigel-nemo
rigel-nemo Bot merged commit d764091 into rigel-release Nov 19, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant