• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 40833729979
93%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2026 07:16AM UTC
Jobs 11
Files 1800
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Oct 2026 07:10AM UTC coverage: 93.016% (+0.05%) from 92.966%
40833729979

push

github

web-flow
Add buf as an alternate Python protobuf code generator (#23343)

Adds `buf generate` as an alternative to `protoc` for generating
code from Protobuf. buf is increasingly the standard Protobuf
toolchain, and it can fetch pinned plugins and dependencies from
the Buf Schema Registry rather than requiring them to be installed
locally. Plugins and output paths come from a `buf.gen.yaml`
template, rather than from Pants options.

Python opts in with `[python-protobuf].codegen_tool = "buf"`
(the default remains `protoc`). TypeScript, via the new
`pants.backend.experimental.codegen.protobuf.typescript` backend,
always uses buf.

In more detail:

- Python module mapping and runtime dependency inference follow
  the plugins named in the template.
- `remote:` BSR plugins must be pinned to a version and revision,
  so that codegen is reproducible. Pants fills in pins for common
  plugins, and `[buf].extra_plugin_pins` adds others.
- In-repo runnable targets can serve as `local:` codegen plugins
  (`[buf].codegen_plugins`) and as `buf lint` check plugins
  (`[buf].plugins`).
- `pants generate-lockfiles --resolve=buf` generates `buf.lock`,
  which is required when `buf.yaml` declares `deps:`.
- TypeScript `check` now runs codegen, so generated code is
  visible to `tsc`.

Partially addresses #20684.

---------

Co-authored-by: edelmanjm <jonathan.edelman@formlabs.com>

1055 of 1081 new or added lines in 28 files covered. (97.59%)

97604 of 104932 relevant lines covered (93.02%)

3.65 hits per line

Uncovered Changes

Lines Coverage ∆ File
16
93.01
src/python/pants/backend/codegen/protobuf/buf/config.py
6
88.0
src/python/pants/backend/codegen/protobuf/buf/lockfile.py
1
98.68
src/python/pants/backend/codegen/protobuf/buf/generate.py
1
95.65
src/python/pants/backend/codegen/protobuf/python/buf_rules.py
1
99.05
-0.95% src/python/pants/backend/codegen/protobuf/python/python_protobuf_module_mapper.py
1
88.89
src/python/pants/backend/experimental/codegen/protobuf/typescript/register.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_3/10 - 40833729979.1 29 Oct 2026 07:23AM UTC 1223
51.83
GitHub Action Run
2 test_python_linux_x86_64_8/10 - 40833729979.2 29 Oct 2026 07:24AM UTC 1228
53.17
GitHub Action Run
3 test_python_linux_x86_64_5/10 - 40833729979.3 29 Oct 2026 07:18AM UTC 1240
60.16
GitHub Action Run
4 test_python_linux_x86_64_7/10 - 40833729979.4 29 Oct 2026 07:21AM UTC 1228
50.7
GitHub Action Run
5 test_python_linux_x86_64_4/10 - 40833729979.5 29 Oct 2026 07:21AM UTC 1254
58.84
GitHub Action Run
6 test_python_linux_x86_64_6/10 - 40833729979.6 29 Oct 2026 07:16AM UTC 1221
49.63
GitHub Action Run
7 test_python_linux_x86_64_2/10 - 40833729979.7 29 Oct 2026 07:17AM UTC 1225
59.02
GitHub Action Run
8 test_python_linux_x86_64_0/10 - 40833729979.8 29 Oct 2026 07:19AM UTC 1245
56.84
GitHub Action Run
9 test_python_linux_x86_64_1/10 - 40833729979.9 29 Oct 2026 07:18AM UTC 1224
48.67
GitHub Action Run
10 test_python_linux_arm64 - 40833729979.10 29 Oct 2026 07:18AM UTC 1210
53.13
GitHub Action Run
11 test_python_linux_x86_64_9/10 - 40833729979.11 29 Oct 2026 07:18AM UTC 1235
54.29
GitHub Action Run
Source Files on build 40833729979
  • Tree
  • List 1800
  • Changed 40
  • Source Changed 17
  • Coverage Changed 39
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40833729979
  • 029bd904 on github
  • Prev Build on main (#40704803842)
  • Next Build on main (#40845801144)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc