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

[component] Remove ReportStatus from component.TelemetrySettings #10777

Merged

Conversation

TylerHelmuth
Copy link
Member

@TylerHelmuth TylerHelmuth commented Jul 31, 2024

Description

This PR removes ReportStatus from component.TelemetrySettings and instead expects components to check if their component.Host implements a new componentstatus.Reporter interface.

Link to tracking issue

Related to #10725
Related to #10413

Testing

unit tests and a sharedinstance e2e test.

The contrib tests will fail because this is a breaking change. If we merge this I and @mwear can commit to updating contrib before the next release.

@TylerHelmuth TylerHelmuth requested review from a team and dmitryax July 31, 2024 20:56
@TylerHelmuth TylerHelmuth force-pushed the component-remove-reporting-from-struct-2 branch 2 times, most recently from cdea2a2 to 2ebc539 Compare July 31, 2024 21:02
@TylerHelmuth TylerHelmuth force-pushed the component-remove-reporting-from-struct-2 branch from 2ebc539 to 6765387 Compare July 31, 2024 21:31
component/component.go Show resolved Hide resolved
component/status.go Outdated Show resolved Hide resolved
component/telemetry.go Show resolved Hide resolved
Copy link
Member

@mwear mwear left a comment

Choose a reason for hiding this comment

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

LGTM. I have one non-actionable comment and a suggestion for a followup.

internal/sharedcomponent/sharedcomponent.go Show resolved Hide resolved
service/service.go Show resolved Hide resolved
@mx-psi
Copy link
Member

mx-psi commented Aug 2, 2024

--- FAIL: Test_ComponentStatusReporting_SharedInstance (10.01s)
    testing.go:1398: race detected during execution of test

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 89.31298% with 14 lines in your changes missing coverage. Please review.

Project coverage is 91.60%. Comparing base (3bc5f29) to head (24ede16).
Report is 1 commits behind head on main.

Files Patch % Lines
service/internal/graph/graph.go 82.60% 3 Missing and 1 partial ⚠️
service/service.go 50.00% 0 Missing and 3 partials ⚠️
internal/sharedcomponent/sharedcomponent.go 95.45% 2 Missing ⚠️
receiver/otlpreceiver/otlp.go 0.00% 2 Missing ⚠️
extension/zpagesextension/zpagesextension.go 0.00% 1 Missing ⚠️
service/extensions/extensions.go 90.90% 0 Missing and 1 partial ⚠️
service/internal/status/status.go 97.29% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10777      +/-   ##
==========================================
- Coverage   91.63%   91.60%   -0.03%     
==========================================
  Files         405      404       -1     
  Lines       19034    18980      -54     
==========================================
- Hits        17442    17387      -55     
- Misses       1232     1234       +2     
+ Partials      360      359       -1     

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

mx-psi
mx-psi previously requested changes Aug 7, 2024
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

Blocked based on discussion on the 2024-07-08 Collector stability WG meeting until after v0.107.0 is released

@TylerHelmuth
Copy link
Member Author

TylerHelmuth commented Aug 12, 2024

I recognize that this PR is still really big and many won't have an appetite for reviewing it. I am gonna try to break it up even more:

@mx-psi mx-psi dismissed their stale review August 13, 2024 12:13

v0.107.0 has been released

mx-psi pushed a commit that referenced this pull request Aug 13, 2024
#### Description
Adds a `Reporter` interface that represents how a `component.Host`
implementation could expose the ability to report a status.

You can see how this interface will be used by looking at Related to
#10777

<!-- Issue number if applicable -->
#### Link to tracking issue
Related to
#10777
Related to
#10413

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit test
mx-psi pushed a commit that referenced this pull request Aug 14, 2024
#### Description
This is a prep PR to reduce the size of
#10777. As
part of the work to make our `component.Host` implementation implement
`componentstatus.Reporter` (see
#10852),
the `host` struct and `graph` logic need to be closer together. This is
because, as part of
#10777
`StartAll` is changed to depend on our specific `Host` type instead of a
`component.Host`. Our host already has a dependency on `graph`, so it
can't be moved into its own module.

<!-- Issue number if applicable -->
#### Link to tracking issue
Related to
#10777
Related to
#10413
@mx-psi
Copy link
Member

mx-psi commented Aug 14, 2024

@TylerHelmuth Can you fix the merge conflicts?

@mx-psi
Copy link
Member

mx-psi commented Aug 14, 2024

@TylerHelmuth How do you plan on handling contrib tests failure? Is there any way to make them pass before merging this PR?

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

LGTM. As discussed on the 2024-08-14 Collector Stability WG meeting I will merge this by EOW if there are no further comments

@TylerHelmuth
Copy link
Member Author

@mwear and I will handle the breaking changes via a make update-otel PR. For the components that are reporting fatal error it'll be a 1 line change. For healthcheck extension v2 it'll be a lot of changes.

We'll also end up duplicating the logic from core's sharedcomponent into contrib's sharedcomponent.

@mwear
Copy link
Member

mwear commented Aug 15, 2024

@mwear and I will handle the breaking changes via a make update-otel PR. For the components that are reporting fatal error it'll be a 1 line change. For healthcheck extension v2 it'll be a lot of changes.

We'll also end up duplicating the logic from core's sharedcomponent into contrib's sharedcomponent.

I'll handle healthcheckv2extension. We can divide up anything else that remains.

@mx-psi mx-psi merged commit cb24d0c into open-telemetry:main Aug 16, 2024
35 of 36 checks passed
@github-actions github-actions bot added this to the next release milestone Aug 16, 2024
@TylerHelmuth TylerHelmuth deleted the component-remove-reporting-from-struct-2 branch August 16, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants