• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ant-plugin
    • None
    • windows server, hudson 1.351, standalone container

      I just updated to 1.351 today and noticed that a problem cropped up with a job config that was working under 1.348 this morning.

      I have a freestyle job with 2 ant tasks with one task that references another "enterprise" job using this type of config.


      Ant version: Ant 1.7.1
      build file: ${WORKSPACE}/../../Enterprise/workspace/build/entbuild.xml
      targets: modifyenttarget

      Ant version: Ant 1.6.5
      build file: <-- normal default here, I actually didn't override.
      targets: clean buildall


      What I have found is it does not like the "../.." part of the path and truncates the path. So I switched it to using "..\.." in its place. (We are running on Windows with standalone container) That relative path worked.

      I have since rolled back to 1.348 and it is again working with the original relative path syntax.

      It may be related to this bug: http://issues.jenkins-ci.org/browse/JENKINS-3903

          [JENKINS-5951] Freestyle ant job - relative path errors

          riverofcode added a comment - - edited

          It is somewhat difficult to get the info out due to it being on a restricted server but here is some raw output. I did have to munge some of the non-problem info to protect the innocent.

          ---------------
          Messed up path on the "antfile.dir" property. this was called with "${WORKSPACE}/../../DM_Builder/workspace/dm-builder.xml" which got shortened to just the "../" part.

          U Documentation\Release Documentation\LocalFilename.xls
          At revision 1733
          FATAL: Unable to find build script at ../DM_Builder/workspace/build/dm-builder.xml
          Finished: FAILURE

          -------------------------------------

          Messed up path on the "antfile.dir" property. this was called with ${WORKSPACE}/../../trunk I believe. I had the "${WORKSPACE}/../../DM_Builder/workspace/dm-builder.xml" from above coded as "${WORKSPACE}\..\..\DM_Builder\workspace\dm-builder.xml" instead on this try. note the slashes are DOS versions.

          Started by user anonymous

          Updating svn://server/Application1/trunk

          At revision 1733

          no change for svn://server/Application1/trunk since the previous build

          [build] $ cmd.exe /C '"D:\Tools\ant\apache-ant-1.7.1\bin\ant.bat -file dm-builder.xml -Dantfile.dir=${WORKSPACE} runk modentbuildtgt && exit %%ERRORLEVEL%%"'

          Buildfile: dm-builder.xml

          BUILD FAILED

          Target "runk" does not exist in the project "dmbuilder".

          Total time: 0 seconds

          Finished: FAILURE
          -------------------------

          Correct behavior from build 1.348 hudson war...

          Started by user anonymous
          Updating svn://server/Application1/trunk At revision 1733 no change for svn://server/Application1/trunk since the previous build [build] $ cmd.exe /C '"D:\Tools\ant\apache-ant-1.7.1\bin\ant.bat -file dm-builder.xml -Dantfile.dir=${WORKSPACE}/trunk modentbuildtgt && exit %%ERRORLEVEL%%"'
          Buildfile: dm-builder.xml

          modentbuildtgt:
          [echo] Modifying enterprise:build target call to add quickbuild="true"
          [replace] Replaced 0 occurrences in 0 files.

          riverofcode added a comment - - edited It is somewhat difficult to get the info out due to it being on a restricted server but here is some raw output. I did have to munge some of the non-problem info to protect the innocent. --------------- Messed up path on the "antfile.dir" property. this was called with "${WORKSPACE}/../../DM_Builder/workspace/dm-builder.xml" which got shortened to just the "../" part. – U Documentation\Release Documentation\LocalFilename.xls At revision 1733 FATAL: Unable to find build script at ../DM_Builder/workspace/build/dm-builder.xml Finished: FAILURE ------------------------------------- Messed up path on the "antfile.dir" property. this was called with ${WORKSPACE}/../../trunk I believe. I had the "${WORKSPACE}/../../DM_Builder/workspace/dm-builder.xml" from above coded as "${WORKSPACE}\..\..\DM_Builder\workspace\dm-builder.xml" instead on this try. note the slashes are DOS versions. – Started by user anonymous Updating svn://server/Application1/trunk At revision 1733 no change for svn://server/Application1/trunk since the previous build [build] $ cmd.exe /C '"D:\Tools\ant\apache-ant-1.7.1\bin\ant.bat -file dm-builder.xml -Dantfile.dir=${WORKSPACE} runk modentbuildtgt && exit %%ERRORLEVEL%%"' Buildfile: dm-builder.xml BUILD FAILED Target "runk" does not exist in the project "dmbuilder". Total time: 0 seconds Finished: FAILURE ------------------------- Correct behavior from build 1.348 hudson war... – Started by user anonymous Updating svn://server/Application1/trunk At revision 1733 no change for svn://server/Application1/trunk since the previous build [build] $ cmd.exe /C '"D:\Tools\ant\apache-ant-1.7.1\bin\ant.bat -file dm-builder.xml -Dantfile.dir=${WORKSPACE}/trunk modentbuildtgt && exit %%ERRORLEVEL%%"' Buildfile: dm-builder.xml modentbuildtgt: [echo] Modifying enterprise:build target call to add quickbuild="true" [replace] Replaced 0 occurrences in 0 files.

          Alan Harder added a comment -

          I think it trims ".." in the path, not realizing there is variable expansion.. ie, "/abc/def/../ghi" can be trimmed to "/abc/ghi", but "/abc/${DEF}/../ghi" can't be trimmed the same way, since ${DEF} could have multiple path components.

          Alan Harder added a comment - I think it trims ".." in the path, not realizing there is variable expansion.. ie, "/abc/def/../ghi" can be trimmed to "/abc/ghi", but "/abc/${DEF}/../ghi" can't be trimmed the same way, since ${DEF} could have multiple path components.

          Alan Harder added a comment -

          hm.. no, I think variable expansion has already happened before path normalization.. still looking.

          Alan Harder added a comment - hm.. no, I think variable expansion has already happened before path normalization.. still looking.

          Alan Harder added a comment -

          These are the commits between 1.348 and 1.351 that changed the behavior:
          http://jenkins-ci.org/commit/27956
          http://jenkins-ci.org/commit/28142

          Alan Harder added a comment - These are the commits between 1.348 and 1.351 that changed the behavior: http://jenkins-ci.org/commit/27956 http://jenkins-ci.org/commit/28142

          Alan Harder added a comment -

          Ok, I think the mix of / and \ separators confused this new code.. since this in on windows, ${WORKSPACE} has \, but the part you entered used /

          Alan Harder added a comment - Ok, I think the mix of / and \ separators confused this new code.. since this in on windows, ${WORKSPACE} has \, but the part you entered used /

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/FilePath.java
          trunk/hudson/main/core/src/test/java/hudson/FilePathTest.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/30462
          Log:
          [FIXED JENKINS-5951] improve normalization of ".." in FilePath

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/FilePath.java trunk/hudson/main/core/src/test/java/hudson/FilePathTest.java trunk/www/changelog.html http://jenkins-ci.org/commit/30462 Log: [FIXED JENKINS-5951] improve normalization of ".." in FilePath

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/FilePath.java
          http://jenkins-ci.org/commit/30579
          Log:
          JENKINS-5951 yay for tests, fix error in new normalize() before it went in any release

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/FilePath.java http://jenkins-ci.org/commit/30579 Log: JENKINS-5951 yay for tests, fix error in new normalize() before it went in any release

          riverofcode added a comment -

          Can I safely assume that this made the 1.356 drop since I see that issue 6252 was picked up and its svn rev was higher that this commit? I didn't see this issue mentioned on the changelog unless there is a more extensive changelog for drops that I am not familiar with.

          riverofcode added a comment - Can I safely assume that this made the 1.356 drop since I see that issue 6252 was picked up and its svn rev was higher that this commit? I didn't see this issue mentioned on the changelog unless there is a more extensive changelog for drops that I am not familiar with.

          Alan Harder added a comment -

          No, it is in for 1.357 (trunk is branched sometime before each release, so the svn rev is not an indicator of what's in). On the changelog.html page if you do view-source you can find upcoming items in an html comment.. you'll see 5951 there.

          Alan Harder added a comment - No, it is in for 1.357 (trunk is branched sometime before each release, so the svn rev is not an indicator of what's in). On the changelog.html page if you do view-source you can find upcoming items in an html comment.. you'll see 5951 there.

          Alan Harder added a comment -

          oh, I meant svn rev of the svn tag for a release is not an indicator of what revs from trunk are in that release. In the case of 6252, notice there are 2 commits.. the 2nd test (a new test) is not in 1.356, but the fix itself is.

          Alan Harder added a comment - oh, I meant svn rev of the svn tag for a release is not an indicator of what revs from trunk are in that release. In the case of 6252, notice there are 2 commits.. the 2nd test (a new test) is not in 1.356, but the fix itself is.

            mindless Alan Harder
            riverofcode riverofcode
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: