-
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
[cmd/builder] add a flag to skip generating main files #8937
Conversation
dfdfcd4
to
284c04d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8937 +/- ##
=======================================
Coverage 90.83% 90.83%
=======================================
Files 318 318
Lines 17211 17218 +7
=======================================
+ Hits 15633 15640 +7
Misses 1284 1284
Partials 294 294 ☔ View full report in Codecov by Sentry. |
@@ -82,6 +83,7 @@ configuration is provided, ocb will generate a default Collector. | |||
// the distribution parameters, which we accept as CLI flags as well | |||
cmd.Flags().BoolVar(&cfg.SkipGenerate, skipGenerateFlag, false, "Whether builder should skip generating go code (default false)") | |||
cmd.Flags().BoolVar(&cfg.SkipCompilation, skipCompilationFlag, false, "Whether builder should only generate go code with no compile of the collector (default false)") | |||
cmd.Flags().BoolVar(&cfg.SkipGenerateMain, skipGenerateMainFlag, false, "Whether builder should skip generating main.go, main_others.go and main_windows.go (default false)") |
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.
Do we need a flag? Why?
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.
We have the need to generate list of components in tooling adjacent to the collector, such as configschema.
I also need this for distros where main.go is managed manually.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@atoulme, is this still up to date? I thought we discussed this during a SIG Collector call and decided to go another route? |
During the SIG meeting I think we said we'd apply a different route to configschema, but I'm not sure I've had time to evaluate that route. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
With open-telemetry/opentelemetry-collector-contrib#30187, I no longer need this. Closing. |
Description:
We have the need to generate list of components in tooling adjacent to the collector, such as configschema. For those, it makes sense to generate a list of components per type that can be used by the program in a programmatic way that differs from running the collector.
Testing:
Unit tests.