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

Expand relative paths even if 'resolve relative paths option' is not checked

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-plugin
    • Master and slave on Ubuntu OS
      Jenkins 1.466.2
      Warnings plugin 4.28

      Checking of the new warnings of a PyLint report via source code browser doesn't work, the source file copying fails.

      There is some questions in the browser presented when this is tried, I've answered to the end of each line:

      Is the file 'testfile.py' contained more than once in your workspace? -> NO
      Is the file 'trunk/testfile.py' a valid filename? -> Seems perfectly valid to me
      If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]/trunk/testfile.py' -> Hmm, shouldn't there be 'workspace' before the [job-name]? So the answer to the question is NO
      If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace/trunk/testfile.py' -> Not building on the master

      Full text attached.

      BTW, http://jenkinsmaster.net:8080/view/pylint/job/pylint_ciapp/ws/trunk/testfile.py/*view*/ WORKS.

          [JENKINS-19689] Expand relative paths even if 'resolve relative paths option' is not checked

          Ulli Hafner added a comment - - edited

          Can you please attach the serialization of the warning in your build folder? There should be a file called pylint-warnings.xml.

          And please check if the option "resolve relative paths" is set in the configuration of the warning plugin.

          Ulli Hafner added a comment - - edited Can you please attach the serialization of the warning in your build folder? There should be a file called pylint-warnings.xml. And please check if the option "resolve relative paths" is set in the configuration of the warning plugin.

          tiainpa added a comment -

          Well that settles it, 'resolve relative paths' got this working. I read about that option from some other Jira but didn't look it up then.

          I guess there's no need for serialization file anymore in this case?

          Thanks Ulli for the quick help!

          tiainpa added a comment - Well that settles it, 'resolve relative paths' got this working. I read about that option from some other Jira but didn't look it up then. I guess there's no need for serialization file anymore in this case? Thanks Ulli for the quick help!

          Ulli Hafner added a comment - - edited

          No, I don't need the serialization anymore.

          Actually the option is confusing, I need to change that. Currently if checked it does two things: it concatenates the workspace path and the relative filename. And if that does not resolve to a valid filename, it scans the whole workspace for the files. In your case only the first part is needed...

          Ulli Hafner added a comment - - edited No, I don't need the serialization anymore. Actually the option is confusing, I need to change that. Currently if checked it does two things: it concatenates the workspace path and the relative filename. And if that does not resolve to a valid filename, it scans the whole workspace for the files. In your case only the first part is needed...

          D J added a comment -

          I have the same problem, on my slave builder the warnings plugin can not locate the source code file. Below are the error messages printed:

          Copying the source file 'protocol/lib/mtb/xmtp_eekrbkey.cc' from the workspace to the build folder '/work/jenkins/jenkins_home/jobs/kauai-protocol-tests/builds/2014-01-16_09-22-25/workspace-files/54c3cb11.tmp' on the Jenkins master failed.
          Seems that the path is relative, however an absolute path is required when copying the sources.
          Is the file 'xmtp_eekrbkey.cc' contained more than once in your workspace?
          Is the file 'protocol/lib/mtb/xmtp_eekrbkey.cc' a valid filename?
          If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]/protocol/lib/mtb/xmtp_eekrbkey.cc'
          If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace/protocol/lib/mtb/xmtp_eekrbkey.cc'

          Here are the Linux environment variables present when building this job:

          WORKSPACE=/work/jenkins/node-pyrite/workspace/kauai-protocol-tests
          JENKINS_HOME=/work/jenkins/jenkins_home
          PWD=/work/jenkins/node-pyrite/workspace/kauai-protocol-tests
          JOB_NAME=kauai-protocol-tests
          HOSTNAME=pyrite

          As you can see the WORKSPACE path is different than the JENKINS_HOME path and the proposed expansion will not produce any valid absolute pathname.

          D J added a comment - I have the same problem, on my slave builder the warnings plugin can not locate the source code file. Below are the error messages printed: Copying the source file 'protocol/lib/mtb/xmtp_eekrbkey.cc' from the workspace to the build folder '/work/jenkins/jenkins_home/jobs/kauai-protocol-tests/builds/2014-01-16_09-22-25/workspace-files/54c3cb11.tmp' on the Jenkins master failed. Seems that the path is relative, however an absolute path is required when copying the sources. Is the file 'xmtp_eekrbkey.cc' contained more than once in your workspace? Is the file 'protocol/lib/mtb/xmtp_eekrbkey.cc' a valid filename? If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/ [job-name] /protocol/lib/mtb/xmtp_eekrbkey.cc' If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/ [job-name] /workspace/protocol/lib/mtb/xmtp_eekrbkey.cc' Here are the Linux environment variables present when building this job: WORKSPACE=/work/jenkins/node-pyrite/workspace/kauai-protocol-tests JENKINS_HOME=/work/jenkins/jenkins_home PWD=/work/jenkins/node-pyrite/workspace/kauai-protocol-tests JOB_NAME=kauai-protocol-tests HOSTNAME=pyrite As you can see the WORKSPACE path is different than the JENKINS_HOME path and the proposed expansion will not produce any valid absolute pathname.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/analysis/core/FilesParser.java
          src/main/java/hudson/plugins/analysis/core/ParserResult.java
          src/test/java/hudson/plugins/analysis/core/ParserResultTest.java
          http://jenkins-ci.org/commit/analysis-core-plugin/44c263a4904a6f895f1e8336c871202ada041c37
          Log:
          [FIXED JENKINS-19689] Improved option resolve relative paths:
          Always concatenate workspace prefix and relative path suffix,

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/FilesParser.java src/main/java/hudson/plugins/analysis/core/ParserResult.java src/test/java/hudson/plugins/analysis/core/ParserResultTest.java http://jenkins-ci.org/commit/analysis-core-plugin/44c263a4904a6f895f1e8336c871202ada041c37 Log: [FIXED JENKINS-19689] Improved option resolve relative paths: Always concatenate workspace prefix and relative path suffix,

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/warnings/WarningsPublisher.java
          http://jenkins-ci.org/commit/warnings-plugin/4605175e8aae6c16b169cd35bca2441c91738d10
          Log:
          [FIXED JENKINS-19689] Improved option resolve relative paths:
          Always concatenate workspace prefix and relative path suffix,

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/WarningsPublisher.java http://jenkins-ci.org/commit/warnings-plugin/4605175e8aae6c16b169cd35bca2441c91738d10 Log: [FIXED JENKINS-19689] Improved option resolve relative paths: Always concatenate workspace prefix and relative path suffix,

            drulli Ulli Hafner
            tiainpa tiainpa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: