Repository navigation
chore(build): update proto tooling and regenerate code - #151
Conversation
|
The latest Buf updates on your PR. Results from workflow Protobuf / buf-build (pull_request).
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughProto-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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (8)
api/miniwasm/tokenfactory/v1/query_grpc.pb.gois excluded by!**/*.pb.goapi/miniwasm/tokenfactory/v1/tx_grpc.pb.gois excluded by!**/*.pb.goapi/miniwasm/wasmextension/v1/tx_grpc.pb.gois excluded by!**/*.pb.gox/tokenfactory/types/params.pb.gois excluded by!**/*.pb.gox/tokenfactory/types/query.pb.gois excluded by!**/*.pb.gox/tokenfactory/types/tx.pb.gois excluded by!**/*.pb.gox/wasmextension/types/tx.pb.gois excluded by!**/*.pb.gox/wasmextension/types/types.pb.gois excluded by!**/*.pb.go
📒 Files selected for processing (14)
Makefileapi/miniwasm/tokenfactory/v1/authority_metadata.pulsar.goapi/miniwasm/tokenfactory/v1/genesis.pulsar.goapi/miniwasm/tokenfactory/v1/params.pulsar.goapi/miniwasm/tokenfactory/v1/query.pulsar.goapi/miniwasm/tokenfactory/v1/tx.pulsar.goapi/miniwasm/wasmextension/v1/tx.pulsar.goapi/miniwasm/wasmextension/v1/types.pulsar.goproto/miniwasm/tokenfactory/v1/authority_metadata.protoproto/miniwasm/tokenfactory/v1/genesis.protoproto/miniwasm/tokenfactory/v1/query.protoproto/miniwasm/tokenfactory/v1/tx.protoproto/miniwasm/wasmextension/v1/tx.protoproto/miniwasm/wasmextension/v1/types.proto
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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:
|
Summary
protoVerfrom0.14.0to0.18.1for proto-gen and proto-pulsar-gen tasksswaggerProtoVer=0.14.0image forproto-swagger-genbecause the cloned third-party repos still expect the older swagger plugin flowTest plan
make proto-allcompletes without errorsSummary by CodeRabbit