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

A recent update breaks builds by escaping slashes to percent signs in workspace paths

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • branch-api-plugin
    • None
    • Windows
    • 2.1.2

      After a recent update, slashes in git branches (e.g. bugfix/branch-description) are escaped into workspace path names using %2F, as in wkspacepath/bugfix%2Fbranch-description. This breaks the build on my windows machine. The slashes used to be translated to underscores.

          [JENKINS-54654] A recent update breaks builds by escaping slashes to percent signs in workspace paths

          Øyvind R created issue -

          Øyvind R added a comment -

          Same update caused JENKINS-54640

          Øyvind R added a comment - Same update caused JENKINS-54640
          Øyvind R made changes -
          Link New: This issue relates to JENKINS-44360 [ JENKINS-44360 ]
          Øyvind R made changes -
          Link New: This issue relates to JENKINS-54640 [ JENKINS-54640 ]
          Jesse Glick made changes -
          Component/s New: branch-api-plugin [ 18621 ]
          Component/s Original: pipeline [ 21692 ]
          Component/s Original: pipeline-multibranch-defaults-plugin [ 21926 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-2111 [ JENKINS-2111 ]

          Jesse Glick added a comment -

          Please follow the diagnostic instructions given in JENKINS-2111.

          Jesse Glick added a comment - Please follow the diagnostic instructions given in JENKINS-2111 .

          Øyvind R added a comment -

          Thanks jglick. JENKINS 2111 has a very long thread, and I'm not sure which instructions you are talking about. If it's about adding -Djenkins.branch.WorkspaceLocatorImpl.MODE=ENABLED, I tried this with no luck.

          Øyvind R added a comment - Thanks jglick . JENKINS 2111 has a very long thread, and I'm not sure which instructions you are talking about. If it's about adding -Djenkins.branch.WorkspaceLocatorImpl.MODE=ENABLED, I tried this with no luck.

          Jesse Glick added a comment -

          godskalk sorry, I should have repeated the critical bit: install this build and create a logger (Manage Jenkins » System Log) on jenkins.branch.WorkspaceLocatorImpl recording at least FINER and check for messages there when you build a branch project for the first time on a given agent. Also check whether …\workspaceroot\workspaces.txt exists and, if so, what it contains.

          It is helpful to install the Support Core plugin (optionally enabling anonymization) and capturing a bundle after observing the problem, either attaching it here after review for sensitive information or mailing it to jglick-at-cloudbees.com directly, as that will capture the full custom logger output very readably and also indicate whether there are other log warnings, unusual configuration elements, etc. that could point to the problem.

          Jesse Glick added a comment - godskalk sorry, I should have repeated the critical bit: install this build and create a logger ( Manage Jenkins » System Log ) on jenkins.branch.WorkspaceLocatorImpl recording at least FINER and check for messages there when you build a branch project for the first time on a given agent. Also check whether …\workspaceroot\workspaces.txt exists and, if so, what it contains. It is helpful to install the Support Core plugin (optionally enabling anonymization) and capturing a bundle after observing the problem, either attaching it here after review for sensitive information or mailing it to jglick-at-cloudbees.com directly, as that will capture the full custom logger output very readably and also indicate whether there are other log warnings, unusual configuration elements, etc. that could point to the problem.

          This problem appeared after I did an upgrade. I tried to restore to previous version and plugins but problem persisted. I enabled a log as noted above and found a message: JENKINS-2111 path sanitization ineffective when using legacy workspace root directory c:\JenkinsWorkspace\${ITEM_FULLNAME}; switch to ${JENKINS_HOME}/workspace/${ITEM_FULLNAME}

          so I did and its working now!

          This did move to a new workplace so all the directories are now so I don't know if that fixed it or the form of the path. Note the slashes were reversed. Before this Jenkins was creating a working directory simply with the first part of the name , e.g. QA/V2018 became QA

          Stephen Morley added a comment - This problem appeared after I did an upgrade. I tried to restore to previous version and plugins but problem persisted. I enabled a log as noted above and found a message: JENKINS-2111 path sanitization ineffective when using legacy workspace root directory c:\JenkinsWorkspace\${ITEM_FULLNAME}; switch to ${JENKINS_HOME}/workspace/${ITEM_FULLNAME} so I did and its working now! This did move to a new workplace so all the directories are now so I don't know if that fixed it or the form of the path. Note the slashes were reversed. Before this Jenkins was creating a working directory simply with the first part of the name , e.g. QA/V2018 became QA

            jglick Jesse Glick
            godskalk Øyvind R
            Votes:
            2 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: