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

The expected format of Fisheye browser URL is not explicitly documented

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • Jenkins 2.89, Windows

      When filling the "Configure Repository Browser" in a multibranch pipeline Git section, or in a regular freestyle job, one option is "Fisheye".
      However, the URL format is not specified nor hinted. I initially typed http://fisheye.ourdomain.fr, which led to broken links. The correct format was http://fisheye.ourdomain.fr/browse/repoName/

      The point is that it is not explicitly documented: Not in the configuration page, not on the plugin page, and I did a bit of googling, to no avail.

      I had to open the source code (FisheyeGitRepositoryBrowser.java) to find it, thankfully commented. The source seems to try a validation, maybe it's broken?

          [JENKINS-48064] The expected format of Fisheye browser URL is not explicitly documented

          Mark Waite added a comment -

          Pull requests proposing changes (with tests) are welcomed.

          I don't have access to a fisheye repository monitoring any of the repositories which I can write.

          Mark Waite added a comment - Pull requests proposing changes (with tests) are welcomed. I don't have access to a fisheye repository monitoring any of the repositories which I can write.

          Christophe Carpentier added a comment - - edited

          Ok, I'll try to find some clues, I'll list my findings here.

          First, the validation seems to fail on the majority of SCM browsers (the validation does not leave the browser, so I'll assume the binding with the form validation thingy is KO).

          Gitlab's version check is OK, so I'll try to find what differs!

          Christophe Carpentier added a comment - - edited Ok, I'll try to find some clues, I'll list my findings here. First, the validation seems to fail on the majority of SCM browsers (the validation does not leave the browser, so I'll assume the binding with the form validation thingy is KO). Gitlab's version check is OK, so I'll try to find what differs!

          My guess is that the field is not named the same in the view and in the check method:
          In the Gitlab browser view, the "version" field is named the same as the doCheckVersion method:
          git-plugin/src/main/resources/hudson/plugins/git/browser/GitLab/config.jelly

          So that explaons why it works; however in the majority (if not all) the SCM browsers, the url field is named "repoUrl" while the validation method is named doCheckUrl:
          git-plugin/src/main/resources/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser/config.jelly

          I suggest renaming the validation method to doCheckRepoUrl to avoid impacting existing fields!

          Christophe Carpentier added a comment - My guess is that the field is not named the same in the view and in the check method: In the Gitlab browser view, the "version" field is named the same as the doCheckVersion method: git-plugin/src/main/resources/hudson/plugins/git/browser/GitLab/config.jelly So that explaons why it works; however in the majority (if not all) the SCM browsers, the url field is named "repoUrl" while the validation method is named doCheckUrl: git-plugin/src/main/resources/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser/config.jelly I suggest renaming the validation method to doCheckRepoUrl to avoid impacting existing fields!

          There you go.
          https://github.com/jenkinsci/git-plugin/pull/554

          I found 4 other such browsers, which define a method for checking the URL, but it's not fired. However, applying the same chenge does not fix it; maybe others could help.
          Those are Assembla, Gitiles, ViewGitWeb and GitBlit.

          Christophe Carpentier added a comment - There you go. https://github.com/jenkinsci/git-plugin/pull/554 I found 4 other such browsers, which define a method for checking the URL, but it's not fired. However, applying the same chenge does not fix it; maybe others could help. Those are Assembla, Gitiles, ViewGitWeb and GitBlit.

          Mark Waite added a comment - - edited

          Fix merged into the master branch.  Will be available in git plugin release 3.7.0.

          saucistophe could you submit a bug report to remind us that the other 4 browsers you detected (Assembla, Gitiles, ViewGitWeb, and GitBlit) need to have their FormValidation updated?  One of the dangers of my not having created an automated test for the FormValidation implementations.

          Mark Waite added a comment - - edited Fix merged into the master branch.  Will be available in git plugin release 3.7.0. saucistophe could you submit a bug report to remind us that the other 4 browsers you detected (Assembla, Gitiles, ViewGitWeb, and GitBlit) need to have their FormValidation updated?  One of the dangers of my not having created an automated test for the FormValidation implementations.

          Code changed in jenkins
          User: ccarpentier
          Path:
          src/main/java/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser.java
          http://jenkins-ci.org/commit/git-plugin/14973e770c5a426c542d72f7032828e4bf3b3f40
          Log:
          [FIXED JENKINS-48064] Fisheye Git browser now validates its URL in the configuration.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ccarpentier Path: src/main/java/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser.java http://jenkins-ci.org/commit/git-plugin/14973e770c5a426c542d72f7032828e4bf3b3f40 Log: [FIXED JENKINS-48064] Fisheye Git browser now validates its URL in the configuration.

          Mark Waite added a comment -

          Fixed in git plugin 3.7.0, released 21 Dec 2017.

          Mark Waite added a comment - Fixed in git plugin 3.7.0, released 21 Dec 2017.

            Unassigned Unassigned
            saucistophe Christophe Carpentier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: