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

[extension] Remove Settings.ModuleInfo and move to service.Host hidden method #12296

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Feb 5, 2025

Description

Moves extension.Settings.ModuleInfo to a service.Host.GetModuleInfo method.

This field probably fits better on extension.Settings or even in component.BuildInfo, but since its contents are a bit in flux per discussions like #12283, I would like to move it here to not stabilize it alongside the rest of extension.

The field is not used in any public code on Github, so I think it won't have a huge impact to remove it in one go, happy to do this in two steps if preferred.

One relevant difference is that this information is no longer available at extension build time, but rather after the Start method is called. Another relevant difference is that this is now available for all component kinds, not just extensions. This could be worked around (we could pass a different host depending on the component kind) but I don't see the use right now.

Link to tracking issue

Updates #12283

@mx-psi mx-psi force-pushed the mx-psi/move-moduleinfo-to-method branch from 79c4ef6 to b45fd67 Compare February 5, 2025 13:12
@mx-psi mx-psi requested a review from dpaasman00 February 5, 2025 13:12
@mx-psi mx-psi marked this pull request as ready for review February 5, 2025 13:12
@mx-psi mx-psi requested review from djaglowski and a team as code owners February 5, 2025 13:12
@mx-psi
Copy link
Member Author

mx-psi commented Feb 5, 2025

@djaglowski @dpaasman00 would this be an acceptable solution for you? We may revert back to the current state once we have decided on the ModuleInfo struct contents and structure, but I want to make sure we get it right first.

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.35%. Comparing base (c8d26be) to head (cd4045b).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
service/internal/graph/host.go 0.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (86.66%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12296   +/-   ##
=======================================
  Coverage   91.34%   91.35%           
=======================================
  Files         467      467           
  Lines       25749    25801   +52     
=======================================
+ Hits        23521    23571   +50     
- Misses       1810     1812    +2     
  Partials      418      418           

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

@mrsillydog
Copy link

@mx-psi - responding on behalf of @dpaasman00 and @djaglowski. This is an acceptable change for us - work is currently in flight that depends on this information, but it's not problematic if that work needs to be adjusted based on this change. Simple enough alteration to modify where we are interacting with the information from component initialization to the Start() method.

@mx-psi
Copy link
Member Author

mx-psi commented Feb 5, 2025

@mx-psi - responding on behalf of @/dpaasman00 and @/djaglowski. This is an acceptable change for us - work is currently in flight that depends on this information, but it's not problematic if that work needs to be adjusted based on this change. Simple enough alteration to modify where we are interacting with the information from component initialization to the Start() method.

Nice, glad to hear this :)

@mx-psi mx-psi requested a review from bogdandrutu February 5, 2025 17:35

type ModuleInfo struct {
// BuilderRef is the raw string passed in the builder configuration used to build this service.
BuilderRef string
Copy link
Member

Choose a reason for hiding this comment

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

Should we have version as well here in the future?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think it would make sense to move this to have more structure, but I would rather do this in a separate PR (I would have to start parsing the builder ref and I am worried that this is not trivial)

@mx-psi mx-psi added this pull request to the merge queue Feb 5, 2025
Merged via the queue into open-telemetry:main with commit 1f0365c Feb 5, 2025
53 of 54 checks passed
@mx-psi mx-psi deleted the mx-psi/move-moduleinfo-to-method branch February 5, 2025 19:34
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