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

Specifying decimal numbers for JUnit health factor in Pipeline snippets results in invalid code

      Specifying 0.1 in Health report amplification factor will result in bad groovy:
      step([$class: 'JUnitResultArchiver', healthScaleFactor: <object of type java.lang.Double>, testResults: '**/target/surefire-reports/*.xml'])

      This'll happen with 20.0, 10.5, whatever - any decimal ends up showing up like this.

          [JENKINS-31967] Specifying decimal numbers for JUnit health factor in Pipeline snippets results in invalid code

          Jesse Glick added a comment -

          Means DescribableHelper and/or Snippetizer are not yet handling all primitive types. Should be an easy fix.

          Jesse Glick added a comment - Means DescribableHelper and/or Snippetizer are not yet handling all primitive types. Should be an easy fix.

          Hi,

          Any hope this will be fixed soon? Looks pretty trivial to fix...

          Andrey Pokhilko added a comment - Hi, Any hope this will be fixed soon? Looks pretty trivial to fix...

          Andrey Pokhilko added a comment - https://github.com/jenkinsci/workflow-cps-plugin/pull/116  FYI

          Jesse Glick added a comment -

          That is only half the fix.

          Jesse Glick added a comment - That is only half the fix.

          Artem Fedorov added a comment -

          Artem Fedorov added a comment - Please, review this requests: https://github.com/jenkinsci/workflow-cps-plugin/pull/116 https://github.com/jenkinsci/structs-plugin/pull/16

          Code changed in jenkins
          User: Artem Fedorov
          Path:
          plugin/src/main/java/org/jenkinsci/plugins/structs/describable/DescribableModel.java
          http://jenkins-ci.org/commit/structs-plugin/849c5dcb32f90488f2294d831ba378fc87f50231
          Log:
          fixed defaults for Java standard types

          https://issues.jenkins-ci.org/browse/JENKINS-31967

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Artem Fedorov Path: plugin/src/main/java/org/jenkinsci/plugins/structs/describable/DescribableModel.java http://jenkins-ci.org/commit/structs-plugin/849c5dcb32f90488f2294d831ba378fc87f50231 Log: fixed defaults for Java standard types https://issues.jenkins-ci.org/browse/JENKINS-31967

          Code changed in jenkins
          User: Jesse Glick
          Path:
          plugin/src/main/java/org/jenkinsci/plugins/structs/describable/DescribableModel.java
          plugin/src/test/java/org/jenkinsci/plugins/structs/describable/DescribableModelTest.java
          http://jenkins-ci.org/commit/structs-plugin/5eaa47767082b8bc3a2e40447a111055b82a46bc
          Log:
          Merged #16: JENKINS-31967 Specifying decimal numbers for JUnit health factor in Pipeline snippets results in invalid code

          Compare: https://github.com/jenkinsci/structs-plugin/compare/8d0f4ad0109f...5eaa47767082

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: plugin/src/main/java/org/jenkinsci/plugins/structs/describable/DescribableModel.java plugin/src/test/java/org/jenkinsci/plugins/structs/describable/DescribableModelTest.java http://jenkins-ci.org/commit/structs-plugin/5eaa47767082b8bc3a2e40447a111055b82a46bc Log: Merged #16: JENKINS-31967 Specifying decimal numbers for JUnit health factor in Pipeline snippets results in invalid code Compare: https://github.com/jenkinsci/structs-plugin/compare/8d0f4ad0109f...5eaa47767082

          Code changed in jenkins
          User: Artem Fedorov
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/bfc47a2598ae79110d41d036fcbbe7920305cbab
          Log:
          fixed exception with standard java types

          https://issues.jenkins-ci.org/browse/JENKINS-31967

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Artem Fedorov Path: src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java http://jenkins-ci.org/commit/workflow-cps-plugin/bfc47a2598ae79110d41d036fcbbe7920305cbab Log: fixed exception with standard java types https://issues.jenkins-ci.org/browse/JENKINS-31967

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java
          src/test/java/org/jenkinsci/plugins/workflow/cps/SnippetizerTest.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/b48af161645f3a8d37c9d1219d5e65b94b5628bf
          Log:
          Merge pull request #116 from artem-fedorov/fix-supporting-java-standard-types

          JENKINS-31967 Specifying decimal numbers for JUnit health factor in Pipeline snippets results in invalid code

          Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/e3bad4b3494d...b48af161645f

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java src/test/java/org/jenkinsci/plugins/workflow/cps/SnippetizerTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/b48af161645f3a8d37c9d1219d5e65b94b5628bf Log: Merge pull request #116 from artem-fedorov/fix-supporting-java-standard-types JENKINS-31967 Specifying decimal numbers for JUnit health factor in Pipeline snippets results in invalid code Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/e3bad4b3494d...b48af161645f

            artem_fedorov Artem Fedorov
            abayer Andrew Bayer
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: