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

Run jenkinsci/usage-in-plugins on JAXB usages

    XMLWordPrintable

Details

    Description

      danielbeck suggested using https://github.com/jenkins-infra/deprecated-usage-in-plugins to analyze existing plugins from the Update Center.

      It could provide a complementary interesting perspective on the JAXB usage amongst actual plugins hosted at the Jenkins Update center.

      Acceptance Criteria

      • list the main (all?) classes of JAXB
      • run the modified version (See with Baptiste or Daniel for the existing patch) to get a report of the usages of these classes inside the hosted plugins
      • Attach the report here, and write up a simple analysis of the content (i.e. is there a lot of usages, easy fix, proposals about what to test more given the outcome, etc.)

      Attachments

        1. all-jaxb-classes
          9 kB
        2. deprecated-and-unused.html
          1 kB
        3. deprecated-and-unused.json
          0.1 kB
        4. usage-by-api.html
          9 kB
        5. usage-by-api.json
          3 kB
        6. usage-by-plugin.html
          11 kB
        7. usage-by-plugin.json
          193 kB

        Issue Links

          Activity

            So, I first extracted all JAXB related classes from both 2.3.0 jars:

            for zip in *.jar
            do
            echo "Extracting classes from $zip"; unzip -t $zip | grep .class | cut -d: -f2 | tr -s ' ' | cut -d ' ' -f2 | cut -d'$' -f1 | cut -d'.' -f1
            done > all-jaxb-classes
            

            I attached the all-jaxb-classes to the JIRA.

            Then, I ran the tool using a build of the current PR (6ba7b80e855e1d68480f48b468aedc1581d73ab1 state):

            java -jar target/deprecated-usage-in-plugins-0.1-SNAPSHOT-jar-with-dependencies.jar --additionalClasses additional-classes.txt --onlyAdditionalClasses
            Downloaded update-center.json
            All files are up to date (1590 plugins)
            Analyzing deprecated api in Jenkins
            additional-classes.txt found, adding 237 classes
                    adding com/sun/istack/Builder
                   [snip]
                    adding javax/xml/bind/WhiteSpaceProcessor
                    adding META-INF/versions/9/javax/xml/bind/ModuleUtil
                    adding module-info
            Analyzing deprecated usage in plugins
            .......... .......... .......... .......... ..........
            .......... .......... .......... .......... ..........
            .......... .......... .......... .......... ..........
            .........Writing output/usage-by-plugin.json
            Writing output/usage-by-plugin.html
            Writing output/deprecated-and-unused.json
            Writing output/deprecated-and-unused.html
            Writing output/usage-by-api.json
            Writing output/usage-by-api.html
            duration : 8443 ms at 8 févr. 2019 14:29:07
            

            Attaching the output directory just now.

            batmat Baptiste Mathus added a comment - So, I first extracted all JAXB related classes from both 2.3.0 jars: for zip in *.jar do echo "Extracting classes from $zip"; unzip -t $zip | grep .class | cut -d: -f2 | tr -s ' ' | cut -d ' ' -f2 | cut -d'$' -f1 | cut -d'.' -f1 done > all-jaxb-classes I attached the all-jaxb-classes to the JIRA. Then, I ran the tool using a build of the current PR (6ba7b80e855e1d68480f48b468aedc1581d73ab1 state): java -jar target/deprecated-usage-in-plugins-0.1-SNAPSHOT-jar-with-dependencies.jar --additionalClasses additional-classes.txt --onlyAdditionalClasses Downloaded update-center.json All files are up to date (1590 plugins) Analyzing deprecated api in Jenkins additional-classes.txt found, adding 237 classes adding com/sun/istack/Builder [snip] adding javax/xml/bind/WhiteSpaceProcessor adding META-INF/versions/9/javax/xml/bind/ModuleUtil adding module-info Analyzing deprecated usage in plugins .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .........Writing output/usage-by-plugin.json Writing output/usage-by-plugin.html Writing output/deprecated-and-unused.json Writing output/deprecated-and-unused.html Writing output/usage-by-api.json Writing output/usage-by-api.html duration : 8443 ms at 8 févr. 2019 14:29:07 Attaching the output directory just now.

            Regenerated the reports after I fixed https://github.com/jenkins-infra/deprecated-usage-in-plugins/pull/11/commits/a36b0d3d9e1af8ea82b16627225fb6be94f30670, so the report is only about JAXB classes

            batmat Baptiste Mathus added a comment - Regenerated the reports after I fixed https://github.com/jenkins-infra/deprecated-usage-in-plugins/pull/11/commits/a36b0d3d9e1af8ea82b16627225fb6be94f30670 , so the report is only about JAXB classes
            cat output/usage-by-api.json| jq -r '.[][]' | grep -v '\[' | grep -v '\]' | sed 's/[ ",]//g' | sort -u
            aws-yum-parameter
            azure-keyvault
            azure-vm-agents
            codebeamer-coverage-publisher
            codesonar
            compuware-ispw-operations
            coverity
            cppcheck
            dynatrace-dashboard
            fitnesse
            github-coverage-reporter
            hp-application-automation-tools-plugin
            hp-operations-orchestration-automation-execution-plugin
            hp-quality-center
            ibm-cloud-devops
            ibm-continuous-release
            inflectra-spira-integration
            jclouds-jenkins
            jenkins-reviewbot
            mabl-integration
            maven-metadata-plugin
            micro-focus-performance-center-integration
            notification
            nutanix-calm
            package-parameter
            packageversion
            performance
            pipeline-aws
            policycenter-gate-validator
            qmetry-for-jira-test-management
            refit
            report-info
            sloccount
            sonargraph-plugin
            TestComplete
            testcomplete11-xunit
            testcomplete-xunit
            testinium
            tfs
            veracode-scanner
            windows-azure-storage
            xcode-plugin
            zephyr-enterprise-test-management
            

            So, nothing terribly outstanding when comparing to https://issues.jenkins-ci.org/browse/JENKINS-51965?focusedCommentId=357813&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-357813

            A few differences, but mostly the same. I assume partly because some plugins are actually hosted elsewhere. A bit surprised I didn't find fitnesse before, but well it's another case of DatatypeConverter.

            I am going to close this, and link it to JENKINS-55944, so it can help there. The goal here was mostly to check we didn't miss a lot of plugins from previous analysis, and/or some that would be installed like 100k times and we didn't check they specific case.

            batmat Baptiste Mathus added a comment - cat output/usage-by-api.json| jq -r '.[][]' | grep -v '\[' | grep -v '\]' | sed 's/[ ",]//g' | sort -u aws-yum-parameter azure-keyvault azure-vm-agents codebeamer-coverage-publisher codesonar compuware-ispw-operations coverity cppcheck dynatrace-dashboard fitnesse github-coverage-reporter hp-application-automation-tools-plugin hp-operations-orchestration-automation-execution-plugin hp-quality-center ibm-cloud-devops ibm-continuous-release inflectra-spira-integration jclouds-jenkins jenkins-reviewbot mabl-integration maven-metadata-plugin micro-focus-performance-center-integration notification nutanix-calm package-parameter packageversion performance pipeline-aws policycenter-gate-validator qmetry-for-jira-test-management refit report-info sloccount sonargraph-plugin TestComplete testcomplete11-xunit testcomplete-xunit testinium tfs veracode-scanner windows-azure-storage xcode-plugin zephyr-enterprise-test-management So, nothing terribly outstanding when comparing to https://issues.jenkins-ci.org/browse/JENKINS-51965?focusedCommentId=357813&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-357813 A few differences, but mostly the same. I assume partly because some plugins are actually hosted elsewhere. A bit surprised I didn't find fitnesse before, but well it's another case of DatatypeConverter. I am going to close this, and link it to JENKINS-55944 , so it can help there. The goal here was mostly to check we didn't miss a lot of plugins from previous analysis, and/or some that would be installed like 100k times and we didn't check they specific case.

            Keeping in Review to remember following up on https://github.com/jenkins-infra/deprecated-usage-in-plugins/pull/11 until merged.

            batmat Baptiste Mathus added a comment - Keeping in Review to remember following up on https://github.com/jenkins-infra/deprecated-usage-in-plugins/pull/11 until merged.
            oleg_nenashev Oleg Nenashev added a comment -

            batmat Your PR https://github.com/jenkins-infra/deprecated-usage-in-plugins/pull/11 has been merged. Is anything left to be done here?

            And thanks for the investigation!

            oleg_nenashev Oleg Nenashev added a comment - batmat  Your PR https://github.com/jenkins-infra/deprecated-usage-in-plugins/pull/11  has been merged. Is anything left to be done here? And thanks for the investigation!

            I'm going to close this and file an INFRA ticket to ask for renaming this repo now it can do more than just looking for deprecated classes.

            batmat Baptiste Mathus added a comment - I'm going to close this and file an INFRA ticket to ask for renaming this repo now it can do more than just looking for deprecated classes.

            Filed INFRA-2054 for the renaming.

            Thanks for the nudge Oleg.

            batmat Baptiste Mathus added a comment - Filed INFRA-2054 for the renaming. Thanks for the nudge Oleg.

            People

              batmat Baptiste Mathus
              batmat Baptiste Mathus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: