• Icon: Task Task
    • Resolution: Unresolved
    • Icon: Critical Critical
    • blueocean-plugin
    • None
    • Blue Ocean - 1.1-beta-1, Blue Ocean - 1.1-beta2, Blue Ocean 1.1-beta4, Blue Ocean 1.1

      Testing is an important part of CI/CD and Jenkins supports many frameworks for rendering test results. We need to support all the popular test plugins to increase adoption with Blue Ocean.

      In Scope

      • Identify all the popular test reporting plugins that have Pipeline support.
      • Test if they are compatible out of the box with Blue Ocean or not
      • Open tickets for plugins that are not compatible in the Plugin Compatibility epic
      • Identify changes we can make to Jenkins test reporting frameworks, Blue Ocean or Jenkins core that can make support of frameworks easier and propose them as a blueocean-rfc

          [JENKINS-41281] Improve test plugin compatibility

          Vivek Pandey added a comment -

          jamesdumay I am going to unblock you on this pretty soon, should have a PR sometime tomorrow

          Vivek Pandey added a comment - jamesdumay I am going to unblock you on this pretty soon, should have a PR sometime tomorrow

          James Dumay added a comment -

          vivek I tried to move JUnitTestResult from rest-impl to the junit plugin itself and it looks like we would have to tell plugin authors to depend on both blueocean-rest but blueocean-rest-impl to access the Factory classes. The factories all sit in the -impl module so that rest-api does not come polluted with hudson/jenkins packages.

          I can think of a few solutions:

          1. We relax the package dependency rules on hudson/jenkins in blueocean-rest
          2. We move all the factories to a new blueocean-rest-jenkins/factories/blah module

          What are your thoughts?

          James Dumay added a comment - vivek I tried to move JUnitTestResult from rest-impl to the junit plugin itself and it looks like we would have to tell plugin authors to depend on both blueocean-rest but blueocean-rest-impl to access the Factory classes. The factories all sit in the -impl module so that rest-api does not come polluted with hudson/jenkins packages. I can think of a few solutions: We relax the package dependency rules on hudson/jenkins in blueocean-rest We move all the factories to a new blueocean-rest-jenkins/factories/blah module What are your thoughts?

          Vivek Pandey added a comment -

          jamesdumay My preference is #2. #1 might be easier to do but hard to maintain as deciding what not to pull from jenkins core and might pollute the model. Or maybe we can selectively whitelist what to pull in from core but then hard to decide which ones.

          Vivek Pandey added a comment - jamesdumay My preference is #2. #1 might be easier to do but hard to maintain as deciding what not to pull from jenkins core and might pollute the model. Or maybe we can selectively whitelist what to pull in from core but then hard to decide which ones.

          James Dumay added a comment -

          vivek We could move all the factory classes into a .factory package within rest-impl?

          James Dumay added a comment - vivek We could move all the factory classes into a .factory package within rest-impl?

          James Dumay added a comment -

          Sorry within rest-api

          James Dumay added a comment - Sorry within rest-api

          James Dumay added a comment - - edited

          vivek I checked blueocean-rest and it already imports hudson. and jenkins. classes

          Banned imports detected:
          	in file: /io/jenkins/blueocean/rest/ApiHead.java
          		hudson.Extension (Line: 3)
          		hudson.ExtensionList (Line: 4)
          		hudson.ExtensionListListener (Line: 5)
          	in file: /io/jenkins/blueocean/BlueOceanUIProvider.java
          		hudson.ExtensionList (Line: 3)
          		hudson.ExtensionPoint (Line: 4)
          	in file: /io/jenkins/blueocean/rest/hal/LinkResolver.java
          		hudson.ExtensionList (Line: 3)
          		hudson.ExtensionPoint (Line: 4)
          	in file: /io/jenkins/blueocean/rest/OmniSearch.java
          		hudson.ExtensionList (Line: 3)
          		hudson.ExtensionPoint (Line: 4)
          	in file: /io/jenkins/blueocean/rest/model/BlueExtensionClassContainer.java
          		hudson.ExtensionPoint (Line: 3)
          	in file: /io/jenkins/blueocean/rest/model/BlueUserContainer.java
          		hudson.ExtensionPoint (Line: 3)
          	in file: /io/jenkins/blueocean/rest/OrganizationRoute.java
          		hudson.ExtensionPoint (Line: 3)
          	in file: /io/jenkins/blueocean/Routable.java
          		hudson.model.Action (Line: 3)
          	in file: /io/jenkins/blueocean/rest/model/Containers.java
          		hudson.util.AdaptedIterator (Line: 3)
          	in file: /io/jenkins/blueocean/rest/ApiRoutable.java
          		hudson.ExtensionPoint (Line: 3)
          		hudson.model.Action (Line: 4)
          	in file: /io/jenkins/blueocean/rest/APICrumbExclusion.java
          		hudson.Extension (Line: 10)
          		hudson.ExtensionList (Line: 11)
          		hudson.security.csrf.CrumbExclusion (Line: 12)
          	in file: /io/jenkins/blueocean/rest/model/BlueOrganizationContainer.java
          		hudson.ExtensionList (Line: 3)
          		hudson.ExtensionPoint (Line: 4)
          	in file: /io/jenkins/blueocean/RootRoutable.java
          		hudson.ExtensionPoint (Line: 3)
          

          I added this enforcer rule to blueocean-rest to generate that report

              <build>
                  <plugins>
                      <plugin>
                          <artifactId>maven-enforcer-plugin</artifactId>
                          <dependencies>
                              <dependency>
                                  <groupId>de.skuzzle.enforcer</groupId>
                                  <artifactId>restrict-imports-enforcer-rule</artifactId>
                                  <version>0.7.0</version>
                              </dependency>
                          </dependencies>
                          <executions>
                              <execution>
                                  <id>check-no-jenkins-imports</id>
                                  <phase>process-sources</phase>
                                  <goals>
                                      <goal>enforce</goal>
                                  </goals>
                                  <configuration>
                                      <rules>
                                          <restrictImports implementation="de.skuzzle.enforcer.restrictimports.RestrictImports">
                                              <basePackage>**</basePackage>
                                              <bannedImports>
                                                  <bannedImport>jenkins.**</bannedImport>
                                                  <bannedImport>hudson.**</bannedImport>
                                              </bannedImports>
                                          </restrictImports>
                                      </rules>
                                  </configuration>
                              </execution>
                          </executions>
                      </plugin>
                  </plugins>
              </build>
          

          James Dumay added a comment - - edited vivek I checked blueocean-rest and it already imports hudson. and jenkins. classes Banned imports detected: in file: /io/jenkins/blueocean/ rest /ApiHead.java hudson.Extension (Line: 3) hudson.ExtensionList (Line: 4) hudson.ExtensionListListener (Line: 5) in file: /io/jenkins/blueocean/BlueOceanUIProvider.java hudson.ExtensionList (Line: 3) hudson.ExtensionPoint (Line: 4) in file: /io/jenkins/blueocean/ rest /hal/LinkResolver.java hudson.ExtensionList (Line: 3) hudson.ExtensionPoint (Line: 4) in file: /io/jenkins/blueocean/ rest /OmniSearch.java hudson.ExtensionList (Line: 3) hudson.ExtensionPoint (Line: 4) in file: /io/jenkins/blueocean/ rest /model/BlueExtensionClassContainer.java hudson.ExtensionPoint (Line: 3) in file: /io/jenkins/blueocean/ rest /model/BlueUserContainer.java hudson.ExtensionPoint (Line: 3) in file: /io/jenkins/blueocean/ rest /OrganizationRoute.java hudson.ExtensionPoint (Line: 3) in file: /io/jenkins/blueocean/Routable.java hudson.model.Action (Line: 3) in file: /io/jenkins/blueocean/ rest /model/Containers.java hudson.util.AdaptedIterator (Line: 3) in file: /io/jenkins/blueocean/ rest /ApiRoutable.java hudson.ExtensionPoint (Line: 3) hudson.model.Action (Line: 4) in file: /io/jenkins/blueocean/ rest /APICrumbExclusion.java hudson.Extension (Line: 10) hudson.ExtensionList (Line: 11) hudson.security.csrf.CrumbExclusion (Line: 12) in file: /io/jenkins/blueocean/ rest /model/BlueOrganizationContainer.java hudson.ExtensionList (Line: 3) hudson.ExtensionPoint (Line: 4) in file: /io/jenkins/blueocean/RootRoutable.java hudson.ExtensionPoint (Line: 3) I added this enforcer rule to blueocean-rest to generate that report <build> <plugins> <plugin> <artifactId> maven-enforcer-plugin </artifactId> <dependencies> <dependency> <groupId> de.skuzzle.enforcer </groupId> <artifactId> restrict-imports-enforcer-rule </artifactId> <version> 0.7.0 </version> </dependency> </dependencies> <executions> <execution> <id> check-no-jenkins-imports </id> <phase> process-sources </phase> <goals> <goal> enforce </goal> </goals> <configuration> <rules> <restrictImports implementation= "de.skuzzle.enforcer.restrictimports.RestrictImports" > <basePackage> ** </basePackage> <bannedImports> <bannedImport> jenkins.** </bannedImport> <bannedImport> hudson.** </bannedImport> </bannedImports> </restrictImports> </rules> </configuration> </execution> </executions> </plugin> </plugins> </build>

          Vivek Pandey added a comment -

          jamesdumay yeah some extension related dependencies. Thanks for doing this.

          Vivek Pandey added a comment - jamesdumay yeah some extension related dependencies. Thanks for doing this.

          Vivek Pandey added a comment -

          jamesdumayMoving factory classes in rest model will mean opening up everything Item and Run (BlueRunFactory) and all their dependencies. Item is not too bad but Run depends on bunch of other stuff and their transitive dependencies. This totally defeats the idea of keep rest model free of jenkins core to make them future proof.

          Vivek Pandey added a comment - jamesdumay Moving factory classes in rest model will mean opening up everything Item and Run (BlueRunFactory) and all their dependencies. Item is not too bad but Run depends on bunch of other stuff and their transitive dependencies. This totally defeats the idea of keep rest model free of jenkins core to make them future proof.

          James Dumay added a comment -

          For anyone following along at home, vivek and I decided to move the factories into the blueocean-rest module in a .factory package. See https://github.com/jenkinsci/blueocean-plugin/pull/971 and https://github.com/jenkinsci/blueocean-plugin/pull/972 for more info.

          James Dumay added a comment - For anyone following along at home, vivek and I decided to move the factories into the blueocean-rest module in a .factory package. See https://github.com/jenkinsci/blueocean-plugin/pull/971 and https://github.com/jenkinsci/blueocean-plugin/pull/972 for more info.

          James Dumay added a comment -

          James Dumay added a comment - Move the JUnit implementation https://github.com/jenkinsci/junit-plugin/pull/68

            jamesdumay James Dumay
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: