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

MissingFieldException: No field 'wrapperName' found in class 'htmlpublisher.HtmlPublisherTarget'

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Upgrading to 1.6 caused a lot of unreadable data:

      MissingFieldException: No field 'wrapperName' found in class 'htmlpublisher.HtmlPublisherTarget'
      

      This was most likely introduced by the following commit:
      https://github.com/jenkinsci/htmlpublisher-plugin/commit/489e3ae33bbef585834c4954946dfc595e176f82

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          docs/Migration.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/1f6e144f5656db501aaf9a9bb637c8f2c1220f4f
          Log:
          added workaround for JENKINS-31366, deprecated support for older versions of HTML Publisher plugin

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/1f6e144f5656db501aaf9a9bb637c8f2c1220f4f Log: added workaround for JENKINS-31366 , deprecated support for older versions of HTML Publisher plugin
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          docs/Migration.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/758361bdbca695fb53cbf90be0fe41c07693b364
          Log:
          Merge pull request #654 from daspilker/html-publisher

          added workaround for JENKINS-31366

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/7c42e4b305e9...758361bdbca6

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/758361bdbca695fb53cbf90be0fe41c07693b364 Log: Merge pull request #654 from daspilker/html-publisher added workaround for JENKINS-31366 Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/7c42e4b305e9...758361bdbca6
          Hide
          mcrooney mcrooney added a comment -

          Thanks for the job-dsl love! Is this something that should be fixed in HTML Publisher? I'm not totally clear on if it causes a problem with the plugin itself or just in the API it exposes.

          Show
          mcrooney mcrooney added a comment - Thanks for the job-dsl love! Is this something that should be fixed in HTML Publisher? I'm not totally clear on if it causes a problem with the plugin itself or just in the API it exposes.
          Hide
          daspilker Daniel Spilker added a comment -

          The problem is this change:
          https://github.com/jenkinsci/htmlpublisher-plugin/commit/489e3ae33bbef585834c4954946dfc595e176f82#diff-5c20523e234f56a518b09e853700ff17R65

          The Jenkins XML serializer picks up all non-transient fields. Before 1.5 there was a wrapperName field, so it has been serialized to XML. When updating to 1.5 or later, Jenkins tries to deserialize this field, but it's gone, so users get a MissingFieldException.

          See https://wiki.jenkins-ci.org/display/JENKINS/Hint+on+retaining+backward+compatibility for details about keeping compatibility. The "Scenario: Remove a field" section suggests to never remove a field, but to mark it as transient. As a fix, the wrapperName field should be added and marked as transient and deprecated. I will send a pull request.

          Show
          daspilker Daniel Spilker added a comment - The problem is this change: https://github.com/jenkinsci/htmlpublisher-plugin/commit/489e3ae33bbef585834c4954946dfc595e176f82#diff-5c20523e234f56a518b09e853700ff17R65 The Jenkins XML serializer picks up all non-transient fields. Before 1.5 there was a wrapperName field, so it has been serialized to XML. When updating to 1.5 or later, Jenkins tries to deserialize this field, but it's gone, so users get a MissingFieldException . See https://wiki.jenkins-ci.org/display/JENKINS/Hint+on+retaining+backward+compatibility for details about keeping compatibility. The "Scenario: Remove a field" section suggests to never remove a field, but to mark it as transient. As a fix, the wrapperName field should be added and marked as transient and deprecated. I will send a pull request.
          Show
          daspilker Daniel Spilker added a comment - See https://github.com/jenkinsci/htmlpublisher-plugin/pull/21
          Hide
          mcrooney mcrooney added a comment -

          Thanks for your time Daniel, that's really helpful I'm a huge fan of job-dsl, by the way!

          Show
          mcrooney mcrooney added a comment - Thanks for your time Daniel, that's really helpful I'm a huge fan of job-dsl, by the way!
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          src/main/java/htmlpublisher/HtmlPublisherTarget.java
          http://jenkins-ci.org/commit/htmlpublisher-plugin/b3f3d6dd89928c035bcf568489158ec9d1f690c9
          Log:
          added wrapperName field to maintain compatibility

          [FIXES JENKINS-31366]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: src/main/java/htmlpublisher/HtmlPublisherTarget.java http://jenkins-ci.org/commit/htmlpublisher-plugin/b3f3d6dd89928c035bcf568489158ec9d1f690c9 Log: added wrapperName field to maintain compatibility [FIXES JENKINS-31366]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mike Rooney
          Path:
          src/main/java/htmlpublisher/HtmlPublisherTarget.java
          http://jenkins-ci.org/commit/htmlpublisher-plugin/067ff3788556cb7b2b1e08f4fe8dc4213b9eb756
          Log:
          Merge pull request #21 from daspilker/JENKINS-31366

          JENKINS-31366 added wrapperName field to maintain compatibility

          Compare: https://github.com/jenkinsci/htmlpublisher-plugin/compare/eeddf4492b6a...067ff3788556

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mike Rooney Path: src/main/java/htmlpublisher/HtmlPublisherTarget.java http://jenkins-ci.org/commit/htmlpublisher-plugin/067ff3788556cb7b2b1e08f4fe8dc4213b9eb756 Log: Merge pull request #21 from daspilker/ JENKINS-31366 JENKINS-31366 added wrapperName field to maintain compatibility Compare: https://github.com/jenkinsci/htmlpublisher-plugin/compare/eeddf4492b6a...067ff3788556

            People

            • Assignee:
              mcrooney mcrooney
              Reporter:
              daspilker Daniel Spilker
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: