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

show job difference does not work, url escaped twice

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When I select two Job configurations in the History page, and click "Show Diffs", I get an empty page.

      The generated URL looks like this:

      https://jenkins.local/jenkins/job/marc-test/jobConfigHistory/showDiffFiles?histDir1=%252Fvar%252Flib%252Fjenkins%252Fconfig-history%252Fjobs%252Fmarc-test%252F2012-12-18_13-03-39&histDir2=%252Fvar%252Flib%252Fjenkins%252Fconfig-history%252Fjobs%252Fmarc-test%252F2013-01-16_14-19-31
      

      Note that the slashes in the pathes are escaped twice (%252F). When I replace the %252F with %2F, it works:

      https://jenkins.local/jenkins/job/marc-test/jobConfigHistory/showDiffFiles?histDir1=%2Fvar%2Flib%2Fjenkins%2Fconfig-history%2Fjobs%2Fmarc-test%2F2012-12-18_13-03-39&histDir2=%2Fvar%2Flib%2Fjenkins%2Fconfig-history%2Fjobs%2Fmarc-test%2F2013-01-16_14-19-31
      

      On a side note: Why are internal absolute path names on the server exposed as url parameters? Why not simply give the two dates? The job name is already part of the url anyway.

        Attachments

          Activity

          Hide
          kstutz Kathi Stutz added a comment -

          The url parameters will get changed with the next release already (maybe in January, maybe in February).

          Show
          kstutz Kathi Stutz added a comment - The url parameters will get changed with the next release already (maybe in January, maybe in February).
          Hide
          kstutz Kathi Stutz added a comment -

          Version 2.1 was released today. It contains a great new feature (build badges!) as well as new URL parameters.

          Show
          kstutz Kathi Stutz added a comment - Version 2.1 was released today. It contains a great new feature (build badges!) as well as new URL parameters.
          Hide
          decbis Eugen Dinca added a comment -

          Still happens in 2.1.1.

          The URL looks like this (note the same double encoding in the name param value): https://<jenkins_url>/jenkins/job/check_graph%20Build/jobConfigHistory/showDiffFiles?timestamp1=<t1>&timestamp2=<t2>&name=check_graph%2520Build&isJob=true

          In the system log I get:
          Caused by: java.lang.IllegalArgumentException: A job with this name could not be found: check_graph%20Build

          Show
          decbis Eugen Dinca added a comment - Still happens in 2.1.1. The URL looks like this (note the same double encoding in the name param value): https://<jenkins_url>/jenkins/job/check_graph%20Build/jobConfigHistory/showDiffFiles?timestamp1=<t1>&timestamp2=<t2>&name=check_graph%2520Build&isJob=true In the system log I get: Caused by: java.lang.IllegalArgumentException: A job with this name could not be found: check_graph%20Build
          Hide
          kstutz Kathi Stutz added a comment -

          So, the showDiff page doesn't work for any job name containing a space character? Which operating system do you use? (I can't reproduce it on my Ubuntu.)

          Show
          kstutz Kathi Stutz added a comment - So, the showDiff page doesn't work for any job name containing a space character? Which operating system do you use? (I can't reproduce it on my Ubuntu.)
          Hide
          decbis Eugen Dinca added a comment -

          Indeed, if the job name contains one or more spaces it doesn't work (looks like it does URL encoding twice so any %20 end up as %2520).
          It's Jenkins 1.449 (+jobConfigHistory 2.1.1) on a Ubuntu 10.04 box with OpenJDK 1.6.

          Show
          decbis Eugen Dinca added a comment - Indeed, if the job name contains one or more spaces it doesn't work (looks like it does URL encoding twice so any %20 end up as %2520). It's Jenkins 1.449 (+jobConfigHistory 2.1.1) on a Ubuntu 10.04 box with OpenJDK 1.6.
          Hide
          eichench Christian Eichenberger added a comment -

          Works fine in 2.2

          Show
          eichench Christian Eichenberger added a comment - Works fine in 2.2

            People

            • Assignee:
              kstutz Kathi Stutz
              Reporter:
              marc_guenther Marc G√ľnther
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: