Log runner details at the start of each job - #135
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a “runner details” header to the GitLab trace output at the start of each job, aiming to match the upstream gitlab-runner header format (runner version line + “on …, systemd ID …” line).
Changes:
- Emit a runner header at the beginning of job execution (
job.output_runner_header()), including app version info and a shortened runner token. - Update integration/unit tests to tolerate the new header prefix and validate expected header content.
- Add token-shortening logic (with
regex) and adjust the mock runner token to include aglrt-prefix.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| gitlab-runner/src/run.rs | Calls output_runner_header() at the start of each job run. |
| gitlab-runner/src/job.rs | Implements output_runner_header() formatting and output. |
| gitlab-runner/src/client.rs | Adds app version formatting and runner-token shortening logic. |
| gitlab-runner/tests/integration.rs | Updates job log assertions to account for the new header. |
| gitlab-runner/tests/runhandler.rs | Loosens log assertions to allow additional header content. |
| gitlab-runner/Cargo.toml | Adds regex dependency. |
| gitlab-runner-mock/src/lib.rs | Updates mock runner token prefix to match expected shortening logic. |
| Cargo.lock | Locks regex dependency updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
94a9bf1 to
64997a2
Compare
|
Re the LLM review: I accidentally left the On replacing using The error string was introduced in 7f8d2da and appears to be a typo from copy pasting. I've opened a separate MR for that: #136 |
c0b8020 to
da08719
Compare
This prints a header containing runner details to the gitlab log at the start of each job. The format of the header is: ``` Running with demo-runner 0.3.2 (7fd27f7-dirty) on gitlab-runner-rs test runner XPgS3LCJG, systemd ID: s_82de14b38222 ``` I attempted to match the string printed by the original gitlab-runner. Fixes: collabora/lava-gitlab-runner#18
da08719 to
40760ce
Compare
This prints a header containing runner details to the gitlab log at the start of each job.
The format of the header is:
I attempted to match the string printed by the original gitlab-runner:
Fixes: collabora/lava-gitlab-runner#18