-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[builder] only compare major and minor versions from gomod #9997
[builder] only compare major and minor versions from gomod #9997
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9997 +/- ##
==========================================
- Coverage 91.77% 91.67% -0.11%
==========================================
Files 360 360
Lines 16635 16639 +4
==========================================
- Hits 15267 15253 -14
- Misses 1041 1052 +11
- Partials 327 334 +7 ☔ View full report in Codecov by Sentry. |
@@ -167,7 +168,7 @@ func GetModules(cfg Config) error { | |||
if !ok { | |||
return fmt.Errorf("core collector %w: '%s'. %s", ErrDepNotFound, corePath, skipStrictMsg) | |||
} | |||
if coreDepVersion != coreVersion { | |||
if semver.MajorMinor(coreDepVersion) != semver.MajorMinor(coreVersion) { |
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.
I think this should be alright, but could we use semver.Compare
here?
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.
semver.Compare
includes the patch version in its comparison, but my goal is to allow patch versions to be different.
Talked to @codeboten and I think we still need this 😅 |
Merging this will unblock updating contrib to the latest core deps. |
Description
When building from a commit hash, I got this error:
It may be more useful to only compare the major and minor versions
Link to tracking issue
#9896
Found in open-telemetry/opentelemetry-collector-contrib#32544
Testing
Documentation
updated readme