qianlan717 opened a new pull request, #59263:
URL: https://github.com/apache/spark/pull/59263

   ### What changes were proposed in this pull request?
   
   Update `ArtifactManager.clone()` to copy the parent artifact directory 
entries individually while excluding the top-level `.ivy-cache` directory. 
Installed session artifacts, including resolved JARs, continue to be copied.
   
   The cloned artifact manager creates its own Ivy cache lazily if it 
subsequently performs Maven resolution. A regression test verifies that 
installed JARs are retained, the parent cache is skipped, and resolution in the 
clone creates a fresh cache.
   
   ### Why are the changes needed?
   
   The per-session Maven resolver stores disposable Ivy state under 
`artifactPath/.ivy-cache`. Recursively copying this cache into every cloned 
session duplicates downloaded dependencies, increasing clone latency and disk 
usage for large dependency trees.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Cloning a session after Maven dependency resolution no longer copies 
the parent session's disposable Ivy cache. Installed artifacts remain 
available, and later Maven resolution in the cloned session continues to work 
with a fresh cache.
   
   ### How was this patch tested?
   
   Added a regression test to `ArtifactManagerIvySettingsSuite`.
   
   The following suites passed:
   
   ```
   build/sbt 'sql/testOnly 
org.apache.spark.sql.artifact.ArtifactManagerIvySettingsSuite'
   build/sbt 'sql/testOnly org.apache.spark.sql.artifact.ArtifactManagerSuite'
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-5)
   


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


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

Reply via email to