Repository navigation
feat: report the macro runner configuration in the upload metadata - #631
Conversation
Merging this PR will not alter performance2 warnings
Comparing Footnotes
|
[Low impact] The PR appears safe to merge. SummaryAdds the Macro Runner configuration to upload metadata.
No actionable issues were found. Reviews (1) · Last reviewed commit: "feat: report the macro runner configurat..." · Reviewed by Greptile |
e48cc6e to
7b3c6ba
Compare
adriencaccia
left a comment
There was a problem hiding this comment.
🤖 Risk 3/5, human review needed on the risky files
Risk 3/5: Changes the upload metadata the API hashes; additive and omitted off macro runners. Risky files: provider.rs, interfaces.rs.
CodSpeed Macro Runners write a JSON object describing their configuration to /etc/codspeed/macro-runner-config.json (agent version, image build ids, runtime isolation). The CLI reads that file and forwards the object as is under runner.macroRunnerConfig. Changes to a runner's configuration can shift benchmark results, so CodSpeed needs it to tell them apart from code changes. The object is not interpreted here, so the runner can add fields without a new CLI release. A missing file means the job is not on a macro runner, and a file that cannot be read or is not a JSON object is ignored with a warning rather than failing the upload. The field is omitted when absent, so other uploads and their metadata hash are unchanged; the hash test now sets it, and the upload endpoint computes the same hash for that payload. Refs COD-3931 Co-Authored-By: Claude <noreply@anthropic.com>
7b3c6ba to
80072e4
Compare
|
Taking this over. A missing file still stays silent, and any other read error now logs a warning; folded into the commit. |
Report the CodSpeed Macro Runner configuration in the upload metadata.
A macro runner writes a JSON object describing its configuration to
/etc/codspeed/macro-runner-config.json, for example:{ "macroAgentVersion": "0.4.0", "hostImageName": "packer-ubuntu24-x86-post-20261120093416", "guestImageName": "packer-ubuntu24-x86-post-20261120093416", "runtimeConfig": { "isolation": "strict" } }The CLI forwards it unchanged under
runner.macroRunnerConfig. A change on the machine (OS image, how the workload is sandboxed) can shift benchmark results, and CodSpeed needs this to tell such shifts apart from code changes.The CLI does not interpret the object, so the runner can add fields without a new CLI release. Without the file, the job is not on a macro runner and the field is omitted, so other uploads and their metadata hash are unchanged. A file that cannot be read or is not a JSON object is ignored with a warning instead of failing the upload.
The hash test sets the field (
cd04217a…); the backend computes the same hash for that payload.Refs COD-3931