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

Git Repository Browser URL not saved anymore

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The "Repository Browser" URL is not saved anymore. The value of the popup itself (githubweb, gitoriousweb, etc) is saved, though.

      We just upgraded Jenkins from 1.501 and git-plugin 1.1.26.

      Furthermore, with existing jobs that still have the URL, when you configure and save them without any change, the URL gets removed.

      Looking at the Job Config History, it shows that the <refspec> was removed (but that was empty), and also the <url> inside of the <browser class="hudson.plugins.git.browser.GitoriousWeb"> tag

        Attachments

          Issue Links

            Activity

            marc_guenther Marc Günther created issue -
            Hide
            markewaite Mark Waite added a comment -

            That sounds like an upgrade compatibility issue. Since there were major changes from git-plugin 1.x to git-plugin 2.x, there are some cases where the upgrade does not behave correctly. It appears you've detected one of those cases.

            Could you upload a copy of your job definition XML file so that we can consider eventually including it in a git-plugin upgrade compatibility test suite?

            Show
            markewaite Mark Waite added a comment - That sounds like an upgrade compatibility issue. Since there were major changes from git-plugin 1.x to git-plugin 2.x, there are some cases where the upgrade does not behave correctly. It appears you've detected one of those cases. Could you upload a copy of your job definition XML file so that we can consider eventually including it in a git-plugin upgrade compatibility test suite?
            Hide
            marc_guenther Marc Günther added a comment -

            I don't think it's a problem during the upgrade. Old projects still have the setting, and even show it in the Configure screen. It is only during a save that the setting vanishes.

            I also just tried to create a new Freestyle project, and there the same thing happens.

            This is with git-client-plugin 1.6.4 and git-plugin 2.0.4

            Show
            marc_guenther Marc Günther added a comment - I don't think it's a problem during the upgrade. Old projects still have the setting, and even show it in the Configure screen. It is only during a save that the setting vanishes. I also just tried to create a new Freestyle project, and there the same thing happens. This is with git-client-plugin 1.6.4 and git-plugin 2.0.4
            Hide
            markewaite Mark Waite added a comment -

            Thanks for your persistence. You're absolutely correct. I verified the same behavior.

            1. Create a freestyle job
            2. Configure git as the SCM system
            3. Add a repository (I used git://wheezy64b/git/mwaite/bin.git)
            4. Select the gitweb repository browser
            5. Enter a gitweb repository browser URL (I used http://wheezy64b/gitweb?p=mwaite/bin.git)
            6. Save the job
            7. Edit the job definition - confirm that the repository URL is empty

            The empty repository URL value is "honored", the link to gitweb is instead a "details" link as though I'd never entered a repository browser URL

            Show
            markewaite Mark Waite added a comment - Thanks for your persistence. You're absolutely correct. I verified the same behavior. Create a freestyle job Configure git as the SCM system Add a repository (I used git://wheezy64b/git/mwaite/bin.git) Select the gitweb repository browser Enter a gitweb repository browser URL (I used http://wheezy64b/gitweb?p=mwaite/bin.git ) Save the job Edit the job definition - confirm that the repository URL is empty The empty repository URL value is "honored", the link to gitweb is instead a "details" link as though I'd never entered a repository browser URL
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Major [ 3 ]
            Hide
            marc_guenther Marc Günther added a comment -

            yep, that are exactly the same steps I have done

            Show
            marc_guenther Marc Günther added a comment - yep, that are exactly the same steps I have done
            Hide
            wbsimms William Simms added a comment -

            Workaround : Add the <url>http://your.repo.browser</url> tag inside the <browser> tag by hand. The setting will be lost if you change the config file through the UI however.

            Show
            wbsimms William Simms added a comment - Workaround : Add the <url> http://your.repo.browser </url> tag inside the <browser> tag by hand. The setting will be lost if you change the config file through the UI however.
            Hide
            astern andrew stern added a comment -

            I tried the workaround since I'm having the same issue after upgrading to the current versions and it didn't work. The information being provided by my webview into git is no longer showing up in my Jenkins build display under changes. It was working before the change and adding it back into the file didn't fix the issue.

            Show
            astern andrew stern added a comment - I tried the workaround since I'm having the same issue after upgrading to the current versions and it didn't work. The information being provided by my webview into git is no longer showing up in my Jenkins build display under changes. It was working before the change and adding it back into the file didn't fix the issue.
            Hide
            marc_guenther Marc Günther added a comment -

            I guess you need to "Reload Configuration" after editing the file. I never use "Reload Configuration" myself, though, as it has been a constant source of problems in the past.

            Another workaround might be to switch back to "(Auto)", as long as you have at least one untouched project with the same repository left.

            Yet another solution would be a small Groovy script, which calculates the correct browser URL based on the repo URL.

            Show
            marc_guenther Marc Günther added a comment - I guess you need to "Reload Configuration" after editing the file. I never use "Reload Configuration" myself, though, as it has been a constant source of problems in the past. Another workaround might be to switch back to "(Auto)", as long as you have at least one untouched project with the same repository left. Yet another solution would be a small Groovy script, which calculates the correct browser URL based on the repo URL.
            Hide
            arost Alexander Ost added a comment -

            This was working fine still with git-plugin version 2.0 and git-client-plugin version 1.6.0.
            Probably the problem is related to this commit:
            https://github.com/jenkinsci/git-plugin/commit/7abfafcf58addbce2c268dbfed1910a90d4fe2a3

            I'm not enough into Jenkins coding to fix this myself quickly, but Nicolas is already listed as assignee here (thanks!). I hope it's an easy fix.

            Show
            arost Alexander Ost added a comment - This was working fine still with git-plugin version 2.0 and git-client-plugin version 1.6.0. Probably the problem is related to this commit: https://github.com/jenkinsci/git-plugin/commit/7abfafcf58addbce2c268dbfed1910a90d4fe2a3 I'm not enough into Jenkins coding to fix this myself quickly, but Nicolas is already listed as assignee here (thanks!). I hope it's an easy fix.
            Hide
            markewaite Mark Waite added a comment -

            There is a pull request ( https://github.com/jenkinsci/git-plugin/pull/211 ) for a test which I believe shows the problem, but that is only a test, and I can't be sure it actually exercises the bug until the bug is fixed.

            Show
            markewaite Mark Waite added a comment - There is a pull request ( https://github.com/jenkinsci/git-plugin/pull/211 ) for a test which I believe shows the problem, but that is only a test, and I can't be sure it actually exercises the bug until the bug is fixed.
            Hide
            arost Alexander Ost added a comment -

            Nicolas commited a fix yesterday:
            https://github.com/jenkinsci/git-plugin/commit/b46de67f7f30139f5a876b6f1c6f21fcdbfea821

            I cherry-picked that on top of 2.0.4: the correction does solve the issue (with cgit).
            The browser URL is saved correctly, and the links in the changelog are back.

            Thanks!

            Show
            arost Alexander Ost added a comment - Nicolas commited a fix yesterday: https://github.com/jenkinsci/git-plugin/commit/b46de67f7f30139f5a876b6f1c6f21fcdbfea821 I cherry-picked that on top of 2.0.4: the correction does solve the issue (with cgit). The browser URL is saved correctly, and the links in the changelog are back. Thanks!
            Hide
            markewaite Mark Waite added a comment -

            Will be fixed in the first release after 2.0.4

            Show
            markewaite Mark Waite added a comment - Will be fixed in the first release after 2.0.4
            markewaite Mark Waite made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-22271 [ JENKINS-22271 ]
            Hide
            wbsimms William Simms added a comment -

            Thanks!

            Show
            wbsimms William Simms added a comment - Thanks!
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-22407 [ JENKINS-22407 ]
            Hide
            markewaite Mark Waite added a comment -

            Fixed in git-plugin 2.1.0

            Show
            markewaite Mark Waite added a comment - Fixed in git-plugin 2.1.0
            Hide
            marc_guenther Marc Günther added a comment -

            I would have really liked to post a groovy script here, that fixes all the now empty URLs, but it is not possible to set the url or the browser programmatically

            So how do I fix the 670 jobs with a browser but no url, that I now have?

            Show
            marc_guenther Marc Günther added a comment - I would have really liked to post a groovy script here, that fixes all the now empty URLs, but it is not possible to set the url or the browser programmatically So how do I fix the 670 jobs with a browser but no url, that I now have?
            Hide
            markewaite Mark Waite added a comment -

            I'd save copies of the job definition config files, stop Jenkins, modify the job definitions in place in the Jenkins directory, then restart Jenkins.

            Show
            markewaite Mark Waite added a comment - I'd save copies of the job definition config files, stop Jenkins, modify the job definitions in place in the Jenkins directory, then restart Jenkins.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 154143 ] JNJira + In-Review [ 207479 ]

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                marc_guenther Marc Günther
              • Votes:
                5 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: