Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Nov 16, 2023

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.

@atoulme atoulme requested review from a team and jpkrohling November 16, 2023 18:58
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e13dd5b) 90.83% compared to head (284c04d) 90.83%.
Report is 120 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@@ -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)")
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor

github-actions bot commented Dec 1, 2023

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 1, 2023
@jpkrohling
Copy link
Member

@atoulme, is this still up to date? I thought we discussed this during a SIG Collector call and decided to go another route?

@atoulme
Copy link
Contributor Author

atoulme commented Dec 4, 2023

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.

@github-actions github-actions bot removed the Stale label Dec 5, 2023
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Dec 20, 2023
@atoulme
Copy link
Contributor Author

atoulme commented Dec 22, 2023

With open-telemetry/opentelemetry-collector-contrib#30187, I no longer need this. Closing.

@atoulme atoulme closed this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants