-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(schema)!: support kv-pair updates array #21272
Conversation
WalkthroughWalkthroughThe recent changes enhance the Go code's handling of key-value pair updates by transitioning from a single update representation to a collection of updates. This modification improves flexibility and efficiency, allowing for batch processing of updates across various components, including data structures and middleware functions. The adjustments facilitate a more comprehensive approach to managing updates, thus optimizing overall functionality. 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 Configuration File (
|
@aaronc your pull request is missing a changelog! |
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
Outside diff range, codebase verification and nitpick comments (1)
schema/decoding/middleware.go (1)
83-100
: Ensure proper error handling and logging.The loop iterates over
kvUpdate.Updates
, processing each update. Ensure that errors are logged or handled appropriately to aid in debugging. Consider adding logging for successful updates as well.+ import "log" ... if err != nil { log.Printf("Error decoding update for module %s: %v", kvUpdate.ModuleName, err) return err } ... if err != nil { log.Printf("Error updating object for module %s: %v", kvUpdate.ModuleName, err) return err }
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (3)
- schema/appdata/data.go (1 hunks)
- schema/decoding/decoding_test.go (1 hunks)
- schema/decoding/middleware.go (1 hunks)
Additional context used
Path-based instructions (3)
schema/decoding/middleware.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.schema/appdata/data.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.schema/decoding/decoding_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 (2)
schema/appdata/data.go (1)
75-84
: Review struct renaming and field changes for consistency.The renaming from
ModuleKVPairUpdate
toModuleKVPairUpdates
and changingUpdate
toUpdates
aligns with handling multiple updates. Ensure that all usages of these structs in the codebase are updated accordingly to prevent inconsistencies.schema/decoding/decoding_test.go (1)
300-307
: Verify test coverage for handling multiple updates.The
Set
method now handles multiple updates. Ensure that the tests cover scenarios with multiple updates to validate the changes. Consider adding tests for edge cases, such as empty updates or large batches.
Closing in favor of #21305 which is even closer to what's in server/v2 |
Description
Data in server/v2 is already passed in KVPair arrays so this changes allows server/v2 integration to be more performant.
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
New Features
Bug Fixes
Refactor