Run CodSpeed benchmarks in parallel shards - #4597
Conversation
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the shard selection or added pytest-test-groups dependency is wrong, benchmark runs could omit or duplicate tests and publish incomplete or misleading CodSpeed results. Reverting restores the previous benchmark job, and affected measurements can be corrected by rerunning the benchmarks, but already-published results may outlive the revert.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Greptile SummaryThe PR splits the CodSpeed benchmark workflow across four parallel GitHub Actions jobs while preserving simulation mode.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking supply-chain hardening opportunity for the runtime-resolved sharding plugin. The sharding configuration partitions the current benchmark collection completely, but pytest-test-groups is fetched outside the lockfile and executes in a job capable of requesting an OIDC token. Files Needing Attention: .github/workflows/test.yml
|
| Filename | Overview |
|---|---|
| .github/workflows/test.yml | Adds deterministic four-way benchmark sharding; the remaining non-blocking concern is integrity protection for the dynamically resolved plugin. |
Reviews (1): Last reviewed commit: "Shard CodSpeed benchmarks across runners" | Re-trigger Greptile
|
Hi, thanks for contributing to this project! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of ---
release type: patch
---
Description of the changes, ideally with some examples, if adding a new feature.
Release type can be one of patch, minor or major. We use [semver](https://semver.org/), so make sure to pick the appropriate type. If in doubt feel free to ask :) |
Sourcery withdrew this approval because the latest commits introduced blocking findings.
Apollo Federation Subgraph Compatibility Results
Learn more: |
Summary
pytest-test-groupsuv sync --lockedbefore the OIDC-enabled CodSpeed stepMotivation
The original benchmark job took 24 minutes, with 22 minutes 41 seconds spent running the simulated benchmarks. The stadium benchmark accounted for nearly half of that time.
The four shards place the expensive stadium cases on separate runners and also distribute the large-query and subscription cases. In the first complete CI run, the slowest shard finished in 9 minutes 34 seconds.
Locking
pytest-test-groupsensures its distribution is verified against the SHA-256 hashes inuv.lockinstead of being resolved dynamically inside a job withid-token: write.Verification
pytest-test-groups1.2.1 withuv sync --lockedSummary by Sourcery
Run the CodSpeed benchmark suite in four parallel shards to reduce CI execution time.
Enhancements:
Build: