From 0af60754e5b5c25b3b0e61f4b66e2138c4f7e253 Mon Sep 17 00:00:00 2001 From: Jonathan Giles Date: Mon, 18 Nov 2019 09:00:53 +1300 Subject: [PATCH 01/20] Introducing Revapi into build system. Currently it is configured to not fail the build (because it is comparing the 1.0.0-preview.N releases rather than 1.0.0). Once this versioning issue is fixed, we should flip this to fail the build. --- .../templates/jobs/archetype-sdk-client.yml | 6 +-- eng/revapi.json | 11 ++++ pom.client.xml | 54 +++++++++++++++++++ 3 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 eng/revapi.json diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index c2cc7828e485..10b37c8902e6 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -165,9 +165,9 @@ jobs: publishJUnitResults: false goals: 'install' - # Run SpotBugs, CheckStyle and JavaDoc tools to ensure high code quality - these will fail the build if issues are found + # Run SpotBugs, CheckStyle, Revapi, and JavaDoc tools to ensure high code quality - these will fail the build if issues are found - task: Maven@3 - displayName: 'Run SpotBugs, CheckStyle, and JavaDoc' + displayName: 'Run SpotBugs, CheckStyle, Revapi, and JavaDoc' inputs: mavenPomFile: pom.client.xml options: '-DskipTests -Dgpg.skip' @@ -176,7 +176,7 @@ jobs: jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: false - goals: 'spotbugs:check checkstyle:checkstyle-aggregate javadoc:aggregate' + goals: 'spotbugs:check checkstyle:checkstyle-aggregate revapi:check javadoc:aggregate' # We run a separate SpotBugs aggregate report step here to roll-up all the issues identified per-module - task: Maven@3 diff --git a/eng/revapi.json b/eng/revapi.json new file mode 100644 index 000000000000..8470ddbe62e6 --- /dev/null +++ b/eng/revapi.json @@ -0,0 +1,11 @@ +[ + { + "extension": "revapi.filter", + "configuration": { + "elements": { + "include" : ["class com\\.azure\\..*"], + "exclude" : ["class com\\.azure\\..*\\.implementation(\\..*)?"] + } + } + } +] diff --git a/pom.client.xml b/pom.client.xml index a5692b96f27c..7932180e9ee6 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -340,6 +340,34 @@ build-helper-maven-plugin 3.0.0 + + + org.revapi + revapi-maven-plugin + ${revapi-maven-plugin.version} + + + ${session.executionRootDirectory}/eng/revapi.json + + false + false + + + + org.revapi + revapi-java + ${revapi-java.version} + + + + + + check + + + + + @@ -645,6 +673,32 @@ + + + org.revapi + revapi-maven-plugin + ${revapi-maven-plugin.version} + + + ${session.executionRootDirectory}/eng/revapi.json + + false + false + + + + + report + + + + false + + report-aggregate + + + + From da3f64d5985e92f1a1d8e178aa50eeb522389aa9 Mon Sep 17 00:00:00 2001 From: Connie Date: Mon, 2 Dec 2019 23:16:58 -0800 Subject: [PATCH 02/20] Add revapi versions to external-dependencies.txt --- eng/versioning/external_dependencies.txt | 7 +++++-- pom.client.xml | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 616f212a45a9..8bb071c8802d 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -75,7 +75,7 @@ org.eclipse.jetty:jetty-server;9.4.11.v20180605 org.hamcrest:hamcrest-all;1.3 org.hamcrest:hamcrest-library;2.2 # https://junit.org/junit5/docs/current/user-guide/#running-tests-ide-intellij-idea -# use 5.4.2 now since Version 5.5.2 as of 11.2019 fails to discover tests +# use 5.4.2 now since Version 5.5.2 as of 11.2019 fails to discover tests # https://youtrack.jetbrains.com/issue/IDEA-223700 # org.junit:junit-bom;5.4.2 is a pom file that will add its dependencyManagement section to parent pom's which # effectively means that each dependency needs to be listed here. @@ -144,9 +144,12 @@ org.jacoco:jacoco-maven-plugin;0.8.4 org.jacoco:org.jacoco.agent;0.8.4 org.mockito:mockito-core;3.0.0 org.nanohttpd:nanohttpd;2.3.1 +org.revapi:revapi-java;0.20.0 +org.revapi:revapi-maven-plugin;0.11.2 + # External Dependency Exceptions -# This section is for external dependencies whose versions were different than +# This section is for external dependencies whose versions were different than # what was defined in the parent pom. # Format; # _groupId:artifactId;dependency-version diff --git a/pom.client.xml b/pom.client.xml index 7932180e9ee6..a1c0b054121c 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -302,6 +302,8 @@ + + org.jacoco jacoco-maven-plugin @@ -341,10 +343,11 @@ 3.0.0 + org.revapi revapi-maven-plugin - ${revapi-maven-plugin.version} + 0.11.2 ${session.executionRootDirectory}/eng/revapi.json @@ -356,7 +359,7 @@ org.revapi revapi-java - ${revapi-java.version} + 0.20.0 @@ -367,7 +370,6 @@ - From 5456650d8c0f68915a38d49f0c1e339f59be4c5c Mon Sep 17 00:00:00 2001 From: Connie Date: Tue, 3 Dec 2019 09:40:10 -0800 Subject: [PATCH 03/20] Fix lingering version number. --- pom.client.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.client.xml b/pom.client.xml index a1c0b054121c..cd400cb58394 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -679,7 +679,7 @@ org.revapi revapi-maven-plugin - ${revapi-maven-plugin.version} + 0.11.2 ${session.executionRootDirectory}/eng/revapi.json From 491d03b9741bc0be739d9388363cf87bb92d6f7f Mon Sep 17 00:00:00 2001 From: Connie Date: Tue, 3 Dec 2019 15:34:53 -0800 Subject: [PATCH 04/20] Add semver ignore filter. --- eng/revapi.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eng/revapi.json b/eng/revapi.json index 8470ddbe62e6..1b856ddaef34 100644 --- a/eng/revapi.json +++ b/eng/revapi.json @@ -7,5 +7,17 @@ "exclude" : ["class com\\.azure\\..*\\.implementation(\\..*)?"] } } - } + }, + { + "extension": "revapi.semver.ignore", + "configuration": { + "enabled" : true, + "versionIncreaseAllows" : { + "major" : "breaking", + "minor" : "nonBreaking", + "patch" : "equivalent" + }, + "passThroughDifferences": ["java.class.nonPublicPartOfAPI"] + } + } ] From 53a556937db36a738fc47f5740001dec5031f7b2 Mon Sep 17 00:00:00 2001 From: Connie Date: Tue, 3 Dec 2019 17:03:57 -0800 Subject: [PATCH 05/20] Skip revapi during installation. --- eng/pipelines/templates/jobs/archetype-sdk-client.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 10b37c8902e6..c598903e8428 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -59,12 +59,12 @@ jobs: - ${{ each artifact in parameters.Artifacts }}: - script: | - python3 --version + python3 --version python3 eng/versioning/set_versions.py --update-type all --build-type client --build-qualifier dev.$(Build.BuildNumber) --artifact-id ${{artifact.name}} python3 eng/versioning/set_versions.py --update-type all --build-type data --build-qualifier dev.$(Build.BuildNumber) --artifact-id ${{artifact.name}} condition: eq(variables['SetDevVersion'],'true') displayName: Append dev package version suffix for ${{artifact.name}} - + - script: | python3 --version python3 eng/versioning/update_versions.py --update-type all --build-type client @@ -157,7 +157,7 @@ jobs: displayName: 'Install all client libraries (for SpotBugs analysis)' inputs: mavenPomFile: pom.client.xml - options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Dverify-readme' + options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Dverify-readme -Dspotbugs.skip=true -Drevapi.skip=true' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.11' From 52b2319a569cb527a0338acd4b47e0fb238b6b71 Mon Sep 17 00:00:00 2001 From: Connie Date: Tue, 3 Dec 2019 17:04:39 -0800 Subject: [PATCH 06/20] Ignore packages that are under implementation. --- eng/revapi.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eng/revapi.json b/eng/revapi.json index 1b856ddaef34..b14bc7f38252 100644 --- a/eng/revapi.json +++ b/eng/revapi.json @@ -1,10 +1,12 @@ [ { - "extension": "revapi.filter", + "extension": "revapi.java", "configuration": { - "elements": { - "include" : ["class com\\.azure\\..*"], - "exclude" : ["class com\\.azure\\..*\\.implementation(\\..*)?"] + "filter": { + "packages": { + "regex": true, + "exclude" : ["com\\.azure\\..+\\.implementation(\\..+)?"] + } } } }, From 359359b39ae36a4f5700f4ac277a544d6e739710 Mon Sep 17 00:00:00 2001 From: Connie Date: Wed, 4 Dec 2019 09:57:50 -0800 Subject: [PATCH 07/20] Fail build if there are API inconsistencies. --- pom.client.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.client.xml b/pom.client.xml index cd400cb58394..d0911e62c1eb 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -353,7 +353,7 @@ ${session.executionRootDirectory}/eng/revapi.json false - false + true @@ -685,7 +685,7 @@ ${session.executionRootDirectory}/eng/revapi.json false - false + true From 7acb45c57275fefdf47248bf979604f65f83b5fb Mon Sep 17 00:00:00 2001 From: Connie Date: Wed, 4 Dec 2019 11:15:39 -0800 Subject: [PATCH 08/20] Add versionFormat string to compare. --- pom.client.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.client.xml b/pom.client.xml index d0911e62c1eb..1e366239b59d 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -352,6 +352,7 @@ ${session.executionRootDirectory}/eng/revapi.json + ^\d+\.\d+\.\d+$ false true @@ -684,6 +685,7 @@ ${session.executionRootDirectory}/eng/revapi.json + ^\d+\.\d+\.\d+$ false true From d20f4d38c39ef4ef8ba4bff69f261af9b6e637eb Mon Sep 17 00:00:00 2001 From: Connie Date: Wed, 4 Dec 2019 14:29:30 -0800 Subject: [PATCH 09/20] Update ignores or revapi.json --- eng/revapi.json | 73 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/eng/revapi.json b/eng/revapi.json index b14bc7f38252..9f40c1ade28d 100644 --- a/eng/revapi.json +++ b/eng/revapi.json @@ -1,25 +1,56 @@ [ - { - "extension": "revapi.java", - "configuration": { - "filter": { - "packages": { - "regex": true, - "exclude" : ["com\\.azure\\..+\\.implementation(\\..+)?"] - } - } - } - }, - { - "extension": "revapi.semver.ignore", - "configuration": { - "enabled" : true, - "versionIncreaseAllows" : { - "major" : "breaking", - "minor" : "nonBreaking", - "patch" : "equivalent" - }, - "passThroughDifferences": ["java.class.nonPublicPartOfAPI"] + { + "extension": "revapi.java", + "configuration": { + "filter": { + "packages": { + "regex": true, + "exclude": [ "com\\.azure\\..+\\.implementation(\\..+)?" ] } } + } + }, + { + "extension": "revapi.semver.ignore", + "configuration": { + "enabled": true, + "versionIncreaseAllows": { + "major": "breaking", + "minor": "nonBreaking", + "patch": "equivalent" + }, + "passThroughDifferences": [ "java.class.nonPublicPartOfAPI" ] + } + }, + { + "extension": "revapi.ignore", + "configuration": [ + { + "regex": false, + "code": "java.missing.newClass", + "new": "missing-class org.reactivestreams.Publisher", + "justification": "This class is part of the reactive streams initiative in Java." + }, + { + "regex": false, + "code": "java.missing.newClass", + "new": "missing-class reactor.util.context.Context", + "justification": "Reactor is allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." + }, + { + "regex": false, + "code": "java.missing.newClass", + "new": "missing-class com.fasterxml.jackson.databind.ObjectMapper", + "class": "com.azure.corel.util.serializer.JacksonAdapter", + "justification": "This is something we allow in com.azure.corel.util.serializer.JacksonAdapter" + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "old": "missing\\-class reactor\\.core(\\..+)?", + "new": "missing\\-class reactor\\.core(\\..+)?", + "justification": "Reactor is allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." + } + ] + } ] From 2922487c746ee735b6a52d8e884ca5e432c724a2 Mon Sep 17 00:00:00 2001 From: Connie Date: Wed, 4 Dec 2019 15:14:23 -0800 Subject: [PATCH 10/20] Skip revapi in azure-core-test --- sdk/core/azure-core-test/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 7b8789f9786e..e6a918698e92 100644 --- a/sdk/core/azure-core-test/pom.xml +++ b/sdk/core/azure-core-test/pom.xml @@ -137,6 +137,16 @@ + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + true + + From 333713890fab520fa2084af04a849c47add8a2ae Mon Sep 17 00:00:00 2001 From: Connie Date: Wed, 4 Dec 2019 15:23:14 -0800 Subject: [PATCH 11/20] Enable dependency checking. --- pom.client.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.client.xml b/pom.client.xml index 1e366239b59d..b78e1d51b722 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -353,7 +353,7 @@ ${session.executionRootDirectory}/eng/revapi.json ^\d+\.\d+\.\d+$ - false + true true @@ -686,7 +686,7 @@ ${session.executionRootDirectory}/eng/revapi.json ^\d+\.\d+\.\d+$ - false + true true From e60499483a6bc7cde04b19c86c4ba7cb5cd83dcd Mon Sep 17 00:00:00 2001 From: Connie Date: Wed, 4 Dec 2019 15:49:17 -0800 Subject: [PATCH 12/20] Use resource file in sdk-build-tools instead of having to resolve relative path based on pom. --- .../src/main/resources/revapi}/revapi.json | 0 pom.client.xml | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) rename eng/{ => code-quality-reports/src/main/resources/revapi}/revapi.json (100%) diff --git a/eng/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json similarity index 100% rename from eng/revapi.json rename to eng/code-quality-reports/src/main/resources/revapi/revapi.json diff --git a/pom.client.xml b/pom.client.xml index b78e1d51b722..9c2aefdeda57 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -350,13 +350,20 @@ 0.11.2 - ${session.executionRootDirectory}/eng/revapi.json + + revapi/revapi.json + ^\d+\.\d+\.\d+$ true true + + com.azure + sdk-build-tools + 1.0.0 + org.revapi revapi-java @@ -546,7 +553,6 @@ - @@ -676,14 +682,15 @@ - org.revapi revapi-maven-plugin 0.11.2 - ${session.executionRootDirectory}/eng/revapi.json + + revapi/revapi.json + ^\d+\.\d+\.\d+$ true @@ -705,6 +712,7 @@ + From 7ecdace3910b7f627b3b2bd531f2ce6aea21c0d5 Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 09:11:49 -0800 Subject: [PATCH 13/20] Do not check dependencies. --- pom.client.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.client.xml b/pom.client.xml index 9c2aefdeda57..565aec13a851 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -355,7 +355,7 @@ ^\d+\.\d+\.\d+$ - true + false true @@ -693,7 +693,7 @@ ^\d+\.\d+\.\d+$ - true + false true From 7b6deea8ec504e4bd791461354d0edb362e725b4 Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 11:06:39 -0800 Subject: [PATCH 14/20] Fixing new classes. --- .../src/main/resources/revapi/revapi.json | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json index 9f40c1ade28d..e1ebc706d894 100644 --- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json +++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json @@ -26,30 +26,38 @@ "extension": "revapi.ignore", "configuration": [ { - "regex": false, "code": "java.missing.newClass", "new": "missing-class org.reactivestreams.Publisher", "justification": "This class is part of the reactive streams initiative in Java." }, { - "regex": false, "code": "java.missing.newClass", "new": "missing-class reactor.util.context.Context", "justification": "Reactor is allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." }, { - "regex": false, "code": "java.missing.newClass", "new": "missing-class com.fasterxml.jackson.databind.ObjectMapper", - "class": "com.azure.corel.util.serializer.JacksonAdapter", - "justification": "This is something we allow in com.azure.corel.util.serializer.JacksonAdapter" + "class": "com.azure.core.util.serializer.JacksonAdapter", + "justification": "This is something we allow in com.azure.core.util.serializer.JacksonAdapter." }, { "regex": true, "code": "java\\.missing\\.(oldClass|newClass)", - "old": "missing\\-class reactor\\.core(\\..+)?", "new": "missing\\-class reactor\\.core(\\..+)?", "justification": "Reactor is allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class com\\.azure\\.core(?!\\.implementation)(\\..+)?", + "justification": "com.azure.core.* classes are allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class (io|reactor)\\.netty\\..+", + "justification": "Dependencies are not checked. io.netty and reactor.netty are allowed in our azure-core-http-netty package." } ] } From c354b2dda9be2828adcb6f10d04619d74de2eb2e Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 11:56:41 -0800 Subject: [PATCH 15/20] Scope changes to certain classes. --- .../src/main/resources/revapi/revapi.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json index e1ebc706d894..58b961adef5c 100644 --- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json +++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json @@ -38,7 +38,7 @@ { "code": "java.missing.newClass", "new": "missing-class com.fasterxml.jackson.databind.ObjectMapper", - "class": "com.azure.core.util.serializer.JacksonAdapter", + "elementKind": "class", "justification": "This is something we allow in com.azure.core.util.serializer.JacksonAdapter." }, { @@ -57,7 +57,17 @@ "regex": true, "code": "java\\.missing\\.(oldClass|newClass)", "new": "missing\\-class (io|reactor)\\.netty\\..+", - "justification": "Dependencies are not checked. io.netty and reactor.netty are allowed in our azure-core-http-netty package." + "exampleUseChainInOldApi": ".*com\\.azure\\.core\\.http\\.netty\\.NettyAsyncHttpClientBuilder.*", + "elementKind": "class", + "justification": "Dependencies are not checked. io.netty and reactor.netty are allowed in azure-core-http-netty." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class okhttp3\\..+", + "exampleUseChainInOldApi": ".*com\\.azure\\.core\\.http\\.okhttp\\.OkHttpAsyncHttpClientBuilder.*", + "elementKind": "class", + "justification": "Dependencies are not checked. okhttp3 is allowed in azure-core-http-okhttp." } ] } From 26154da327faab65aa1a3cbe34153c21c2bc1372 Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 12:58:36 -0800 Subject: [PATCH 16/20] Add ignores for storage.common --- .../src/main/resources/revapi/revapi.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json index 58b961adef5c..f631d71db905 100644 --- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json +++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json @@ -39,7 +39,7 @@ "code": "java.missing.newClass", "new": "missing-class com.fasterxml.jackson.databind.ObjectMapper", "elementKind": "class", - "justification": "This is something we allow in com.azure.core.util.serializer.JacksonAdapter." + "justification": "We allow this in com.azure.core.util.serializer.JacksonAdapter." }, { "regex": true, @@ -68,6 +68,14 @@ "exampleUseChainInOldApi": ".*com\\.azure\\.core\\.http\\.okhttp\\.OkHttpAsyncHttpClientBuilder.*", "elementKind": "class", "justification": "Dependencies are not checked. okhttp3 is allowed in azure-core-http-okhttp." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class com\\.azure\\.storage\\.common\\..+", + "exampleUseChainInOldApi": ".*com\\.azure\\.storage\\..*", + "elementKind": "class", + "justification": "Dependencies are not checked. azure-storage-common is used in the storage modules." } ] } From 67113e4088b99ea286a7465e7a6b129697625574 Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 13:11:22 -0800 Subject: [PATCH 17/20] Fixing other ignores --- .../src/main/resources/revapi/revapi.json | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json index f631d71db905..80690cc2cfe2 100644 --- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json +++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json @@ -38,7 +38,6 @@ { "code": "java.missing.newClass", "new": "missing-class com.fasterxml.jackson.databind.ObjectMapper", - "elementKind": "class", "justification": "We allow this in com.azure.core.util.serializer.JacksonAdapter." }, { @@ -58,7 +57,6 @@ "code": "java\\.missing\\.(oldClass|newClass)", "new": "missing\\-class (io|reactor)\\.netty\\..+", "exampleUseChainInOldApi": ".*com\\.azure\\.core\\.http\\.netty\\.NettyAsyncHttpClientBuilder.*", - "elementKind": "class", "justification": "Dependencies are not checked. io.netty and reactor.netty are allowed in azure-core-http-netty." }, { @@ -66,16 +64,21 @@ "code": "java\\.missing\\.(oldClass|newClass)", "new": "missing\\-class okhttp3\\..+", "exampleUseChainInOldApi": ".*com\\.azure\\.core\\.http\\.okhttp\\.OkHttpAsyncHttpClientBuilder.*", - "elementKind": "class", "justification": "Dependencies are not checked. okhttp3 is allowed in azure-core-http-okhttp." }, { "regex": true, "code": "java\\.missing\\.(oldClass|newClass)", - "new": "missing\\-class com\\.azure\\.storage\\.common\\..+", + "new": "missing\\-class com\\.azure\\.storage\\..+", "exampleUseChainInOldApi": ".*com\\.azure\\.storage\\..*", - "elementKind": "class", "justification": "Dependencies are not checked. azure-storage-common is used in the storage modules." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class ((com\\.azure\\.messaging\\.eventhubs\\.models\\..+)|(com\\.azure\\.storage\\.blob\\.BlobContainerAsyncClient))", + "exampleUseChainInNewApi": ".*com\\.azure\\.messaging\\.eventhubs\\.checkpointstore\\.blob\\..*", + "justification": "azure-messaging-eventhubs and azure-storage-blob are used in the Event Hubs checkpoint store." } ] } From f07e9e3e84a99dd04bf34230a253723c4fcf0753 Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 13:47:43 -0800 Subject: [PATCH 18/20] Remove duplicate spotbugs.skip --- eng/pipelines/templates/jobs/archetype-sdk-client.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index c598903e8428..7bb93e757447 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -157,7 +157,7 @@ jobs: displayName: 'Install all client libraries (for SpotBugs analysis)' inputs: mavenPomFile: pom.client.xml - options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Dverify-readme -Dspotbugs.skip=true -Drevapi.skip=true' + options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dverify-readme' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.11' From 11a80d792113191855fdd25e4e3692a28449ee21 Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 13:47:57 -0800 Subject: [PATCH 19/20] Revapi not needed for aggregate report. --- eng/spotbugs-aggregate-report/pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml index df939235380f..51691aadf659 100644 --- a/eng/spotbugs-aggregate-report/pom.xml +++ b/eng/spotbugs-aggregate-report/pom.xml @@ -123,6 +123,15 @@ + + + org.revapi + revapi-maven-plugin + 0.11.2 + + true + + From d6ed7fd42b181b12c8ff9a2f98ff0842fef30bbd Mon Sep 17 00:00:00 2001 From: Connie Date: Fri, 6 Dec 2019 21:40:35 -0800 Subject: [PATCH 20/20] Fixing breaks in azure-core --- .../src/main/resources/revapi/revapi.json | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json index 80690cc2cfe2..02f850424869 100644 --- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json +++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json @@ -26,18 +26,22 @@ "extension": "revapi.ignore", "configuration": [ { - "code": "java.missing.newClass", - "new": "missing-class org.reactivestreams.Publisher", + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class org\\.reactivestreams\\.Publisher", "justification": "This class is part of the reactive streams initiative in Java." }, { - "code": "java.missing.newClass", - "new": "missing-class reactor.util.context.Context", + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class reactor\\.util\\.context\\.Context", "justification": "Reactor is allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." }, { - "code": "java.missing.newClass", - "new": "missing-class com.fasterxml.jackson.databind.ObjectMapper", + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class com\\.fasterxml\\.jackson\\.databind\\.ObjectMapper", + "exampleUseChainInNewApi": ".*com\\.azure\\.core\\.util\\.serializer\\.JacksonAdapter.*", "justification": "We allow this in com.azure.core.util.serializer.JacksonAdapter." }, {