This is an automated email from the ASF dual-hosted git repository.

siddteotia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new c36d88f7bf Japicmp implementation in pinot-spi (#15684)
c36d88f7bf is described below

commit c36d88f7bf6da99b9fb29851435eeb9378375cd7
Author: Matthew Jack <matvj...@gmail.com>
AuthorDate: Fri May 2 15:31:53 2025 -0700

    Japicmp implementation in pinot-spi (#15684)
    
    * Addition of initial spi change checker code
    
    * Fixes to yaml file, mainly excluding artifacts.zip code to test run 
further
    
    * changing shell file permissions
    
    * add "exit 1" to shell script and mess with TableConfig method signature
    
    * changing shell file permissions again for some reason
    
    * changing git diff checker file path
    
    * second git diff checker file path change
    
    * removing unnecessary code from files, fixed issue with running 
GitDiffChecker, added functionality for displaying line number, and reverted 
temporary change to TableConfig.java
    
    * permission changes
    
    * changing permissions
    
    * fixing compilation error
    
    * fixing parameterization of commits
    
    * trial and error yml file #1
    
    * commit for testing that config file correctly has parameters, changing sh 
file so that "No incorrect..." message only displayed once, and adding blank 
line check to GitDiffChecker
    
    * GitDiffChecker: add case to skip ---. otherwise, change parameters to 
work with pull requests.
    
    * testing
    
    * testing #2
    
    * Revert "testing #2"
    
    This reverts commit 270937f4266ad8403345d7883d911b5a96b0decf.
    
    * yml: change main to master. shell: change main to master and change 
conditional to reflect return type change. java: switch from returning line 
number to string of code, as previous logic did not work if multiple "chunks" 
of code were changed, and added annotation logic that excluded json-related 
annotations.
    
    * yml: comment out apache/pinot condition for now. shell: change error 
message and put text file in my module. java: slightly altered regex after 
rethinking it, removed System.out.println, i think it's not necessary
    
    * java: slightly altered regex to account for interface definitions using 
semicolons and not curly braces
    
    * changing "no incorrect spi changes" value to "0", so if the method 
returns nothing, there isn't an accidental test passing
    
    * minor change to annotation regex, \n changed to $ (end of string)
    
    * fix to pom.xml
    
    * Added logic for outputting line number along with original file code 
snippet
    
    * per testing on another branch, slightly updating line number logic
    
    * Removed my outdated custom Java implementation of pinot-spi change 
checking. Switched to the japicmp plugin, with some modifications to the 
compatibility of checks that japicmp performs. With this, contributors will be 
able to see if they made incompatible SPI changes when running mvn clean, 
rather than waiting until they make a PR. Adding a .jar of pinot-spi that 
japicmp will use for comparisons.
    
    * Per Tianle's comment, added a comment in the pom file explaining our 
justification for using a baseline jar for comparison, and that we need to 
eventually transition away from it.
    
    * Removed code that made annotation changes/deletions incompatible. Fixed 
pom file so that all pinot-spi files are checked
    
    * updated baseline .jar to match updates from apache:master
---
 pinot-spi/pom.xml                                  |  58 +++++++++++++++++++++
 pinot-spi/resources/pinot-spi-japicmp-baseline.jar | Bin 0 -> 619111 bytes
 2 files changed, 58 insertions(+)

diff --git a/pinot-spi/pom.xml b/pinot-spi/pom.xml
index 91927379c0..c5b2b71a89 100644
--- a/pinot-spi/pom.xml
+++ b/pinot-spi/pom.xml
@@ -124,6 +124,64 @@
           <reuseForks>true</reuseForks>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>com.github.siom79.japicmp</groupId>
+        <artifactId>japicmp-maven-plugin</artifactId>
+        <version>0.23.1</version>
+        <configuration>
+          <oldVersion>
+            <file>
+              <path>${basedir}/resources/pinot-spi-japicmp-baseline.jar</path>
+            </file>
+          </oldVersion>
+<!-- If oldVersion were left blank, 1.3.0 would be the baseline version for 
japicmp's comparing. However, we already
+introduced back-incompatible changes since the release of 1.4.0-SNAPSHOT, so 
we are using a baseline .jar of the repo here
+(with version as of PR #15684).
+TODO: At the time of the next Pinot release (1.4.0), update the baseline 
version here to 1.4.0 and remove 
pinot-spi/resources/pinot-spi-japicmp-baseline.jar from repo.-->
+          <newVersion>
+            <file>
+              
<path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
+            </file>
+          </newVersion>
+          <parameter>
+            <includes>org.apache.pinot.spi</includes>
+            <onlyModified>true</onlyModified>
+            <skipXmlReport>true</skipXmlReport>
+            <skipHtmlReport>true</skipHtmlReport>
+            
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
+            <overrideCompatibilityChangeParameters>
+              <overrideCompatibilityChangeParameter>
+                <compatibilityChange>METHOD_NOW_VARARGS</compatibilityChange>
+                <sourceCompatible>false</sourceCompatible>
+              </overrideCompatibilityChangeParameter>
+              <overrideCompatibilityChangeParameter>
+                
<compatibilityChange>METHOD_ABSTRACT_ADDED_IN_IMPLEMENTED_INTERFACE</compatibilityChange>
+                <sourceCompatible>true</sourceCompatible>
+              </overrideCompatibilityChangeParameter>
+              <overrideCompatibilityChangeParameter>
+                
<compatibilityChange>METHOD_ABSTRACT_ADDED_IN_SUPERCLASS</compatibilityChange>
+                <sourceCompatible>true</sourceCompatible>
+              </overrideCompatibilityChangeParameter>
+              <overrideCompatibilityChangeParameter>
+                
<compatibilityChange>METHOD_ABSTRACT_ADDED_TO_CLASS</compatibilityChange>
+                <sourceCompatible>true</sourceCompatible>
+              </overrideCompatibilityChangeParameter>
+              <overrideCompatibilityChangeParameter>
+                
<compatibilityChange>METHOD_ADDED_TO_INTERFACE</compatibilityChange>
+                <sourceCompatible>true</sourceCompatible>
+              </overrideCompatibilityChangeParameter>
+            </overrideCompatibilityChangeParameters>
+          </parameter>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>verify</phase>
+            <goals>
+              <goal>cmp</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/pinot-spi/resources/pinot-spi-japicmp-baseline.jar 
b/pinot-spi/resources/pinot-spi-japicmp-baseline.jar
new file mode 100644
index 0000000000..5bbe61cc40
Binary files /dev/null and b/pinot-spi/resources/pinot-spi-japicmp-baseline.jar 
differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to