-
Notifications
You must be signed in to change notification settings - Fork 618
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
test: added packet data forwards compatibility test #6089
Conversation
WalkthroughThe update includes a new test function, Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configration 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
Review Status
Configuration used: .coderabbit.yml
Files selected for processing (1)
- modules/apps/transfer/keeper/relay_test.go (1 hunks)
Additional Context Used
Path-based Instructions (1)
modules/apps/transfer/keeper/relay_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
Additional comments not posted (1)
modules/apps/transfer/keeper/relay_test.go (1)
917-999
: Consider adding negative test cases forTestPacketBackwardsCompatibility
to cover scenarios where the new field disrupts the expected packet processing.
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
Review Status
Configuration used: .coderabbit.yml
Files selected for processing (1)
- modules/apps/transfer/keeper/relay_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- modules/apps/transfer/keeper/relay_test.go
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.
Looks good it's a nice addition, thanks @srdtrk !
Just a small nit but otherwise LGTM
// We are testing a scenario where a packet in the future has a new populated | ||
// field called "new_field". And this packet is being sent to this module which | ||
// doesn't have this field in the packet data. The module should be able to handle | ||
// this packet without any issues. |
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.
this test will test is effectively testing compatibility of new fields in the packet data in version N and version N+1 right? If we were to run an E2E and add a new field to packet data and execute a MsgTransfer against an older version of ibc-go (pre-json marshalling) this could still blow up right?
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.
actually I guess it just means that whichever version we are about to tag will be able to successfully process unknown fields, it doesn't necessarily mean it will be backwards compatible with a previous release right?
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.
Yes. Unless we backport this feature
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.
Maybe this should be called a future proof test?
Quality Gate passed for 'ibc-go'Issues Measures |
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.
ACK, agree it'd be nice to use expError
, we can update the pr if you don't have time
Quality Gate passed for 'ibc-go'Issues Measures |
Description
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.Summary by CodeRabbit