Skip to content

chore(build): update proto tooling and regenerate code - #151

Merged
beer-1 merged 3 commits into
mainfrom
chore/update-proto-builder
Apr 6, 2026
Merged

beer-1 merged 3 commits into
mainfrom
chore/update-proto-builder

Conversation

@beer-1

@beer-1 beer-1 commented Apr 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bump protoVer from 0.14.0 to 0.18.1 for proto-gen and proto-pulsar-gen tasks
  • Keep a pinned swaggerProtoVer=0.14.0 image for proto-swagger-gen because the cloned third-party repos still expect the older swagger plugin flow
  • Regenerate proto/pulsar files with the new builder (minor output changes expected)

Test plan

  • make proto-all completes without errors
  • Generated file diffs are mechanical / non-behavioral

Summary by CodeRabbit

  • Chores
    • Updated protobuf builder tooling to a newer version
    • Changed protobuf file formatting approach
    • Extended the build pipeline with additional generation steps
    • Regenerated protobuf artifacts with updated tooling configuration
    • Added separate legacy builder configuration for specific generation tasks

@beer-1
beer-1 requested a review from a team as a code owner April 6, 2026 08:09
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Protobuf / buf-build (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed❌ failed (6)✅ passed✅ passedApr 6, 2026, 8:09 AM

@coderabbitai

coderabbitai Bot commented Apr 6, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 275c106b-6268-4a56-b2fe-87d77b43e4ac

📥 Commits

Reviewing files that changed from the base of the PR and between d98f1ae and bbf8fb9.

📒 Files selected for processing (1)
  • Makefile

Walkthrough

Proto-builder Docker image upgraded from 0.14.0 to 0.18.1 with legacy Swagger builder pinned to 0.14.0. Makefile proto targets refactored to include pulsar and swagger generation. Formatting tool changed from clang-format to buf format. Multiple generated protobuf Go files regenerated with reordered imports and updated descriptor bytes.

Changes

Cohort / File(s) Summary
Makefile Proto Configuration
Makefile
Upgraded protoImage from 0.14.0 to 0.18.1. Added swaggerProtoImage pinned to 0.14.0 for legacy Swagger support. Extended proto-all target to include proto-pulsar-gen and proto-swagger-gen. Updated proto-format to use buf format instead of clang-format.
Generated Protobuf Files – Tokenfactory
api/miniwasm/tokenfactory/v1/authority_metadata.pulsar.go, genesis.pulsar.go, params.pulsar.go, query.pulsar.go, tx.pulsar.go
Standard library imports (io, reflect, sync) reordered. Raw descriptor bytes regenerated with updated dependency references. No logic changes.
Generated Protobuf Files – Wasmextension
api/miniwasm/wasmextension/v1/tx.pulsar.go, types.pulsar.go
Import reordering and descriptor byte sequence updates due to proto regeneration. Descriptor dependency references reorganized.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A builder upgraded, from 0.14 to 0.18!
With buf format dancing where clang once sang,
Old Swagger stays loyal on legacy ground,
While pulsar pulses and proto files spin,
A harmonious hop through the generated din! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating proto tooling (builder image from 0.14.0 to 0.18.1) and regenerating generated code files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-proto-builder

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile`:
- Line 166: The Makefile target proto-all now depends on proto-swagger-gen which
calls update-swagger-docs (a target that fails the build on a dirty tree),
causing valid regeneration runs to fail; modify the Makefile so
proto-swagger-gen performs only generation (remove or stop invoking
update-swagger-docs from proto-swagger-gen) and create a new separate target
(e.g., proto-swagger-check or proto-swagger-verify) that runs
update-swagger-docs for CI/verification; update proto-all to depend on the
pure-generation target (proto-swagger-gen) while CI pipelines can call the new
verification target to enforce cleanliness.

In `@proto/miniwasm/tokenfactory/v1/authority_metadata.proto`:
- Line 15: The protobuf field declaration for the admin field in the
AuthorityMetadata message uses non-canonical spacing around the option brackets;
update the admin field's option-bracket spacing to the canonical no-extra-space
form (i.e., remove the stray spaces around the square brackets and equals sign)
and then run buf format -w proto (or equivalent) to reformat the proto files so
CI passes.

In `@proto/miniwasm/tokenfactory/v1/genesis.proto`:
- Line 13: The proto field options for the Params field (the line declaring
"Params params = 1") and the other field flagged at line 27 use spaced brackets
and fail buf formatting; open the proto (look for the "Params params = 1" field
and the similar field around the later flag), remove the extra spaces so options
use compact brackets (e.g. "[gogoproto.nullable = false]" style) and run "buf
format -w proto" to apply repository formatting across the file to satisfy the
buf format --diff check.

In `@proto/miniwasm/tokenfactory/v1/query.proto`:
- Around line 21-24: The protobuf RPC/option formatting around
DenomAuthorityMetadata (and other RPCs using Query* request/response pairs such
as QueryDenomAuthorityMetadataRequest/QueryDenomAuthorityMetadataResponse) is
not in buf's canonical layout; run the formatter (buf format -w proto) to
rewrite these RPC and option blocks into the canonical form and commit the
formatted file, ensuring each rpc/returns line and the option
(google.api.http).get = "..." clause follow buf's indentation and newline rules
consistently across the file.

In `@proto/miniwasm/tokenfactory/v1/tx.proto`:
- Around line 33-39: The proto file fails Buf formatting (CI blocker); run Buf's
formatter to canonicalize whitespace/line-wrap for the file containing the RPCs
such as rpc SetDenomMetadata and rpc SetBeforeSendHook and the other affected
message/rpc blocks, e.g. where the comment/line-wrap around those RPCs is
noncanonical; fix by running buf format -w on the proto file, commit the
reformatted file, and then regenerate artifacts so the CI ProtoBuf workflow
passes.

In `@proto/miniwasm/wasmextension/v1/tx.proto`:
- Line 27: The proto file has non-canonical option spacing causing buf format
errors; update the option formatting for the fields with options (e.g., the
field declaration "string authority = 1 [(cosmos_proto.scalar) =
\"cosmos.AddressString\"];" and the other similar fields noted) to remove extra
spaces inside the square brackets so they match canonical formatting, then run
`buf format -w proto` to apply/verify the fixes.

In `@proto/miniwasm/wasmextension/v1/types.proto`:
- Around line 14-18: The proto options are not in Buf's normalized format for
the fields permission (type cosmwasm.wasm.v1.AccessType with option
gogoproto.moretags) and addresses (repeated string with option
cosmos_proto.scalar); fix this by running the canonical formatter on the proto
file (e.g., run buf format -w on the affected types.proto) so the option
formatting for gogoproto.moretags and cosmos_proto.scalar is normalized to Buf's
expected form before committing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6c325960-684e-4af0-b60d-9c0ae1101f15

📥 Commits

Reviewing files that changed from the base of the PR and between b56cc9d and d98f1ae.

⛔ Files ignored due to path filters (8)
  • api/miniwasm/tokenfactory/v1/query_grpc.pb.go is excluded by !**/*.pb.go
  • api/miniwasm/tokenfactory/v1/tx_grpc.pb.go is excluded by !**/*.pb.go
  • api/miniwasm/wasmextension/v1/tx_grpc.pb.go is excluded by !**/*.pb.go
  • x/tokenfactory/types/params.pb.go is excluded by !**/*.pb.go
  • x/tokenfactory/types/query.pb.go is excluded by !**/*.pb.go
  • x/tokenfactory/types/tx.pb.go is excluded by !**/*.pb.go
  • x/wasmextension/types/tx.pb.go is excluded by !**/*.pb.go
  • x/wasmextension/types/types.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (14)
  • Makefile
  • api/miniwasm/tokenfactory/v1/authority_metadata.pulsar.go
  • api/miniwasm/tokenfactory/v1/genesis.pulsar.go
  • api/miniwasm/tokenfactory/v1/params.pulsar.go
  • api/miniwasm/tokenfactory/v1/query.pulsar.go
  • api/miniwasm/tokenfactory/v1/tx.pulsar.go
  • api/miniwasm/wasmextension/v1/tx.pulsar.go
  • api/miniwasm/wasmextension/v1/types.pulsar.go
  • proto/miniwasm/tokenfactory/v1/authority_metadata.proto
  • proto/miniwasm/tokenfactory/v1/genesis.proto
  • proto/miniwasm/tokenfactory/v1/query.proto
  • proto/miniwasm/tokenfactory/v1/tx.proto
  • proto/miniwasm/wasmextension/v1/tx.proto
  • proto/miniwasm/wasmextension/v1/types.proto

Comment thread Makefile Resolved
Comment thread proto/miniwasm/tokenfactory/v1/tx.proto Resolved
@codecov

codecov Bot commented Apr 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.03%. Comparing base (4dc757e) to head (bbf8fb9).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #151   +/-   ##
=======================================
  Coverage   42.03%   42.03%           
=======================================
  Files          49       49           
  Lines        3245     3245           
=======================================
  Hits         1364     1364           
  Misses       1743     1743           
  Partials      138      138           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@beer-1
beer-1 merged commit ef98679 into main Apr 6, 2026
8 checks passed
@beer-1
beer-1 deleted the chore/update-proto-builder branch April 6, 2026 08:26
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