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

xiangfu0 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 b99203c6026 Reuse the outer local repo in the assembly-descriptor IT 
and report its real error (#19885)
b99203c6026 is described below

commit b99203c6026134219744f4f9df4a607c458c4b6f
Author: Xiang Fu <[email protected]>
AuthorDate: Fri Oct 23 11:42:33 2026 -0700

    Reuse the outer local repo in the assembly-descriptor IT and report its 
real error (#19885)
    
    The maven-invoker IT in pinot-plugins/assembly-descriptor runs against a 
fresh,
    isolated target/it-repo, so every Maven plugin of its package lifecycle and 
all
    of their transitive dependencies (~500 files) were downloaded from Central 
again
    on every run, and any transient download error failed the IT. The invoker 
also
    runs verify.groovy in a finally block, so the hook's NoSuchFileException 
for the
    missing plugin zip replaced the real "build exited with code N" message in 
the
    CI console ("Pinot Integration Test Set 2", Build Project step).
    
    - Pass maven.repo.local.tail=${settings.localRepository} to the IT build so 
that
      Maven 3.9+ reads everything missing from it-repo out of the outer build's
      local repository (read-only) before going to Central. The Pinot artifacts
      installed into it-repo still take precedence.
    - Pin the IT's lifecycle plugins to the outer build's versions through the
      existing @property@ filtering so that they are found in the tail.
    - Fail verify.groovy with the tail of the IT's build.log when the zip is
      missing, so the console shows the real error.
---
 pinot-plugins/assembly-descriptor/pom.xml             | 14 ++++++++++++++
 .../src/it/projects/simple-assembly/pom.xml           | 19 ++++++++++++++++++-
 .../src/it/projects/simple-assembly/verify.groovy     | 12 +++++++++++-
 3 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/pinot-plugins/assembly-descriptor/pom.xml 
b/pinot-plugins/assembly-descriptor/pom.xml
index df01003e814..439a5e04240 100644
--- a/pinot-plugins/assembly-descriptor/pom.xml
+++ b/pinot-plugins/assembly-descriptor/pom.xml
@@ -45,6 +45,9 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-invoker-plugin</artifactId>
         <configuration>
+          <!-- The IT build resolves the Pinot artifacts from this isolated 
repo, which invoker:install populates from
+               the reactor build (this module plus the extra artifacts below; 
all of them are reactor upstreams of this
+               module, so a parallel build finishes them before this module 
starts). -->
           
<localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
           <extraArtifacts>
             
<artifact>org.apache.pinot:pinot-spi:${project.version}:jar</artifact>
@@ -53,12 +56,23 @@
                  resolve pinot-spi's parent chain during the simple-assembly 
build. -->
             
<artifact>org.apache.pinot:pinot-bom:${project.version}:pom</artifact>
           </extraArtifacts>
+          <properties>
+            <!-- Everything else the IT build needs (Maven plugins and 
third-party dependencies, ~500 files) is read
+                 from the outer build's local repository instead of being 
downloaded from Central into the fresh
+                 it-repo on every run, where any transient download error 
fails the IT. The tail is read-only and is
+                 only consulted for artifacts missing from it-repo (Maven 
3.9+; older versions ignore the property). -->
+            
<maven.repo.local.tail>${settings.localRepository}</maven.repo.local.tail>
+          </properties>
           <projectsDirectory>src/it/projects</projectsDirectory>
           <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
           <postBuildHookScript>verify</postBuildHookScript>
           <filterProperties> <!-- for @property@ in pom.xml -->
             
<commons-lang3.version>${commons-lang3.version}</commons-lang3.version>
+            
<version.maven-assembly-plugin>${version.maven-assembly-plugin}</version.maven-assembly-plugin>
             
<version.maven-compiler-plugin>${version.maven-compiler-plugin}</version.maven-compiler-plugin>
+            
<version.maven-jar-plugin>${version.maven-jar-plugin}</version.maven-jar-plugin>
+            
<version.maven-resources-plugin>${version.maven-resources-plugin}</version.maven-resources-plugin>
+            
<version.maven-surefire-plugin>${version.maven-surefire-plugin}</version.maven-surefire-plugin>
             
<maven.compiler.release>${maven.compiler.release}</maven.compiler.release>
             <pinot.version>${project.version}</pinot.version>
           </filterProperties>
diff --git 
a/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/pom.xml 
b/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/pom.xml
index 1fa48b13447..80fd427a15c 100644
--- a/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/pom.xml
+++ b/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/pom.xml
@@ -34,18 +34,35 @@
   <build>
     <pluginManagement>
       <plugins>
+        <!-- Use the plugin versions of the outer Pinot build so that they 
resolve from its local repository
+             (maven.repo.local.tail in the invoker configuration) instead of 
being downloaded for every IT run. -->
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>@version.maven-compiler-plugin@</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>@version.maven-jar-plugin@</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>@version.maven-resources-plugin@</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>@version.maven-surefire-plugin@</version>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-assembly-plugin</artifactId>
-        <version>3.7.1</version>
+        <version>@version.maven-assembly-plugin@</version>
         <dependencies>
           <dependency>
             <groupId>@project.groupId@</groupId>
diff --git 
a/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/verify.groovy
 
b/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/verify.groovy
index 354b74ce4eb..857b45f421c 100644
--- 
a/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/verify.groovy
+++ 
b/pinot-plugins/assembly-descriptor/src/it/projects/simple-assembly/verify.groovy
@@ -24,7 +24,17 @@ def expected = [
     "simple-assembly/commons-lang3-${commonslang3_version}.jar"
 ] as Set
 
-def entries = new 
File(basedir,'target/simple-assembly-0.0.1-SNAPSHOT-plugin.zip').with {
+def zip = new File(basedir, 'target/simple-assembly-0.0.1-SNAPSHOT-plugin.zip')
+if (!zip.isFile()) {
+  // The invoker runs this script even when the IT build itself failed, and 
the exception thrown here then replaces
+  // the invoker's own "build exited with code N" message in the console. 
Include the end of the IT build log so that
+  // the console shows the real error instead of just a missing-file exception.
+  def buildLog = new File(basedir, 'build.log')
+  def logTail = buildLog.isFile() ? 
buildLog.readLines().takeRight(100).join('\n') : '(no build.log found)'
+  throw new AssertionError("${zip} was not produced; end of 
${buildLog}:\n${logTail}" as String)
+}
+
+def entries = zip.with {
   f ->
     def archive = new ZipFile(f)
     def result = archive.entries().findAll{ !it.directory }.collect { it.name 
} as Set


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to