-
Notifications
You must be signed in to change notification settings - Fork 166
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 cleanup leak in pipeline collectors #223
Conversation
Thank you for your contribution. Can you add a unit/integration test or add steps on how the change can be tested? |
hi @nvvfedorov, as the current code base, it is not easy to add tests for this. maybe we refactor the type DCGMCollectorConstructor func([]Counter, *Config, dcgm.Field_Entity_Group) (*DCGMCollector, func(), error)
NewMetricsPipeline(c *Config, NewDCGMCollector DCGMCollectorConstructor) (*MetricsPipeline, func(), error) so that we can pass a mock DCGMCollectorConstructor into it and test the cleanups |
This makes sense. Let's make the code better. |
c6877ea
to
462072b
Compare
Hi @nvvfedorov, tests added, PTAL |
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.
Please put temporary files into the temporary directory. See my comment.
462072b
to
b643547
Compare
Hi @nvvfedorov, I have updated the code, PTAL |
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.
LGTM
Signed-off-by: Zhang Wei <[email protected]>
Signed-off-by: Zhang Wei <[email protected]>
Signed-off-by: Zhang Wei <[email protected]>
b643547
to
7c1f90d
Compare
Hi @nvvfedorov, I have updated to sign the commits, can you help merge this PR, or do we need to assign another maintainer? |
cleanup is shadowed by the later ones, especially the GPU Collector cleanup, which never has a chance to be executed.
this may be related to #215