-
Notifications
You must be signed in to change notification settings - Fork 253
fix(indexing): respect strict mode #523
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ func (r *ReplacesInputStream) canAdd(bundle *Bundle, packageGraph *Package) erro | |
|
||
if replaces != "" && !packageGraph.HasCsv(replaces) { | ||
// We can't add this until a replacement exists | ||
return fmt.Errorf("Invalid bundle %s, bundle specifies a non-existent replacement %s", bundle.Name, replaces) | ||
return fmt.Errorf("Invalid bundle %s, replaces nonexistent bundle %s", bundle.Name, replaces) | ||
} | ||
|
||
images, ok := r.packages[packageGraph.Name] | ||
|
@@ -145,11 +145,8 @@ func (r *ReplacesInputStream) Next() (*ImageInput, error) { | |
return image, nil | ||
} | ||
|
||
// No viable bundle found in the package, can't parse it any further | ||
if len(packageErrs) > 0 { | ||
delete(r.packages, pkg) | ||
errs = append(errs, packageErrs...) | ||
} | ||
// No viable bundle found in the package, can't parse it any further, so return any errors | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Is this comment still relevant? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
errs = append(errs, packageErrs...) | ||
} | ||
|
||
// We've exhausted all valid input bundles, any errors here indicate invalid input of some kind | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,7 +196,6 @@ func (i *DirectoryPopulator) loadManifests(imagesToAdd []*ImageInput, imagesToRe | |
errs = append(errs, err) | ||
break | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Seems like some noise in a file not being touched by this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did this on purpose, didn't like the extra space; I'm pretty sure I introduced this in the previous patch too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd put forth the same argument as this comment, but if you feel strongly about it anyway it's a small PR so I guess it's not worth delaying this PR because of this. |
||
} | ||
|
||
if len(errs) > 0 { | ||
|
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 feels more like a personal choice and unrelated to the fix the PR is trying to address.
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.
sure, but the existing wording doesn't make sense.
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.
If we feel that was we can probably open another housekeeping PR that's titled
fix log message
. I'm just not sure if changing log message goes withrespect strict mode
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 feel strongly that we shouldn't tax CI for trivial changes. I think the k8s docs also suggest that trival changes should go into larger PRs for that project.