Skip to content

apollo_gateway: stop auto-discovering bench helper as a bench target - #14878

Merged
avi-starkware merged 1 commit into
main-v0.14.3from
avi/build-hygiene/02-gateway-autobenches
Jul 29, 2026
Merged

apollo_gateway: stop auto-discovering bench helper as a bench target#14878
avi-starkware merged 1 commit into
main-v0.14.3from
avi/build-hygiene/02-gateway-autobenches

Conversation

@avi-starkware

Copy link
Copy Markdown
Collaborator

benches/utils.rs is a helper module included by benches/main.rs (the explicit
[[bench]], gated on the testing feature). Cargo's bench auto-discovery also
picked utils.rs up as a standalone, feature-less bench target, so
cargo bench/cargo clippy --benches failed to compile it without
--features testing (it references apollo_gateway::test_utils). Set
autobenches = false so only the explicit [[bench]] is a bench target.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

avi-starkware commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

@avi-starkware
avi-starkware force-pushed the avi/build-hygiene/01-dev-line-tables-only branch from f3af1b7 to 76e5d24 Compare July 26, 2026 08:13
@avi-starkware
avi-starkware force-pushed the avi/build-hygiene/02-gateway-autobenches branch from 408bd90 to f74c70f Compare July 26, 2026 08:13
@avi-starkware
avi-starkware marked this pull request as ready for review July 26, 2026 10:50
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Packaging-only Cargo.toml change; no runtime or gateway logic affected.

Overview
Sets autobenches = false on apollo_gateway so Cargo only builds the declared [[bench]] (benches/main.rs, behind the testing feature).

Without this, auto-discovery also treated benches/utils.rs as its own bench crate. That helper is only meant to be mod utils from main.rs and depends on apollo_gateway::test_utils, so cargo bench / cargo clippy --benches failed when testing was not enabled.

Reviewed by Cursor Bugbot for commit a95b06d. Bugbot is set up for automated code reviews on this repo. Configure here.

@avi-starkware
avi-starkware force-pushed the avi/build-hygiene/02-gateway-autobenches branch from f74c70f to cbca040 Compare July 26, 2026 11:32
@avi-starkware
avi-starkware force-pushed the avi/build-hygiene/01-dev-line-tables-only branch 2 times, most recently from f3d6259 to a03ee34 Compare July 28, 2026 09:02
@avi-starkware
avi-starkware force-pushed the avi/build-hygiene/02-gateway-autobenches branch from cbca040 to c709d18 Compare July 28, 2026 09:02
benches/utils.rs is a helper module included by benches/main.rs (the explicit
[[bench]], gated on the `testing` feature). Cargo's bench auto-discovery also
picked utils.rs up as a standalone, feature-less bench target, so
`cargo bench`/`cargo clippy --benches` failed to compile it without
`--features testing` (it references apollo_gateway::test_utils). Set
autobenches = false so only the explicit [[bench]] is a bench target.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avi-starkware
avi-starkware changed the base branch from avi/build-hygiene/01-dev-line-tables-only to graphite-base/14878 July 28, 2026 10:35
@avi-starkware
avi-starkware force-pushed the avi/build-hygiene/02-gateway-autobenches branch from c709d18 to a95b06d Compare July 28, 2026 10:36
@avi-starkware
avi-starkware changed the base branch from graphite-base/14878 to main-v0.14.3 July 28, 2026 10:36

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@Yoni-Starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on avi-starkware).

@avi-starkware
avi-starkware added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main-v0.14.3 with commit adf9a37 Jul 29, 2026
18 of 45 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.

3 participants