Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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] Add strict versioning #9897
[builder] Add strict versioning #9897
Changes from 4 commits
b302a23
c40267d
fe9b80c
90b000f
a2fdb95
d821f83
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Check warning on line 30 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L30
Check warning on line 42 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L42
Check warning on line 45 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L45
Check warning on line 127 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L127
Check warning on line 143 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L143
Check warning on line 147 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L147
Check warning on line 158 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L158
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.
The error here and below would be a bit confusing if
corePath
is not ondependencyVersions
. While this would be a weird situation that I don't think we can encounter now, IMO for future-proofing we should do the full check (corePathVersion, ok := dependencyVersions[corePath]
) and provide a more appropriate error message ifok
is falseCheck warning on line 165 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L163-L165
Check warning on line 173 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L173
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.
Ditto here, IMO we should do the explicit check for presence in
dependencyVersions
Check warning on line 194 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L194
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 haven't been able to add coverage for this because if I would expect this to fail, the previous
go get
command fails first.Check warning on line 217 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L217
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 haven't been able to add coverage for this function because in the code path, if I would expect this to fail, the previous
go get
command fails first.I can add a separate test that targets this function directly, otherwise not sure how to test this.
Check warning on line 234 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L234
Check warning on line 238 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L238
Check warning on line 246 in cmd/builder/internal/builder/main.go
Codecov / codecov/patch
cmd/builder/internal/builder/main.go#L246