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

Enhance builder to capture go module for each component type #10599

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

djaglowski
Copy link
Member

Resolves #10570

Alternative to #10598

This implementation is more reliable that #10598 because it gets information directly from the builder manifest. It relies on additional structure in the component.go file, ultimately encoded in otelcol.Factories.

An alternative would be to push the enhancements deeper, into the <kind>.Factories implementations, so that the module information is available directly alongside the Factory.

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.27%. Comparing base (d37fe6c) to head (1ef5407).
Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10599      +/-   ##
==========================================
- Coverage   92.34%   92.27%   -0.07%     
==========================================
  Files         395      397       +2     
  Lines       18669    18729      +60     
==========================================
+ Hits        17240    17283      +43     
- Misses       1069     1086      +17     
  Partials      360      360              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@djaglowski djaglowski force-pushed the module-info-builder branch 2 times, most recently from 9092fd5 to 9add3c0 Compare July 11, 2024 19:32
@djaglowski djaglowski marked this pull request as ready for review July 12, 2024 18:10
@djaglowski djaglowski requested review from a team and jpkrohling July 12, 2024 18:10
@djaglowski
Copy link
Member Author

Hmm, I thought I had tests passing. I'll move this back to draft status until I get CI resolved.

@djaglowski djaglowski marked this pull request as draft July 12, 2024 18:32
@djaglowski djaglowski marked this pull request as ready for review July 12, 2024 22:29
.chloggen/module-info-builder.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.

.chloggen/module-info-builder.yaml Show resolved Hide resolved
cmd/builder/internal/builder/templates/components.go.tmpl Outdated Show resolved Hide resolved
@evan-bradley
Copy link
Contributor

An alternative would be to push the enhancements deeper, into the <kind>.Factories implementations, so that the module information is available directly alongside the Factory.

I think the current placement is good for use in the components subcommand, but if we had a use for the modules at runtime, such as for observability, I could see that being a better approach.

@mx-psi mx-psi merged commit f2c56a3 into open-telemetry:main Jul 16, 2024
50 checks passed
@djaglowski djaglowski deleted the module-info-builder branch July 16, 2024 15:25
@djaglowski
Copy link
Member Author

I think the current placement is good for use in the components subcommand, but if we had a use for the modules at runtime, such as for observability, I could see that being a better approach.

I'm planning to investigate how to get the module info to the opamp extension, so likely will be looking into this more.

@github-actions github-actions bot added this to the next release milestone Jul 16, 2024
@evan-bradley
Copy link
Contributor

I'm planning to investigate how to get the module info to the opamp extension, so likely will be looking into this more.

If we're comfortable relying on the output of this command, we could use it in the Supervisor to relay it to the OpAMP server. That would still be outside OpAMP extension, but at a minimum this will work for the current upstream Collector+OpAMP design.

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.

Components subcommand - Add module@version for each component
5 participants