fix: pcap file name formatting#1749
Merged
kamilprz merged 4 commits intoJul 28, 2025
Merged
Conversation
Signed-off-by: Kamil <kamil.prz@gmail.com>
Signed-off-by: Kamil <kamil.prz@gmail.com>
Signed-off-by: Kamil <kamil.prz@gmail.com>
SRodi
reviewed
Jul 17, 2025
mereta
pushed a commit
that referenced
this pull request
Dec 2, 2025
# Description Fix the bad formatting of the pcap file names when running `retina capture create`. Also adding testing for the utilities around how file names are created. ## Related Issue #1732 ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/Contributing/overview). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed <img width="450" height="47" alt="{D77C22CD-6FFA-44A0-B15B-B89E4542A2A2}" src="https://github.com/user-attachments/assets/306fa604-0162-49c8-bb07-0645df04ea84" /> The below shows a successful download of a packet capture which is then extracted. The final grep shows the file name of the `.pcap` which is in the same format as the `.tar.gz`. ``` ~/src/retina git:kamilp/capture-filename-format > k retina capture download --name pcap-filename -o ./downloads File to be downloaded: /host/mnt/retina/captures/pcap-filename-aks-agentpool-33289083-vmss000000-20250716220911UTC.tar.gz Creating download pod: pcap-filename-download-d49wc Obtaining file... Bytes retrieved: 189453 File written to: downloads/pcap-filename/pcap-filename-aks-agentpool-33289083-vmss000000-20250716220911UTC.tar.gz File to be downloaded: /host/mnt/retina/captures/pcap-filename-aks-agentpool-33289083-vmss000001-20250716220911UTC.tar.gz Creating download pod: pcap-filename-download-t86dl Obtaining file... Bytes retrieved: 277310 File written to: downloads/pcap-filename/pcap-filename-aks-agentpool-33289083-vmss000001-20250716220911UTC.tar.gz ~/src/retina git:kamilp/capture-filename-format* > cd ./downloads/ ~/src/retina/downloads git:kamilp/capture-filename-format* > mkdir extract ~/src/retina/downloads git:kamilp/capture-filename-format* > tar -xvf pcap-filename/pcap-filename-aks-agentpool-33289083-vmss000001-20250716220911UTC.tar.gz -C extract/ ~/src/retina/downloads git:kamilp/capture-filename-format* > cd extract/ ~/src/retina/downloads/extract git:kamilp/capture-filename-format* > ll | grep ".pcap" .rw-r--r-- kamilp 557 KB 2025-07-16 23:09:23 pcap-filename-aks-agentpool-33289083-vmss000001-20250716220911UTC.pcap --------- Signed-off-by: Kamil <kamil.prz@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix the bad formatting of the pcap file names when running
retina capture create.Also adding testing for the utilities around how file names are created.
Related Issue
#1732
Checklist
git commit -S -s ...). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
The below shows a successful download of a packet capture which is then extracted. The final grep shows the file name of the
.pcapwhich is in the same format as the.tar.gz.