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

User configured notification selection not working

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • display-url-api-plugin
    • None
    • Jenkins 2.414.2
      Display URL API
      Version2.200.vb_9327d658781

      Am I understanding that this plugin is responsible for this user configuration item:

      and that that configuration item defines which interface I am taken to when I click on a URL such as https://jenkins.example.com/job/example/job/example/job/PR-73/6/display/redirect.

      If I am on the right track here, this ticket is report that my choice above of Blue Ocean is not being honoured and when I click such a link as above, I am still being taken to the new Graph View interface.

      While I understand that the Graph View is the future and that B/O is deprecated, the former is very quite lacking compared to the latter.  It's not really ready yet to replace B/O for a whole raft of reasons.

          [JENKINS-72270] User configured notification selection not working

          Mark Waite added a comment - - edited

          I can't duplicate the bug as described. Can you provide more details that will help others duplicate the issue you are seeing?

          Steps I took while trying to duplicate the bug:

          1. Create a plugins.txt file that lists the plugins installed and their versions (including Blue Ocean, Pipeline, and more)
          2. Create a run-jenkins.sh script that downloads the plugins listed in plugins.txt and downloads Jenkins 2.414.3 and runs Jenkins
          3. Run the run-jenkins.sh script
          4. Define a new Pipeline in a private GitHub repository (https://github.com/MarkEWaite/bin) using a GitHub personal access token that I created
          5. Run the new Pipeline and confirm that the link provided to GitHub points to Blue Ocean (from the GitHub branch status link that is on the same line as the branch name in the GitHub UI)
          6. Change the system configuration to set the notification URL to "Blue Ocean"
          7. Run the Pipeline again and confirm that the link provided to GitHub points to Blue Ocean (from the GitHub branch status link that is on the same line as the branch name in the GitHub UI)
          8. Change the system configuration to set the notification URL to "Classic Jenkins"
          9. Run the Pipeline again and confirm that the link provided to GitHub points to classic Jenkins (from the GitHub branch status link that is on the same line as the branch name in the GitHub UI)

          Mark Waite added a comment - - edited I can't duplicate the bug as described. Can you provide more details that will help others duplicate the issue you are seeing? Steps I took while trying to duplicate the bug: Create a plugins.txt file that lists the plugins installed and their versions (including Blue Ocean, Pipeline, and more) Create a run-jenkins.sh script that downloads the plugins listed in plugins.txt and downloads Jenkins 2.414.3 and runs Jenkins Run the run-jenkins.sh script Define a new Pipeline in a private GitHub repository ( https://github.com/MarkEWaite/bin ) using a GitHub personal access token that I created Run the new Pipeline and confirm that the link provided to GitHub points to Blue Ocean (from the GitHub branch status link that is on the same line as the branch name in the GitHub UI) Change the system configuration to set the notification URL to "Blue Ocean" Run the Pipeline again and confirm that the link provided to GitHub points to Blue Ocean (from the GitHub branch status link that is on the same line as the branch name in the GitHub UI) Change the system configuration to set the notification URL to "Classic Jenkins" Run the Pipeline again and confirm that the link provided to GitHub points to classic Jenkins (from the GitHub branch status link that is on the same line as the branch name in the GitHub UI)

          Why do you re-run the pipeline in steps 7 and 9?  Isn't the link that is posted to the GH commit status the same in all 3 cases?  I.e. https://jenkins.example.com/job/example/job/example/job/PR-73/6/display/redirect where it's one's notification choice that redirects that same URL to the chosen interface?

          Or are you suggesting that the URL posted to the commit status is different depending on the notification preference you have chosen?

          If so this means that everyone has view the UI that the creator of the PR chose, not what they personally prefer, right?

          Brian J Murrell added a comment - Why do you re-run the pipeline in steps 7 and 9?  Isn't the link that is posted to the GH commit status the same in all 3 cases?  I.e. https://jenkins.example.com/job/example/job/example/job/PR-73/6/display/redirect where it's one's notification choice that redirects that same URL to the chosen interface? Or are you suggesting that the URL posted to the commit status is different depending on the notification preference you have chosen? If so this means that everyone has view the UI that the creator of the PR chose, not what they personally prefer, right?

          Mark Waite added a comment -

          Thanks for the question brianjmurrell. I was making the flawed assumption that there is only a preference at the system level. You guided me to learn more about the notification URL user preference.

          A single job notification URL is posted to GitHub when the job completes. That URL is handled by Jenkins as a redirect based on the user preference. As you correctly noted, there was no need for me to run the job again in order to update the URL on GitHub.

          In all cases, when the job completes, a notification URL is sent to GitHub like http://testing-b.markwaite.net:8080/job/bin/job/master/7/display/redirect . That URL includes the build number that just completed but does not include anything about the user preference for job display.

          When I have "Jenkins Classic" configured, opening that URL will redirect to http://testing-b.markwaite.net:8080/job/bin/job/master/7/

          When I have "Blue Ocean" configured, opening that URL will redirect to http://testing-b.markwaite.net:8080/blue/organizations/jenkins/bin/detail/master/7/pipeline

          When I have Pipeline graph viewer configured, opening that URL will redirect to http://testing-b.markwaite.net:8080/job/bin/job/master/7/pipeline-graph/

          In each of those cases, the plugin behaved as I expected by honoring my notification URL preferences.

          If I set the system preference to "Default" and my user preference to "Default" and have the Pipeline graph view plugin installed, then the Pipeline graph view is displayed. I believe that the Pipeline graph view plugin assumes that the choice to install it means that it should take the role as "Default".

          Mark Waite added a comment - Thanks for the question brianjmurrell . I was making the flawed assumption that there is only a preference at the system level. You guided me to learn more about the notification URL user preference. A single job notification URL is posted to GitHub when the job completes. That URL is handled by Jenkins as a redirect based on the user preference. As you correctly noted, there was no need for me to run the job again in order to update the URL on GitHub. In all cases, when the job completes, a notification URL is sent to GitHub like http://testing-b.markwaite.net:8080/job/bin/job/master/7/display/redirect . That URL includes the build number that just completed but does not include anything about the user preference for job display. When I have "Jenkins Classic" configured, opening that URL will redirect to http://testing-b.markwaite.net:8080/job/bin/job/master/7/ When I have "Blue Ocean" configured, opening that URL will redirect to http://testing-b.markwaite.net:8080/blue/organizations/jenkins/bin/detail/master/7/pipeline When I have Pipeline graph viewer configured, opening that URL will redirect to http://testing-b.markwaite.net:8080/job/bin/job/master/7/pipeline-graph/ In each of those cases, the plugin behaved as I expected by honoring my notification URL preferences. If I set the system preference to "Default" and my user preference to "Default" and have the Pipeline graph view plugin installed, then the Pipeline graph view is displayed. I believe that the Pipeline graph view plugin assumes that the choice to install it means that it should take the role as "Default".

            Unassigned Unassigned
            brianjmurrell Brian J Murrell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: