-
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
Fail when the builder can't load its configuration. #5731
Conversation
7fc5572
to
d9b5b02
Compare
Codecov Report
@@ Coverage Diff @@
## main #5731 +/- ##
==========================================
- Coverage 91.56% 91.53% -0.04%
==========================================
Files 192 192
Lines 11411 11411
==========================================
- Hits 10449 10445 -4
- Misses 768 771 +3
- Partials 194 195 +1
Continue to review full report at Codecov.
|
If the builder can't load its build configuration file, it logs an error and continues. This results in building a collector that is not the one the user specified. Exit with a fatal error instead. Signed-off-by: James Peach <[email protected]>
d9b5b02
to
652a662
Compare
@@ -38,7 +38,9 @@ var ( | |||
// Command is the main entrypoint for this application | |||
func Command() (*cobra.Command, error) { | |||
cmd := &cobra.Command{ | |||
Use: "ocb", | |||
SilenceUsage: true, // Don't print usage on Run error. | |||
SilenceErrors: true, // Don't print errors; main does it. |
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.
not relevant to the PR: I remember that I've seen an issue with errors in the collector being printed twice, I feel that this was the issue.
Description:
If the builder can't load its build configuration file, it logs an error
and continues. This results in building a collector that is not the one
the user specified. Exit with a fatal error instead.
Link to tracking Issue:
None.
Testing: