-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix(proto): set added_in
annotations
#24358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis pull request updates numerous protocol buffer files. Most changes remove comment lines that specify the associated cosmos‑sdk version, which does not alter functionality. A subset of files has been updated to include an import statement for the cosmos_proto package and to add option annotations on RPC methods and message fields. These annotations document in which cosmos‑sdk version the method or field was introduced, thereby enhancing version metadata without affecting behavior. Changes
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
proto/cosmos/feegrant/v1beta1/tx.proto (2)
24-27
: RPC MethodPruneAllowances
Annotation:
ThePruneAllowances
RPC method now includes a version annotation:
option (cosmos_proto.method_added_in) = "cosmos-sdk v0.50.0";
Consider verifying that the version string format is consistent with other annotations (for example, using"cosmos-sdk 0.50"
instead of"v0.50.0"
) unless the additional precision is intentional.
63-75
: Message Annotations forMsgPruneAllowances
and Response:
The new annotations on theMsgPruneAllowances
message (option (cosmos_proto.message_added_in) = "cosmos-sdk v0.50"
) and onMsgPruneAllowancesResponse
are well placed. Again, please verify that the version string format is consistent across the codebase to avoid any potential confusion.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (32)
proto/cosmos/authz/v1beta1/authz.proto
(0 hunks)proto/cosmos/authz/v1beta1/event.proto
(0 hunks)proto/cosmos/authz/v1beta1/genesis.proto
(0 hunks)proto/cosmos/authz/v1beta1/query.proto
(0 hunks)proto/cosmos/authz/v1beta1/tx.proto
(0 hunks)proto/cosmos/base/reflection/v2alpha1/reflection.proto
(0 hunks)proto/cosmos/consensus/v1/query.proto
(2 hunks)proto/cosmos/consensus/v1/tx.proto
(0 hunks)proto/cosmos/crypto/hd/v1/hd.proto
(0 hunks)proto/cosmos/crypto/keyring/v1/record.proto
(0 hunks)proto/cosmos/crypto/secp256r1/keys.proto
(0 hunks)proto/cosmos/epochs/module/v1/module.proto
(0 hunks)proto/cosmos/epochs/v1beta1/events.proto
(0 hunks)proto/cosmos/epochs/v1beta1/genesis.proto
(0 hunks)proto/cosmos/epochs/v1beta1/query.proto
(2 hunks)proto/cosmos/feegrant/v1beta1/feegrant.proto
(0 hunks)proto/cosmos/feegrant/v1beta1/genesis.proto
(0 hunks)proto/cosmos/feegrant/v1beta1/query.proto
(0 hunks)proto/cosmos/feegrant/v1beta1/tx.proto
(2 hunks)proto/cosmos/gov/v1/genesis.proto
(0 hunks)proto/cosmos/gov/v1/gov.proto
(0 hunks)proto/cosmos/gov/v1/query.proto
(0 hunks)proto/cosmos/gov/v1/tx.proto
(1 hunks)proto/cosmos/group/v1/events.proto
(0 hunks)proto/cosmos/group/v1/genesis.proto
(0 hunks)proto/cosmos/group/v1/query.proto
(0 hunks)proto/cosmos/group/v1/tx.proto
(0 hunks)proto/cosmos/group/v1/types.proto
(0 hunks)proto/cosmos/staking/v1beta1/authz.proto
(0 hunks)proto/cosmos/tx/v1beta1/service.proto
(1 hunks)proto/cosmos/upgrade/v1beta1/tx.proto
(0 hunks)x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto
(2 hunks)
💤 Files with no reviewable changes (26)
- proto/cosmos/epochs/module/v1/module.proto
- proto/cosmos/upgrade/v1beta1/tx.proto
- proto/cosmos/group/v1/types.proto
- proto/cosmos/authz/v1beta1/tx.proto
- proto/cosmos/group/v1/tx.proto
- proto/cosmos/group/v1/events.proto
- proto/cosmos/consensus/v1/tx.proto
- proto/cosmos/gov/v1/query.proto
- proto/cosmos/feegrant/v1beta1/genesis.proto
- proto/cosmos/authz/v1beta1/query.proto
- proto/cosmos/crypto/hd/v1/hd.proto
- proto/cosmos/epochs/v1beta1/genesis.proto
- proto/cosmos/group/v1/query.proto
- proto/cosmos/crypto/secp256r1/keys.proto
- proto/cosmos/authz/v1beta1/genesis.proto
- proto/cosmos/staking/v1beta1/authz.proto
- proto/cosmos/base/reflection/v2alpha1/reflection.proto
- proto/cosmos/gov/v1/gov.proto
- proto/cosmos/crypto/keyring/v1/record.proto
- proto/cosmos/feegrant/v1beta1/feegrant.proto
- proto/cosmos/group/v1/genesis.proto
- proto/cosmos/feegrant/v1beta1/query.proto
- proto/cosmos/epochs/v1beta1/events.proto
- proto/cosmos/authz/v1beta1/event.proto
- proto/cosmos/gov/v1/genesis.proto
- proto/cosmos/authz/v1beta1/authz.proto
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: tests (03)
- GitHub Check: build (arm64)
- GitHub Check: build (amd64)
- GitHub Check: dependency-review
- GitHub Check: Summary
🔇 Additional comments (12)
proto/cosmos/consensus/v1/query.proto (2)
6-6
: Import Addition for Versioning SupportThe new import statement for
"cosmos_proto/cosmos.proto"
properly enables the usage of the new versioning annotations. This change is consistent with similar updates in other parts of the codebase.
13-16
: RPC Method Annotation AddedThe addition of the option
option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47";
within theParams
RPC method correctly documents the introduction version for the method. Ensure that "cosmos-sdk 0.47" is indeed the intended version for this consensus module change.proto/cosmos/epochs/v1beta1/query.proto (3)
7-7
: Import Addition for Consistent AnnotationThe inclusion of the import statement for
"cosmos_proto/cosmos.proto"
ensures that annotation options are available in this proto file. This is consistent with similar changes in other modules.
14-17
: EpochInfos RPC AnnotationThe RPC method
EpochInfos
now includes the option
option (cosmos_proto.method_added_in) = "cosmos-sdk 0.53";
which clearly indicates its introduction in cosmos-sdk v0.53. This change aligns with the PR objectives and provides improved version metadata.
19-22
: CurrentEpoch RPC AnnotationSimilarly, the
CurrentEpoch
RPC method now has the annotation
option (cosmos_proto.method_added_in) = "cosmos-sdk 0.53";
to denote its added version. This update is consistent and enhances clarity regarding API versioning.x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto (3)
7-7
: Import Addition in AminoJSON ProtoAdding the import for
"cosmos_proto/cosmos.proto"
makes the new field options available in this proto file. This change helps standardize version annotations across modules.
30-30
: Field Annotation for 'unordered'The field
unordered
now includes the option
(cosmos_proto.field_added_in) = "cosmos-sdk 0.53"
which documents the version in which this field was introduced. This addition improves maintainability and traceability.
31-31
: Field Annotation for 'timeout_timestamp'The update for the
timeout_timestamp
field, adding
(cosmos_proto.field_added_in) = "cosmos-sdk 0.53"
,
is clear and consistent with the versioning approach. This helps in tracking changes across versions.proto/cosmos/tx/v1beta1/service.proto (1)
101-101
: Field Version Annotation forquery
:
The updatedquery
field now includes theadded_in
annotation
[(cosmos_proto.field_added_in) = "cosmos-sdk 0.50"]
, which enhances clarity on when this field was introduced. Please verify that this version designation aligns with the official release notes.proto/cosmos/gov/v1/tx.proto (3)
20-43
: RPC Methods Version Annotations (Part 1):
The RPC methods (SubmitProposal
,ExecLegacyContent
,Vote
,VoteWeighted
, andDeposit
) now have thecosmos_proto.method_added_in
annotation set to"cosmos-sdk 0.46"
. This addition improves API version transparency. Please ensure that these version designations match the documented API evolution in the release notes.
47-54
: RPC Methods Version Annotations (Part 2):
TheUpdateParams
andCancelProposal
methods now feature annotations"cosmos-sdk 0.47"
and"cosmos-sdk 0.50"
respectively. These annotations seem consistent with their introduction timing. Kindly double-check that these version numbers accurately reflect the intended changes as per the release history.
81-87
: Field Annotations inMsgSubmitProposal
:
Thetitle
andsummary
fields are now annotated with[(cosmos_proto.field_added_in) = "cosmos-sdk 0.47"]
and theexpedited
field with[(cosmos_proto.field_added_in) = "cosmos-sdk 0.50"]
. This clearly documents the versioning of field additions. Please confirm that these annotations are correct according to the module’s evolution.
@julienrbrt your pull request is missing a changelog! |
I do not think we need a changelog, but after this we do need a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im still not up to speed on how this works - but are there any problems with not annotating all the RPC below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given there was no client/v2 in 0.46, this is fine. It really matters for client/v2 actually.
we could annotate it tho if wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh that makes sense. thanks!
Co-authored-by: Alex | Interchain Labs <[email protected]> (cherry picked from commit 28c50a4)
Co-authored-by: julienrbrt <[email protected]>
Description
Noticed when checking #24335 (comment).
Not all annotations where backported in #24105.
This rewrite the
// Since`` comments as
added_in` annotations.Should be backported to 0.53.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
Chores
New Features