voonhous commented on code in PR #13493:
URL: https://github.com/apache/hudi/pull/13493#discussion_r2258657229


##########
scripts/release/validate_source_copyright.sh:
##########
@@ -46,10 +46,11 @@ echo -e "\t\tNotice file exists ? [OK]\n"
 
 ### Licensing Check
 echo "Performing custom Licensing Check "
-numfilesWithNoLicense=`find . -iname '*' -type f | grep -v NOTICE | grep -v 
LICENSE | grep -v '.jpg' | grep -v '.json' | grep -v '.hfile' | grep -v '.data' 
| grep -v '.commit' | grep -v emptyFile | grep -v DISCLAIMER | grep -v KEYS | 
grep -v '.mailmap' | grep -v '.sqltemplate' | grep -v 'banner.txt' | grep -v 
'.txt' | grep -v "fixtures" | xargs grep -L "Licensed to the Apache Software 
Foundation (ASF)" | wc -l`
+# Exclude the 'hudi-trino-plugin' directory, then ignore ./hudi-trino-plugin 
directory from results
+numfilesWithNoLicense=`find . -path './hudi-trino-plugin' -prune -o -type f 
-iname '*' | grep -v './hudi-trino-plugin' | grep -v NOTICE | grep -v LICENSE | 
grep -v '.jpg' | grep -v '.json' | grep -v '.hfile' | grep -v '.data' | grep -v 
'.commit' | grep -v emptyFile | grep -v DISCLAIMER | grep -v '.sqltemplate' | 
grep -v KEYS | grep -v '.mailmap' | grep -v 'banner.txt' | grep -v '.txt' | 
grep -v "fixtures" | xargs grep -L "Licensed to the Apache Software Foundation 
(ASF)" | wc -l`

Review Comment:
   When running the build stage of hudi-trino-plugin, it will use Trino's own 
license header in `hudi-trino-plugin/.mvn/modernizer`.
   
   Trino relies on airlift these checks as such:
   
   The airbase POM configures the `license-maven-plugin`. This plugin 
automatically runs during the build (usually in the verify phase) and performs 
two key actions:
   
   1. **Scans Dependencies**: It inspects all transitive dependencies of the 
project.
   2. **Validates Licenses**: It checks the license of each dependency against 
a pre-approved "allowlist" defined within the airbase parent. If a dependency 
has a missing license or a license that is not on the approved list, the build 
will fail.
   
   This was my testing path that allowed me to discover this:
   1. Changed all `hudi-trino-plugin` code to use all hudi-repo license header 
string
       - hudi-repo license header check passes, but fails when building 
`hudi-trino-plugin` separately
   2. Reverted all license header to the original string, purposely left a few 
license header in hudi-repo format and it triggered that error
   
   Hence, I think we can let trino's own airlift check handle this, and ignored 
all `hudi-trino-plugin` checks.



-- 
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