karuppuchamysuresh opened a new pull request, #37934:
URL: https://github.com/apache/shardingsphere/pull/37934

   Raise minimum JDK compilation version from 11 to 21                          
                                                                         
                                                                                
                                                                           
     Fixes #37884.                                                              
                                                                           
                                                                                
                                                                           
     ## Changes proposed in this pull request:                                  
                                                                           
                                                                                
                                                                           
     ### Build Configuration                                                    
                                                                           
     - **Update Maven compiler source to JDK 21** via new 
`compile.java.version` property                                                 
                 
     - **Maintain JDK 8 runtime compatibility** - `maven.compiler.target` and 
`maven.compiler.release` remain at 8                                         
     - **Update Maven enforcer plugin** to require JDK 21+ for builds (changed 
from JDK 8+)                                                                
     - **Update test module** - `test/e2e/operation/pipeline/pom.xml` compiler 
release updated from 17 to 21                                               
                                                                                
                                                                           
     ### CI/CD Workflows                                                        
                                                                           
     Updated all GitHub Actions workflows to use JDK 21:                        
                                                                           
     - `.github/workflows/ci.yml` - Build and test jobs                         
                                                                           
     - `.github/workflows/e2e-operation.yml` - E2E operation tests              
                                                                           
     - `.github/workflows/e2e-sql.yml` - E2E SQL tests                          
                                                                           
     - `.github/workflows/nightly-build.yml` - All 6 nightly build jobs         
                                                                           
     - `.github/workflows/nightly-check.yml` - CodeQL and coverage jobs         
                                                                           
     - `.github/workflows/nightly-ci.yml` - **Removed JDK 17 from matrix**, now 
tests JDK 21 and 25-ea only                                                
     - `.github/workflows/nightly-e2e-operation.yml` - **Removed JDK 17 from 
matrix**, now tests JDK 21 only                                               
     - `.github/workflows/nightly-sql-parser.yml` - SQL parser tests            
                                                                           
     - `.github/workflows/schedule-report.yml` - Sonar and Jacoco reporting     
                                                                           
                                                                                
                                                                           
     ### Documentation                                                          
                                                                           
     - Updated developer environment setup docs (EN & CN) to require JDK 21+    
                                                                           
     - Updated GraalVM Native Image docs (EN & CN) to require OpenJDK 21+       
                                                                           
                                                                                
                                                                           
     ### Bug Fixes                                                              
                                                                           
     - **Fixed timezone-sensitive test failure** in 
`ResultSetUtilsTest.assertConvertDateValueToLocalDateWithDifferentTimestamps`   
                       
       - Updated `ResultSetUtils.convertDateValue()` to use 
`value.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()` for proper 
timezone handling  
       - Updated test assertions to be timezone-agnostic                        
                                                                           
       - Ensures tests pass in all timezones (previously failed in PST/PDT and 
other UTC- timezones)                                                       
                                                                                
                                                                           
     ## Motivation                                                              
                                                                           
                                                                                
                                                                           
     This change addresses two key limitations with JDK 11:                     
                                                                           
                                                                                
                                                                           
     1. **Jakarta EE 9 Transition** (issue #26041): Enables use of 
`org.eclipse.transformer:transformer-maven-plugin:1.0.0`, which requires JDK 
17+        
     minimum, to support migration from Jakarta EE 8 to Jakarta EE 9.           
                                                                           
                                                                                
                                                                           
     2. **HiveServer2 JDBC Driver Upgrade**: Unlocks ability to upgrade from 
HiveServer2 JDBC Driver 4.0.1 to 4.2.0+ (which requires JDK 21), enabling     
     testing of local transaction support for HiveServer2 on Iceberg v4 tables. 
                                                                           
                                                                                
                                                                           
     ## Important Notes                                                         
                                                                           
                                                                                
                                                                           
     ### Scope of Changes                                                       
                                                                           
     - ✅ **Compile-time requirement only** - Developers must use JDK 21+ to 
build the project                                                             
     - ✅ **Runtime compatibility preserved** - Published artifacts still run on 
JDK 8+                                                                    
     - ✅ **Unit tests still run on JDK 8** - No impact to runtime test coverage 
                                                                          
     - ⚠️ **JDK 25 not yet fully supported** - Cannot use JDK 25 for all 
modules because `shardingsphere-test-native` depends on GraalVM CE for JDK 24   
  
     (related to OpenJDK bug openjdk/jdk#22606)                                 
                                                                           
                                                                                
                                                                           
     ### Breaking Changes                                                       
                                                                           
     - **Build environment only**: Contributors and CI systems must now use JDK 
21 or higher to compile the project                                        
     - **No runtime breaking changes**: End users can still run ShardingSphere 
on JDK 8+                                                                   
                                                                                
                                                                           
     ## Testing                                                                 
                                                                           
                                                                                
                                                                           
     - ✅ Verified Maven enforcer plugin blocks builds with JDK < 21             
                                                                          
     - ✅ All unit tests pass (146 tests in infra/executor module)               
                                                                          
     - ✅ Fixed and verified timezone-sensitive test passes across different 
timezones                                                                     
     - ✅ Local build successful: `./mvnw clean install -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`                                    
           
                                                                                
                                                                           
     ---                                                                        
                                                                           
                                                                                
                                                                           
     Before committing this PR, I'm sure that I have checked the following 
options:                                                                        
     - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.                   
     - [x] I have self-reviewed the commit code.                                
                                                                           
     - [ ] I have (or in comment I request) added corresponding labels for the 
pull request.                                                               
     - [x] I have passed maven check locally : `./mvnw clean install -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.                                 
     - [x] I have made corresponding changes to the documentation.              
                                                                           
     - [x] I have added corresponding unit tests for my changes.                
                                                                           
     - [ ] I have updated the Release Notes of the current development version. 
For more details, see [Update Release                                      
     
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to