-
Notifications
You must be signed in to change notification settings - Fork 191
Fix multiple versions of msgpack being used #7399
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
Currently, import statements are using different versions of msgpack: - github.com/vmihailenco/msgpack - github.com/vmihailenco/msgpack/v4 They cause go.mod to import different versions of msgpack: - msgpack (v4.0.4) - msgpack/v4 (v4.3.12) This commit replaces import statements using "msgpack" with import statements using "msgpack/v4". This change specifies a specific major version number and prevents different versions of msgpack being used by mistake.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7399 +/- ##
=======================================
Coverage 41.10% 41.11%
=======================================
Files 2207 2207
Lines 193498 193498
=======================================
+ Hits 79544 79550 +6
+ Misses 107325 107321 -4
+ Partials 6629 6627 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Thanks Faye
@@ -5,7 +5,7 @@ import ( | |||
"fmt" | |||
|
|||
"github.com/rs/zerolog" | |||
"github.com/vmihailenco/msgpack" | |||
"github.com/vmihailenco/msgpack/v4" |
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.
Could we double check the existing version and v4 are encoding into the same bytes data? Do we need some test case to verify?
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.
Could we double check the existing version and v4 are encoding into the same bytes data? Do we need some test case to verify?
Good question.
I don't see tagged releases (on GitHub with release notes) for msgpack and their CHANGELOG.md doesn't show changes within v4 (no details about v4.x -> 4.y versions).
However, there seems to be a lot of bugfixes and performance/memory improvements between v4.0.4 and v4.3.12 based on git comparison.
Do we need some test case to verify?
This might be tricky (for someone unfamiliar with the code and the data used) because some code is calling Marshal
on interface type, e.g. flow.Entity
, or any
type. Maybe people more familiar with the code and data can add some test cases.
BTW, I noticed in some cases non-test code used different msgpack version than the test code. So this PR made msgpack versions used by non-tests and tests consistent too.
Updates #7242
Currently, import statements are using different versions of msgpack:
github.com/vmihailenco/msgpack
github.com/vmihailenco/msgpack/v4
They cause go.mod to import different versions of msgpack:
msgpack
(v4.0.4)msgpack/v4
(v4.3.12)Also, the msgpack version used by non-test code and test code sometimes doesn't match.
This PR replaces import statements using "msgpack" with import statements using "msgpack/v4". This change specifies a specific major version number and prevents different versions of msgpack being used by mistake.
I found this while getting familiar with storage code related to BadgerDB and Pebble (not looking for bugs).