Skip to content
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

PodUpload silently fails to upload files with long file names. #2871

Closed
msinger-dev opened this issue Mar 4, 2021 · 2 comments · Fixed by #2873 or jenkinsci/kubernetes-client-api-plugin#83

Comments

@msinger-dev
Copy link
Contributor

While investigating a test failure we found out, that PodUpload has problems with long file names. The culprit for that is the following line:
try (final TarArchiveOutputStream tar = new TarArchiveOutputStream(gzip)) {
(io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUpload:111)

When creating a TarArchiveOutputStream without any additional configuration. the longFileMode member is set to

/**
     * Fail if a long file name is required in the archive.
     */
    public static final int LONGFILE_ERROR = 0;

This option lets the upload fail once we encounter a file with a long relative file path. Another problem we found is that the exception thrown by this error is silently ignored.

@msinger-dev msinger-dev changed the title PodUpload silently fails to upload files with long Filenames. PodUpload silently fails to upload files with long file names. Mar 4, 2021
@rohanKanojia
Copy link
Member

@msinger-dev : Thanks a lot for reporting this. I think we're close to releasing our next release in coming weeks. Would it be possible for you to submit fixes for the issues you found if you have time?

@msinger-dev
Copy link
Contributor Author

Yes, will do so.

msinger-dev added a commit to msinger-dev/kubernetes-client that referenced this issue Mar 4, 2021
…r in PodUpload, improve exception handling in PodUpload.
msinger-dev added a commit to msinger-dev/kubernetes-client that referenced this issue Mar 5, 2021
…r in PodUpload, improve exception handling in PodUpload.
msinger-dev added a commit to msinger-dev/kubernetes-client that referenced this issue Mar 8, 2021
…r in PodUpload, improve exception handling in PodUpload.
manusa pushed a commit that referenced this issue Mar 9, 2021
…pload, improve exception handling in PodUpload.
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment