-
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
[extension] Remove Settings.ModuleInfo and move to service.Host hidden method #12296
[extension] Remove Settings.ModuleInfo and move to service.Host hidden method #12296
Conversation
79c4ef6
to
b45fd67
Compare
@djaglowski @dpaasman00 would this be an acceptable solution for you? We may revert back to the current state once we have decided on the |
Codecov ReportAttention: Patch coverage is
❌ 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. |
@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 :) |
|
||
type ModuleInfo struct { | ||
// BuilderRef is the raw string passed in the builder configuration used to build this service. | ||
BuilderRef string |
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.
Should we have version as well here in the future?
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.
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)
1f0365c
Description
Moves
extension.Settings.ModuleInfo
to aservice.Host.GetModuleInfo
method.This field probably fits better on
extension.Settings
or even incomponent.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 ofextension
.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