-
Notifications
You must be signed in to change notification settings - Fork 78
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
Implement package syncing #76
Implement package syncing #76
Conversation
tigrannajaryan
commented
May 17, 2022
- This implements "Packages" spec section https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#packages-1
- TODO: increase test coverage to handle many more edge cases.
- TODO: add package usage to the example Agent/Server.
Codecov Report
@@ Coverage Diff @@
## main #76 +/- ##
==========================================
+ Coverage 78.17% 78.30% +0.12%
==========================================
Files 20 22 +2
Lines 1306 1733 +427
==========================================
+ Hits 1021 1357 +336
- Misses 215 282 +67
- Partials 70 94 +24
Continue to review full report at Codecov.
|
@open-telemetry/opamp-go-approvers please review. |
Aside from the small issue I mentioned, overall this looks good. However, unless I missed something, it appears to me that it is possible to have multiple sync operations running at the same time which could be confusing. |
6946be7
to
0cf4ead
Compare
Good point. I will create an issue to fix this in a future PR. |
Issue added #84 |
- This implements "Packages" spec section https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#packages-1 - TODO: increase test coverage to handle many more edge cases. - TODO: add package usage to the example Agent/Server.
0cf4ead
to
b7cf51f
Compare
@@ -97,6 +103,10 @@ func (h *HTTPSender) makeOneRequestRoundtrip(ctx context.Context) { | |||
if err != nil { | |||
return |
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.
not scope of this PR but just noticed this - shouldn't we at least log the error?
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.
Since it is somewhat nuanced sendRequestWithRetries does its own logging (for some errors it does Debugf instead of Errorf).
In the file packagesyncer.go defer func() closes the channel s.doneCh but it doesn't necessarily wait for the subroutine go
|