Skip to content

conformance: run the protobuf suite against the table codec - #478

Draft
iainmcgin wants to merge 9 commits into
table-mapfrom
table-conformance
Draft

iainmcgin wants to merge 9 commits into
table-mapfrom
table-conformance

Conversation

@iainmcgin

Copy link
Copy Markdown
Collaborator

Runs the protobuf conformance suite against test messages generated with CodecStrategy::Table, so the table codec (oneofs, maps, and the bridge to well-known-type children) is tested against an independent corpus.

The run passes 5,549 binary and JSON cases and 883 text-format cases with an empty failure list. 52 of the 72 generated messages use the table. The rest, including the top-level TestAllTypesProto2, run through the unrolled codec, so the run covers proto3, editions and nested proto2 messages. A compile-time check fails the build if the messages that must use the table stop doing so. Breaking the map write, the bridge merge or oneof message-member placement in the runtime fails 240, 32 and 20 cases.

run-conformance.sh now uses pipefail, so a failing run no longer exits 0 when CONFORMANCE_OUT pipes it through tee. run-conformance-local.sh changes to the repository root first, so rust-toolchain.toml applies, and keeps one target dir per binary, as it did for no_std. The last ten successful main conformance jobs took 2:57 to 4:02, so the job keeps its 15-minute timeout.

Stacked on #477, the last of the table codec PRs (#469, #475, #476).

… feature

The `table` feature selects CodecStrategy::Table for every conformance
schema. A compile-time pin in main.rs names the table statics of the
messages that must use it, so a fallback rule cannot silently turn the
run back into an unrolled one.
Adds the table binary to the Docker image, the local script and the CI
conformance job, with its own known-failures list. The build needs
Rust 1.77; buffa-build refuses an older compiler.
With CONFORMANCE_OUT set, each run's output goes through tee, and without
pipefail the pipeline exits with tee's status, so a failing
conformance_test_runner left the container exit code at zero.
The std, table and no_std builds now share a target dir, so the
dependencies and build scripts they have in common compile once. Each
binary is copied out before the next build overwrites it.
All three builds share a target dir and the no_std run uses its artifact in
place, so the std and table binaries are copied out first.
…make the pin compile-time only

The requirement is stated once, on the feature. The pin becomes an unnamed
const block, so it does not read as a test and needs no dead_code allow.
…ipt from the repo root

rust-toolchain.toml selects the toolchain from the working directory, so the
local script now changes to the repository root before it builds.
The via-table paragraph names the categories that fall back to the unrolled
codec, including the top-level TestAllTypesProto2, and gives the measured
success count. The text failure list notes that the table run shares it.
@github-actions

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

This branch has not been deployed

No deployments
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.

1 participant