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

Update to 1.13.2 breaks global configuration submission when jira-plugin installed

      After upgrading from 1.12.1, when submitting the global configuration a second time I get this error:

      Error

      Mailformed GitHub Plugin configuration (java.net.URL cannot be cast to java.lang.String)

      Restarting the server seems that "restarts the counter" as I'm able to submit a new configuration, but the next time fails again.

          [JENKINS-30242] Update to 1.13.2 breaks global configuration submission when jira-plugin installed

          Kirill Merkushev added a comment - - edited

          Think the problem is the integration with jira plugin.

          Reproduced successfully with installed Jira Plugin

          ClassCastException: java.net.URL cannot be cast to java.lang.String
                  at hudson.plugins.jira.JiraProjectProperty$DescriptorImpl$1.convert(JiraProjectProperty.java:122)
                  at org.kohsuke.stapler.RequestImpl.copyProperty(RequestImpl.java:840)
                  at org.kohsuke.stapler.RequestImpl.fill(RequestImpl.java:500)
                  at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:414)
                  at org.jenkinsci.plugins.github.config.GitHubPluginConfig.configure(GitHubPluginConfig.java:159)
          

          https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L122

          It changes the global default URL converter

          Kirill Merkushev added a comment - - edited Think the problem is the integration with jira plugin. Reproduced successfully with installed Jira Plugin ClassCastException: java.net.URL cannot be cast to java.lang.String at hudson.plugins.jira.JiraProjectProperty$DescriptorImpl$1.convert(JiraProjectProperty.java:122) at org.kohsuke.stapler.RequestImpl.copyProperty(RequestImpl.java:840) at org.kohsuke.stapler.RequestImpl.fill(RequestImpl.java:500) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:414) at org.jenkinsci.plugins.github.config.GitHubPluginConfig.configure(GitHubPluginConfig.java:159) https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L122 It changes the global default URL converter

          I'll try to create fix or workaround in a few hours

          Kirill Merkushev added a comment - I'll try to create fix or workaround in a few hours

          Kirill Merkushev added a comment - - edited

          https://github.com/jenkinsci/jira-plugin/pull/60 - fix for the problem.
          Try to install jira plugin from build https://jenkins.ci.cloudbees.com/job/plugins/job/jira-plugin/83/org.jenkins-ci.plugins$jira/

          Trying to create workaround in gh plugin...

          Kirill Merkushev added a comment - - edited https://github.com/jenkinsci/jira-plugin/pull/60 - fix for the problem. Try to install jira plugin from build https://jenkins.ci.cloudbees.com/job/plugins/job/jira-plugin/83/org.jenkins-ci.plugins$jira/ Trying to create workaround in gh plugin...

          Kirill Merkushev added a comment - - edited

          Workaround until jira merged PR with fix: https://github.com/jenkinsci/github-plugin/pull/81

          https://jenkins.ci.cloudbees.com/job/plugins/job/github-plugin/275/com.coravy.hudson.plugins.github$github/artifact/com.coravy.hudson.plugins.github/github/1.14.0-SNAPSHOT/github-1.14.0-SNAPSHOT.hpi

          I'll think about merging and releasing this because of it a bug in jira plugin and not in github-plugin, which uses standard stapler ability to convert json to bean

          Kirill Merkushev added a comment - - edited Workaround until jira merged PR with fix: https://github.com/jenkinsci/github-plugin/pull/81 https://jenkins.ci.cloudbees.com/job/plugins/job/github-plugin/275/com.coravy.hudson.plugins.github$github/artifact/com.coravy.hudson.plugins.github/github/1.14.0-SNAPSHOT/github-1.14.0-SNAPSHOT.hpi I'll think about merging and releasing this because of it a bug in jira plugin and not in github-plugin, which uses standard stapler ability to convert json to bean

          lanwen Still happens to me with 1.13.3, using jenkins 1.605. Tried to uninstall the plugin, discard all old plugin configuration and install again - with no luck.
          Couldn't find nothing in org.jenkinsci.plugins.github.config.GitHubPluginConfig.

          Yonatan Graber added a comment - lanwen Still happens to me with 1.13.3, using jenkins 1.605. Tried to uninstall the plugin, discard all old plugin configuration and install again - with no luck. Couldn't find nothing in org.jenkinsci.plugins.github.config.GitHubPluginConfig.

          Yonatan Graber - this fix is not released as of its a bug in jira plugin. So please use workaround for now or custom jira-plugin build

          Kirill Merkushev added a comment - Yonatan Graber - this fix is not released as of its a bug in jira plugin. So please use workaround for now or custom jira-plugin build

          Code changed in jenkins
          User: Radosław Antoniuk
          Path:
          src/main/java/hudson/plugins/jira/JiraProjectProperty.java
          src/test/java/hudson/plugins/jira/EmptyFriendlyURLConverterTest.java
          http://jenkins-ci.org/commit/jira-plugin/286a5320efb653f4ffb8be23a9b0f452c3ac15c4
          Log:
          Merge pull request #60 from lanwen/JENKINS-30242_fix

          [FIXES JENKINS-30242] don't cast object in converter to string

          Compare: https://github.com/jenkinsci/jira-plugin/compare/b14eac482984...286a5320efb6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Radosław Antoniuk Path: src/main/java/hudson/plugins/jira/JiraProjectProperty.java src/test/java/hudson/plugins/jira/EmptyFriendlyURLConverterTest.java http://jenkins-ci.org/commit/jira-plugin/286a5320efb653f4ffb8be23a9b0f452c3ac15c4 Log: Merge pull request #60 from lanwen/ JENKINS-30242 _fix [FIXES JENKINS-30242] don't cast object in converter to string Compare: https://github.com/jenkinsci/jira-plugin/compare/b14eac482984...286a5320efb6

          Hi

          I'm not sure to understand where the fix is: github-plugin or jira-plugin (version 2.1) ?

          thx
          Christophe

          Christophe Lallement added a comment - Hi I'm not sure to understand where the fix is: github-plugin or jira-plugin (version 2.1) ? thx Christophe

          It should be released in next jira-plugin release (should be 2.1 i think)

          Kirill Merkushev added a comment - It should be released in next jira-plugin release (should be 2.1 i think)

          Released in jira-2.0.1.

          Radek Antoniuk added a comment - Released in jira-2.0.1.

            warden Radek Antoniuk
            xmorales Xavier Morales
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: