-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
[JENKINS-37694] Display artifacts of a running build #5496
Conversation
building=\ | ||
The build is still in progress. \ | ||
Some artifacts are present but the list may be incomplete. \ | ||
Artifacts still being written may even be corrupt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File corruption could potentially be avoided if
jenkins/core/src/main/java/hudson/FilePath.java
Lines 2838 to 2853 in 52acfa9
File f = new File(baseDir, te.getName()); | |
if (!f.toPath().normalize().startsWith(baseDir.toPath())) { | |
throw new IOException( | |
"Tar " + name + " contains illegal file name that breaks out of the target directory: " + te.getName()); | |
} | |
if (te.isDirectory()) { | |
mkdirs(f); | |
} else { | |
File parent = f.getParentFile(); | |
if (parent != null) mkdirs(parent); | |
writing(f); | |
if (te.isSymbolicLink()) { | |
new FilePath(f).symlinkTo(te.getLinkName(), TaskListener.NULL); | |
} else { | |
IOUtils.copy(t, f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems a bit weird to include the last line in a user facing message =/.
I would omit it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it could potentially happen to you that the build happens to be in the middle of archiving some 3Gb binary, and you see it listed on the artifacts page and innocently go to download it and get a partial file. Rather unlikely in practice but seems appropriate to note the possibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to just fix the issue and prevent corruption?
As in #5496 (comment) I think the risk involved in changing how the general tar function works, especially verifying that this works properly on Windows and NFS (how many times have we patched the likes of Also note that users of |
See JENKINS-37694.
Proposed changelog entries
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).