The local pcap file was not closed on error. The patch ensures the file is closed regardless of success or failure.
The pcap file was not updated to status.filePath and was not uploaded to file server if not all packets have been captured. The patch ensures it's updated to status and uploaded as long as any packet is captured.
The Complete condition was not set correctly in one case. The patch uses two errors to track capturing error and uploading error separately.
The unit tests could report false negative as they only check that unexpected conditions don't exist, while they should check expected conditions exist.
Change the local pcap path's permission to 700.
Avoid panic when handling delete events containing DeletedFinalStateUnknown objects.
Reduce the min and max retry intervals to reduce the possibility of timeout.
Make a deepcopy before updating object got from lister, otherwise data race may happen and index may be messed up.
Add a readiness probe to the sftp server used in e2e test to avoid test flake.
It also makes some style improvements and simplifies a few code.
The patch fixes the following issues:
status.filePath
and was not uploaded to file server if not all packets have been captured. The patch ensures it's updated to status and uploaded as long as any packet is captured.It also makes some style improvements and simplifies a few code.
Follows up #6756