Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32150

Cannot resolve relative filenames referencing parent directory

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: warnings-plugin
    • Labels:
      None
    • Environment:
      Ubuntu 15.10 64 bit, OpenJDK
      Jenkins 1.642
      Warnings plug-in 4.51
    • Similar Issues:

      Description

      Warnings plugin cannot resolve some relative file names even if "Resolve relative paths" option is set. There are problems with names such as ../file. In that case it cannot find that file even if its name is unique across the entire workspace (but it can resolve "file" without ".." in the same build).

      STEPS TO REPRODUCE

      1. Create empty Git repository
      2. Unpack the archive attached and commit
      3. Create new Freestyle project
        • source control: git
        • build steps: none
        • post-build steps: scan workspace files (compile-log.txt, "Clang (LLVM based)"), set the "Resole relative paths" option
        • build is conducted on the master
      4. Build project and examine warnings

      WHAT IS EXPECTED
      On Files tab one should see one file.txt, one file-in-subdir.txt and one or several multi-file-in-subdir.txt (this file name contained multiple times in the workspace).
      For all warnings in file.txt and file-in-subdir.txt one can view source (because these files have unique names across workspace).

      WHAT HAPPENS
      file-in-subdir.txt is listed twice on Files tab. I cannot view source for warning where it is referenced as ../file-in-subdir.txt (but the source is viewable for warning without ".." in filename).

      CONTENTS OF hudson.plugins.analysis.core.ParserResult (FINE) LOG

      дек 20, 2015 3:07:21 PM FINE hudson.plugins.analysis.core.ParserResult
      Building cache of all workspace files to obtain absolute filenames for all warnings: /var/lib/jenkins/workspace/Test
      дек 20, 2015 3:07:21 PM FINE hudson.plugins.analysis.core.ParserResult
      Absolute filename could not be resolved for: ../multi-file-in-subdir.txt. Found multiple matches: [directory-b/multi-file-in-subdir.txt, directory-a/multi-file-in-subdir.txt]. 
      дек 20, 2015 3:07:21 PM FINE hudson.plugins.analysis.core.ParserResult
      Absolute filename could not be resolved for: ../file-in-subdir.txt. Found multiple matches: [directory-a/file-in-subdir.txt]. 
      дек 20, 2015 3:07:21 PM FINE hudson.plugins.analysis.core.ParserResult
      Absolute filename could not be resolved for: multi-file-in-subdir.txt. Found multiple matches: [directory-b/multi-file-in-subdir.txt, directory-a/multi-file-in-subdir.txt]. 
      дек 20, 2015 3:07:21 PM FINE hudson.plugins.analysis.core.ParserResult
      Absolute filename could not be resolved for: multi-file-in-subdir.txt. Found multiple matches: [directory-b/multi-file-in-subdir.txt, directory-a/multi-file-in-subdir.txt]. 
      дек 20, 2015 3:07:21 PM FINE hudson.plugins.analysis.core.ParserResult
      Absolute filename could not be resolved for: ../file-in-subdir.txt. Found multiple matches: [directory-a/file-in-subdir.txt]. 
      дек 20, 2015 3:07:21 PM FINE hudson.plugins.analysis.core.ParserResult
      Absolute filename could not be resolved for: ../multi-file-in-subdir.txt. Found multiple matches: [directory-b/multi-file-in-subdir.txt, directory-a/multi-file-in-subdir.txt]. 
      

      ERRROR MESSAGE

      01 Copying the source file '../file-in-subdir.txt' from the workspace to the build folder '53f2b315.tmp' on the Jenkins master failed.
      02 Seems that the path is relative, however an absolute path is required when copying the sources.
      03 Is the file 'file-in-subdir.txt' contained more than once in your workspace?
      04 Is the file '../file-in-subdir.txt' a valid filename?
      05 If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]/../file-in-subdir.txt'
      06 If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace/../file-in-subdir.txt'
      07 java.io.IOException: Failed to copy ../file-in-subdir.txt to /var/lib/jenkins/jobs/Test/builds/2/workspace-files/53f2b315.tmp
      08   at hudson.FilePath.copyTo(FilePath.java:1990)
      09   at hudson.plugins.analysis.util.Files.copyFilesWithAnnotationsToBuildFolder(Files.java:80)
      10   at hudson.plugins.analysis.core.HealthAwareRecorder.copyFilesWithAnnotationsToBuildFolder(HealthAwareRecorder.java:312)
      11   at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:89)
      12   at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:259)
      13   at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      14   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      15   at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      16   at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      17   at hudson.model.Build$BuildExecution.post2(Build.java:185)
      18   at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      19   at hudson.model.Run.execute(Run.java:1763)
      20   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      21   at hudson.model.ResourceController.execute(ResourceController.java:98)
      22   at hudson.model.Executor.run(Executor.java:410)
      23 Caused by: java.io.FileNotFoundException: ../file-in-subdir.txt (Нет такого файла или каталога)
      24   at java.io.FileInputStream.open(Native Method)
      25   at java.io.FileInputStream.<init>(FileInputStream.java:146)
      26   at hudson.FilePath$41.invoke(FilePath.java:2016)
      27   at hudson.FilePath$41.invoke(FilePath.java:2011)
      28   at hudson.FilePath.act(FilePath.java:990)
      29   at hudson.FilePath.act(FilePath.java:968)
      30   at hudson.FilePath.copyTo(FilePath.java:2011)
      31   at hudson.FilePath.copyTo(FilePath.java:1985)
      32   ... 14 more
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            warnings.iml
            http://jenkins-ci.org/commit/warnings-plugin/2d4a3538a2d2f589bff5b9dfaa23f2dd513d3b11
            Log:
            JENKINS-32150 Provide empty list of project actions for pipelines.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: warnings.iml http://jenkins-ci.org/commit/warnings-plugin/2d4a3538a2d2f589bff5b9dfaa23f2dd513d3b11 Log: JENKINS-32150 Provide empty list of project actions for pipelines.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            warnings
            http://jenkins-ci.org/commit/analysis-suite-plugin/4588a46a2217328dd50354d464ba3d569159df92
            Log:
            JENKINS-32150 Provide empty list of project actions for pipelines.

            Compare: https://github.com/jenkinsci/analysis-suite-plugin/compare/b0b48021263d...4588a46a2217

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: warnings http://jenkins-ci.org/commit/analysis-suite-plugin/4588a46a2217328dd50354d464ba3d569159df92 Log: JENKINS-32150 Provide empty list of project actions for pipelines. Compare: https://github.com/jenkinsci/analysis-suite-plugin/compare/b0b48021263d...4588a46a2217
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java
            http://jenkins-ci.org/commit/analysis-core-plugin/30a7d58bb8e156df8b30d32c917931796b43199e
            Log:
            Revert "JENKINS-32150 Provide empty list of project actions for pipelines."

            This reverts commit 6a00e71041c0c60fa6f52b786ea54d36ad573cc5.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java http://jenkins-ci.org/commit/analysis-core-plugin/30a7d58bb8e156df8b30d32c917931796b43199e Log: Revert " JENKINS-32150 Provide empty list of project actions for pipelines." This reverts commit 6a00e71041c0c60fa6f52b786ea54d36ad573cc5.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java
            http://jenkins-ci.org/commit/analysis-core-plugin/599fa66cb0134c22f0a9164949ca81d7635e7d8f
            Log:
            JENKINS-32150 Provide empty list of project actions for pipelines.

            Compare: https://github.com/jenkinsci/analysis-core-plugin/compare/01ff09ec265b...599fa66cb013

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java http://jenkins-ci.org/commit/analysis-core-plugin/599fa66cb0134c22f0a9164949ca81d7635e7d8f Log: JENKINS-32150 Provide empty list of project actions for pipelines. Compare: https://github.com/jenkinsci/analysis-core-plugin/compare/01ff09ec265b...599fa66cb013
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java
            http://jenkins-ci.org/commit/analysis-core-plugin/43c6179989cd318bb45eef2225ad7ec75d44ced5
            Log:
            Revert "JENKINS-32150 Provide empty list of project actions for pipelines."

            This reverts commit 599fa66cb0134c22f0a9164949ca81d7635e7d8f.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java http://jenkins-ci.org/commit/analysis-core-plugin/43c6179989cd318bb45eef2225ad7ec75d44ced5 Log: Revert " JENKINS-32150 Provide empty list of project actions for pipelines." This reverts commit 599fa66cb0134c22f0a9164949ca81d7635e7d8f.

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                atrosinenko Anatoly Trosinenko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: