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

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


The following commit(s) were added to refs/heads/master by this push:
     new ffcee97af [KYUUBI #5837] [INFRA] Only enable Jacoco with explicit 
profile
ffcee97af is described below

commit ffcee97afe8662f28999038a0ca6ec85af03e7cb
Author: Cheng Pan <[email protected]>
AuthorDate: Sun Dec 10 23:58:59 2023 +0800

    [KYUUBI #5837] [INFRA] Only enable Jacoco with explicit profile
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    Currently, we always enable Jacoco, which would add additional building 
time and produce lots of HTML files, also increase the IDEA indexing burden.
    
    <img width="1065" alt="image" 
src="https://github.com/apache/kyuubi/assets/26535726/6276f309-8ba4-4563-96d6-91cb53ce20a5";>
    
    ## Describe Your Solution ๐Ÿ”ง
    
    Add a new maven profile `codecov`, only enable it in CI with codecov 
enabled.
    
    ## Types of changes :bookmark:
    
    - [ ] Bugfix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
    
    ## Test Plan ๐Ÿงช
    
    See CI result.
    
    ---
    
    # Checklists
    ## ๐Ÿ“ Author Self Checklist
    
    - [x] My code follows the [style 
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
 of this project
    - [x] I have performed a self-review
    - [ ] I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [ ] I have added tests that prove my fix is effective or that my feature 
works
    - [x] New and existing unit tests pass locally with my changes
    - [x] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    ## ๐Ÿ“ Committer Pre-Merge Checklist
    
    - [x] Pull request title is okay.
    - [x] No license issues.
    - [x] Milestone correctly set?
    - [x] Test coverage is ok
    - [x] Assignees are selected.
    - [x] Minimum number of approvals
    - [x] No changes are requested
    
    **Be nice. Be informative.**
    
    Closes #5837 from pan3793/codecov.
    
    Closes #5837
    
    97d0b22de [Cheng Pan] fi
    c60367dd1 [Cheng Pan] fix
    a0e8910bc [Cheng Pan] Only enable Jacoco with explicit profile
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .github/workflows/master.yml |  3 +++
 dev/kyuubi-codecov/pom.xml   | 46 +++++++++++++++++++++++++-------------------
 pom.xml                      | 17 +++++++++++-----
 3 files changed, 41 insertions(+), 25 deletions(-)

diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index c51fdabf9..47147a9b9 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -106,6 +106,9 @@ jobs:
           python-version: '3.9'
       - name: Build and test Kyuubi and Spark with maven w/o linters
         run: |
+          if [[ "${{ matrix.java }}" == "8" && "${{ matrix.spark }}" == "3.4" 
&& "${{ matrix.spark-archive }}" == "" ]]; then
+            MVN_OPT="${MVN_OPT} -Pcodecov"
+          fi
           TEST_MODULES="dev/kyuubi-codecov"
           ./build/mvn clean install ${MVN_OPT} -pl ${TEST_MODULES} -am \
           -Pjava-${{ matrix.java }} -Pspark-${{ matrix.spark }} 
-Pspark-authz-hudi-test ${{ matrix.spark-archive }} ${{ matrix.exclude-tags }}
diff --git a/dev/kyuubi-codecov/pom.xml b/dev/kyuubi-codecov/pom.xml
index 0f22c3316..cdf798273 100644
--- a/dev/kyuubi-codecov/pom.xml
+++ b/dev/kyuubi-codecov/pom.xml
@@ -142,26 +142,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>report-agg</id>
-                        <goals>
-                            <goal>report-aggregate</goal>
-                        </goals>
-                        <phase>verify</phase>
-                        <configuration>
-                            <dataFileIncludes>
-                                
<dataFileInclude>**/jacoco*.exec</dataFileInclude>
-                            </dataFileIncludes>
-                            
<outputDirectory>${project.reporting.outputDirectory}/jacoco-aggregate-all</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
@@ -241,5 +221,31 @@
                 </dependency>
             </dependencies>
         </profile>
+        <profile>
+            <id>codecov</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.jacoco</groupId>
+                        <artifactId>jacoco-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>report-agg</id>
+                                <goals>
+                                    <goal>report-aggregate</goal>
+                                </goals>
+                                <phase>verify</phase>
+                                <configuration>
+                                    <dataFileIncludes>
+                                        
<dataFileInclude>**/jacoco*.exec</dataFileInclude>
+                                    </dataFileIncludes>
+                                    
<outputDirectory>${project.reporting.outputDirectory}/jacoco-aggregate-all</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git a/pom.xml b/pom.xml
index 82c921a13..62791a068 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2058,11 +2058,6 @@
                 <artifactId>spotless-maven-plugin</artifactId>
             </plugin>
 
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
@@ -2426,6 +2421,18 @@
             </properties>
         </profile>
 
+        <profile>
+            <id>codecov</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.jacoco</groupId>
+                        <artifactId>jacoco-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
         <profile>
             <id>apache-release</id>
             <build>

Reply via email to