Conversation
A workflow step running after the benchmarks had no way to know which CodSpeed run the results were uploaded to. After a successful upload on GitHub Actions, write it to `$GITHUB_OUTPUT` as `run-id`. All uploads of a workflow run share the same CodSpeed run, so the id of the last upload is the run id. A failure to write the output only warns. Closes COD-3661 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging this PR will not alter performance
|
Writing to `$GITHUB_OUTPUT` on every upload would add a `run-id` output to any user `run:` step invoking the runner. Gate it behind `--export-run-id` / `CODSPEED_EXPORT_RUN_ID`, set by the CodSpeed action. Refs COD-3661 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Now that the export is opt-in, a missing `$GITHUB_OUTPUT` means the caller asked for a `run-id` output that will never be written. Surface it as a warning instead of silently skipping. Refs COD-3661 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No need for three commits though, squash and merge |
Providers without a native step output now print `{"run_id": "..."}` on
stdout when the run id export is enabled, instead of silently doing nothing.
Refs COD-3661
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use `log_json!` instead of `println!`, the channel already used for other machine-readable output. Locally the JSON still goes to stdout while logs stay on stderr; the GitLab, Buildkite and CircleCI loggers drop JSON events, so the run id is no longer printed there. Refs COD-3661 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the hidden `--export-run-id` flag and its `CODSPEED_EXPORT_RUN_ID` env var: the runner now always writes the `run-id` step output after uploading on GitHub Actions. Other providers no longer print the run id as JSON, since without the gate it would show up on every run. Refs COD-3661 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
lgtm once tested with the action you can merge
After a successful upload on GitHub Actions, write the CodSpeed run id to
$GITHUB_OUTPUTasrun-id, so later workflow steps can read the run back instead of guessing it from the commit and branch.All uploads of a workflow run land in the same CodSpeed run, so the id of the last upload is the run id. Failing to write the output only logs a warning.
The action will expose it as a
run-idoutput once this is released.Closes COD-3661