Closed timja closed 8 years ago
What happens when you use patterns containing "?" or "*" in the search/filter box of the artifact/workspace browser? Do those fail as well?
gaku:
In workspace browser I can "pack" files to zip clicking ("All files in zip") and patterns works.
In artifact browser I cannot pack files to zip, and pattern *.csproj returns error but ?.csproj return all files and folders. No error. Don't know if this is right behaviour.
gaku Would you be willing to test a custom build of Jenkins? I don't have a Windows machine around at the moment.
gaku:
Yep. I can deploy it on our test jenkins and check you custom build.
Pull request: https://github.com/jenkinsci/jenkins/pull/1875
PR build: https://jenkins.ci.cloudbees.com/job/core/job/jenkins-core/3387/ – download the war created there. There have been no notable changes to the master branch since 1.634 was released, so that should be safe enough to try.
I see Daniel's pull request simply swallows the exception thrown from deeper. Why is the exception now being thrown from deeper? The most recent commit I can see that could've caused this is:
It's possible we could change that part to not throw, I opted for the lower impact approach here – I doubt we'll be handling made up paths a lot.
gaku:
danielbeck your build solved bug with archiving artifacts but there still is a problem with Search of artifacts.
*Copy*
works in workspace, but it doesn't work in artifacts.
I guess my concern is what was the intent of "VirtualFile$FileVF.isIllegalSymlink" or "VirtualFile$FileVF.exists"? Those return bool. Would an illegal file path "not exist" (return false), or throw an exception as it does now? Because if the deeper code instead catches the platform-specific exception and return false, then none of the shallower code needs to change.
DISCLAIMER: I may not know what I'm talking about.
I observed the same issue after upgrading to 1.634 (on Win2012 x64). I had to rollback to 1.633 as the test framework depends on downloading the whole artifact pack as ZIP.
1.633 works fine.
I have the same issue when trying to view build artifacts (clicking on 'view' link). The error is
java.nio.file.InvalidPathException: Illegal char <*> at index 87: D:\Jenkins\jobs\C8-develop-unit-tests-oracle\builds\1061\archive\Log\C8\pi_centric.log\*view*
with the same stack trace as reported. Jenkins version is 1.635 (Win 2008 R2 x64).
Issue confirmed on Windows 7 and Jenkins 1.634 and Jenkins 1.635.
Jenkins 1.631 on windows 7 does not have this issue.
java.nio.file.InvalidPathException: Illegal char <> at index 53: D:\Jenkins\jobs\ME-1312-3-BaseTest\builds\12\archive*zip
occurs when the link :
http://ldc1-server-1:8080/view/ME/job/ME-1312-3-BaseTest/lastSuccessfulBuild/artifact/*zip*/archive.zip
(or with FQDN)
http://ldc1-server-1.md-man.biz:8080/view/ME/job/ME-1312-3-BaseTest/lastSuccessfulBuild/artifact/*zip*/archive.zip
was clicked (none of the servers are publicly accessible).
gaku:
What is stoping this fix from going to release version? Just as a reminder, this is big problem for lots of people.
I think that's stopping it is questions from Oct 19 about whether it's the right fix, and comments on Oct 20 indicating that this fix doesn't fix all paths.
I plan to take a look later this week, so this gets into next week's release if all goes well.
I like the weekly updates but in the production environment I will switch to the LTS release line. Keep up the good work.
Updated the PR @ https://github.com/jenkinsci/jenkins/pull/1875 to catch the exception at the source.
I guess I'll need to set up a Windows VM here to test the observation by agavrilov? Or anyone else willing to test this build?
har:
Maybe it's possible to resolve JENKINS-9146 in the course of this task too?
I can test a new release. I would need a link to the new jenkins.war file for download.
nkjensen Thanks. I was busy with the security update for the last week, so I made no progress here. I restarted the PR build, war will be downloadable from https://jenkins.ci.cloudbees.com/job/core/job/jenkins-core/3503/ once the build is complete.
About Jakub Gawlas's comment: I tried this pattern:
*.cmd
in a directory in the workspace. It worked fine.
I tried cmd* too and it returns a 404 since nothing matches. I guess that is correct behaviour?
About Alexander Gavrilov's comment:
I tried to browse into a directory in our artifacts tree and "view" a regular file as text (clicking "view" in the right side of the line), it also worked.
Clicking the filename itself downloads the file (no regression).
BR. NKJ
Code changed in jenkins
User: Daniel Beck
Path:
core/src/main/java/jenkins/util/VirtualFile.java
http://jenkins-ci.org/commit/jenkins/3450b52a8ac90c357fb96a67c58eaf2b8e68d01c
Log:
[FIX JENKINS-31015] Prevent InvalidPathException in FileVF
Code changed in jenkins
User: Daniel Beck
Path:
core/src/main/java/jenkins/util/VirtualFile.java
http://jenkins-ci.org/commit/jenkins/eeff84aff3ffb6499a0f4060a39f1182e400bb9a
Log:
Merge pull request #1875 from daniel-beck/JENKINS-31015
[FIX JENKINS-31015] Prevent InvalidPathException in FileVF
Compare: https://github.com/jenkinsci/jenkins/compare/286475f9abc1...eeff84aff3ff
Integrated in jenkins_main_trunk #4364
[FIX JENKINS-31015] Prevent InvalidPathException in FileVF (Revision 3450b52a8ac90c357fb96a67c58eaf2b8e68d01c)
Result = UNSTABLE
daniel-beck : 3450b52a8ac90c357fb96a67c58eaf2b8e68d01c
Files :
Jenkins ver. 1.638
Windows 7 x86
Java: jre1.8.0_66
The problem is still exists in ver.1.638.
java.nio.file.InvalidPathException: Illegal char <> at index 72: C:\Program Files\Jenkins\jobs\project_name\builds\118\archive*zip
at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPath.parse(Unknown Source)
at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
at java.io.File.toPath(Unknown Source)
Just compare the date the fix was merged to the release date of 1.638.
IOW, fixed towards 1.639.
any info on when this fix will be available for download?
The new version 1.639 is available, but on Jenkins (windows) I don`t see this new version via Jenkins web.
Here is the link with available 1.639 version:
http://updates.jenkins-ci.org/download/war/1.639/jenkins.war
I don`t understand what happens, but after reopen this ticket, I saw the new version on Jenkins.
Sorry for inconvenience.
[Originally duplicated by: JENKINS-31434]
[Originally duplicated by: JENKINS-31226]
[Originally related to: JENKINS-31682]
While downloading artifacts in zip (whole folder) error appears:
Originally reported by gaku, imported from: Failure when downloading zipped artifacts