voonhous opened a new pull request, #19792:
URL: https://github.com/apache/hudi/pull/19792

   ### Describe the issue this Pull Request addresses
   
   Master CI is red since #19162 (6fd80965): 
`test-spark-java17-scala-other-tests` fails in its "Scala FT - Spark" step with
   
   ```
   [WARNING] Files with unapproved licenses:
     .../hudi-spark-datasource/hudi-spark/metastore_db/db.lck
     .../hudi-spark-datasource/hudi-spark/metastore_db/service.properties
     ...
   ```
   
   #19162 added `org.apache.spark.sql.hive` to the scalatest wildcard lists, so 
`TestSparkCatalogMetaStoreClient` (a `SparkSession.enableHiveSupport()` suite) 
now runs in that job's UT step. The embedded Derby metastore it boots writes 
`metastore_db/` into the module working directory, and the following maven 
invocation in the same job runs the RAT check over the tree and flags the 
unlicensed database files.
   
   ### Summary and Changelog
   
   - Root pom: exclude `**/metastore_db/**` from the RAT check, so any 
Hive-enabled test in any module is safe (`derby.log` was already covered by 
`**/*.log`).
   - `TestSparkCatalogMetaStoreClient`: point the embedded metastore at a temp 
directory (`spark.hadoop.javax.jdo.option.ConnectionURL` and 
`derby.system.home`) and delete it in `afterAll`, so nothing is left in the 
module directory in the first place.
   
   Verified locally: with a planted `hudi-spark/metastore_db/db.lck`, `mvn 
apache-rat:check -pl hudi-spark-datasource/hudi-spark` fails on master's pom 
and passes with the exclude; after running the suite with the test change, no 
`metastore_db`/`derby.log` remains under the module.
   
   ### Impact
   
   CI fix; no production code changed.
   
   ### Risk Level
   
   none
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable
   


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