-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Incorrectly compressed output artifact on Windows #10562
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions. |
Unfortunately this issue is still affecting our environment. We was able to overcome the situation with disabling compression and handling the artifacts differently, but it would be nice to see this issue resolved some way. |
This issue seems to be caused by the way how tar archives are created in util/archive/archive.go tarDir() There the nameInArchive for each file is determined which ends up in the tar file as a file header. This works fine on Linux but on Windows a path with backslashes instead of forward slashes is written to the tar file. When such a tar file the is unpacked on Linux the result is as described above (the directory structure is lost and the complete path with backslashes is ending up in the filename). |
So we should always use forward slashes in the header? Since that seems to work on both platforms. |
@Transmitt0r I tried with forward slashes as you can see in the example, but unfortunately it did not work fine for me. |
@Transmitt0r Yes, changing the code to always use forward slashes in the header worked for me. After that the .tgz output artifacts produced by a Windows step could be used as input artifacts for Windows and Linux steps. When opening the created .tgz files with something like 7-zip they also had the right directory structure only when they had forward slashes as directory seperators. |
@PeterKoegel Which version did you use for checking this? |
@kalb I will create a pull request today with the changes I did to get it work. I had to change a line of code that creates the tar files and build my own argoexec container from that. |
Awesome, ty @PeterKoegel |
…Fixes argoproj#10562 (argoproj#11097) Signed-off-by: Peter Kögel <peter.koegel@vector.com>
…Fixes argoproj#10562 (argoproj#11097) Signed-off-by: Peter Kögel <peter.koegel@vector.com> Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Pre-requisites
:latest
What happened/what you expected to happen?
Output archive artifact compress folder incorrectly in case of windows image. Instead of keeping the folder structure, it puts all files in the root folder and appends the folder names to the file names, e.g structure:
argo_test/
|----- test.txt
In the compressed artifact, there will be the empty argo_test folder and the file called argo_test\test.txt
The problem does not persist on Linux pods.
I assume this should be a 7zip misconfiguration.
Version
v3.4.4
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container
The text was updated successfully, but these errors were encountered: