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

Variable in the URL string is not correctly handled in Subversion Plugin 1.28

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • subversion-plugin
    • None

      There is a subversion checkout bug which I think was introduced in the Subversion plugin v1.28. I have have URLs of the form https://mysvnserver/project/trunk/builder${SVN_revision_requested}. The variable in the URL is a string parameter from the parameterized build, and is defaulting to blank (null).

      I got this error in Jenkins 1.417 + Subversion plugin 1.28:
      org.tmatesoft.svn.core.SVNException: svn: URL 'https://mysvnserver/project/trunk/builder$%7BSVN_revision_requested%7D' doesn't exist

      Reverting the plugin to v1.26 made the problem go away.

          [JENKINS-10045] Variable in the URL string is not correctly handled in Subversion Plugin 1.28

          kutzi added a comment -

          Probably caused by the fix for JENKINS-9925

          kutzi added a comment - Probably caused by the fix for JENKINS-9925

          Romain Seguy added a comment -

          I confirm the bug: It happens if and only if the build parameter is blank. It doesn't happen if the parameter is a blank environment variable, or when the build parameter has a value (even a space).

          This is because EnvVars.overrideAll() drops variables when they are null or when they have 0 characters (I'll fill an issue for that, this is weird).

          Romain Seguy added a comment - I confirm the bug: It happens if and only if the build parameter is blank. It doesn't happen if the parameter is a blank environment variable, or when the build parameter has a value (even a space). This is because EnvVars.overrideAll() drops variables when they are null or when they have 0 characters (I'll fill an issue for that, this is weird).

          Romain Seguy added a comment -

          I'm currently fixing it.

          Romain Seguy added a comment - I'm currently fixing it.

          Romain Seguy added a comment -

          Fixed (by altering the behavior of EnvVars).

          Romain Seguy added a comment - Fixed (by altering the behavior of EnvVars).

          Code changed in jenkins
          User: rseguy
          Path:
          src/main/java/hudson/scm/EnvVarsUtils.java
          src/main/java/hudson/scm/SubversionSCM.java
          src/test/java/hudson/scm/SubversionSCMTest.java
          http://jenkins-ci.org/commit/subversion-plugin/7670763631c3e165a34923bc3c10c353975dc99d
          Log:
          [FIXED JENKINS-10045]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rseguy Path: src/main/java/hudson/scm/EnvVarsUtils.java src/main/java/hudson/scm/SubversionSCM.java src/test/java/hudson/scm/SubversionSCMTest.java http://jenkins-ci.org/commit/subversion-plugin/7670763631c3e165a34923bc3c10c353975dc99d Log: [FIXED JENKINS-10045]

          Code changed in jenkins
          User: rseguy
          Path:
          src/main/java/hudson/scm/EnvVarsUtils.java
          src/main/java/hudson/scm/SubversionSCM.java
          src/test/java/hudson/scm/SubversionSCMTest.java
          http://jenkins-ci.org/commit/subversion-plugin/7670763631c3e165a34923bc3c10c353975dc99d
          Log:
          [FIXED JENKINS-10045]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rseguy Path: src/main/java/hudson/scm/EnvVarsUtils.java src/main/java/hudson/scm/SubversionSCM.java src/test/java/hudson/scm/SubversionSCMTest.java http://jenkins-ci.org/commit/subversion-plugin/7670763631c3e165a34923bc3c10c353975dc99d Log: [FIXED JENKINS-10045]

          Hua Zhang added a comment -

          Is this issue related to JENKINS-4547?

          Hua Zhang added a comment - Is this issue related to JENKINS-4547 ?

          Romain Seguy added a comment -

          No, it's not, JENKINS-4547 is for the "Local module directory (optional)" field.

          Romain Seguy added a comment - No, it's not, JENKINS-4547 is for the "Local module directory (optional)" field.

            rseguy Romain Seguy
            mwebber Matthew Webber
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: