Closed laurazard closed 3 weeks ago
Attention: Patch coverage is 57.14286%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 61.67%. Comparing base (
591bd17
) to head (3dcc653
). Report is 14 commits behind head on master.
@laurazard how difficult would it be to write a test-case for this? (could be in a follow-up if we want to get this in)
Had a quick chat; let's bring this one in, and do a follow-up for the test and any other changes we may need.
- What I did
Since 509123f935e6fcb2cedf0df7bd8585a346082969, we've been leaking sockets in the filesystem on platforms where abstract sockets aren't supported.
That change relied on Go to cleanup our sockets for us, which Go will happily do as long as we make sure to close the listener, which we weren't previously doing unless to signal the plugin to terminate.
- How I did it
This change adds a deferred call to
PluginServer.Close()
, which makes sure we close the plugin server at the end of the plugin execution, so that we never exit without cleaning up.- How to verify it
Execute a plugin command with debug logging enabled (e.g.
docker -D compose convert
) and look for the added debug log. Also check$TMPDIR
for leaked sockets.- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)