-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix nil pointer dereference in supervisor example #166
Conversation
Thank you for the PR @haoqixu Can you provide a test that reproduces this bug? |
The example in https://opentelemetry.io/blog/2022/opamp/ can reproduce this bug. |
@haoqixu thanks for the link. Sorry I was not clear. To accept a bug fix ideally we need an automated test that shows that the bug exists and verifies that the PR fixes it. Will you be able to write a test like that and include in this PR? |
PTAL |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
+ Coverage 76.11% 76.52% +0.40%
==========================================
Files 24 24
Lines 1834 1866 +32
==========================================
+ Hits 1396 1428 +32
- Misses 326 327 +1
+ Partials 112 111 -1
☔ View full report in Codecov by Sentry. |
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
`Supervisor.healthCheckTicker` is prepared in `(*Supervisor).startAgent`. If there is no effective config file, we will skip the call of `startAgent` causing an nil pointer dereference in the loop.
Supervisor.healthCheckTicker
is prepared in(*Supervisor).startAgent
. If there is no effective config file, we will skip the call ofstartAgent
causing an nil pointer dereference in the loop.