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

feat: Add implementation of new AvailableComponents message #340

Merged
merged 13 commits into from
Jan 27, 2025

Conversation

mrsillydog
Copy link
Contributor

Implements the specification added to opamp-spec in open-telemetry/opamp-spec#201

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 95.38462% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.29%. Comparing base (e6fac32) to head (6cb83a6).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
client/internal/clientcommon.go 92.30% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #340      +/-   ##
==========================================
+ Coverage   77.81%   78.29%   +0.47%     
==========================================
  Files          25       25              
  Lines        2321     2386      +65     
==========================================
+ Hits         1806     1868      +62     
- Misses        408      410       +2     
- Partials      107      108       +1     

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

client/client.go Show resolved Hide resolved
client/clientimpl_test.go Show resolved Hide resolved
})
} else {
// Verify that no second status report is delivered (polling is too infrequent for this to happen in 3 seconds)
require.Never(t, func() bool {
Copy link
Member

Choose a reason for hiding this comment

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

Does this block the test for 3 seconds? If it does, can we find a way to avoid waiting for so long? We don't want test durations to increase, especially if they are simply idling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reduced all blocking calls to assert/require.Never() to 50ms, including one other test besides the ones I added.

client/internal/clientcommon.go Outdated Show resolved Hide resolved
client/client.go Show resolved Hide resolved
@mrsillydog mrsillydog marked this pull request as ready for review January 15, 2025 15:56
@mrsillydog mrsillydog requested a review from a team as a code owner January 15, 2025 15:56
@mrsillydog
Copy link
Contributor Author

Comfortable moving this into Ready for Review - have successfully manually tested this implementation end-to-end with a custom build of the OpAMP Supervisor and OpAMP extension in open-telemetry/opentelemetry-collector-contrib.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

LGTM. Just one question on an edge case remaining.

client/client.go Outdated Show resolved Hide resolved
@tigrannajaryan tigrannajaryan enabled auto-merge (squash) January 27, 2025 15:07
Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

Thanks @mrsillydog !

@tigrannajaryan tigrannajaryan merged commit 2ecac8d into open-telemetry:main Jan 27, 2025
11 checks passed
@mrsillydog mrsillydog deleted the feat/available-components branch January 27, 2025 15:08
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.

2 participants