Repository navigation
Conversation
Path.resolve drops the cache prefix when a model name or version is absolute, so deploy can delete and extract outside ml_cache. Reject absolute components and any normalized path that leaves the cache root. Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
PR Reviewer Guide 🔍(Review updated until commit 9f9bf91)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 9f9bf91
Previous suggestionsSuggestions up to commit ec10acf
|
|
this changed failed the IT |
Path.of() builds a default-provider path, which Lucene's mock filesystem rejects during integ tests. Resolve each component with the cache path's own filesystem. Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
|
Persistent review updated to latest commit 9f9bf91 |
|
@mingshl Thanks for pointing out! The model name and version are appended to a directory under The fix adds |
Description
Model name and version are appended to cache directories with
Path.resolve. An absolute component replaces the cache prefix, and a relative component containing..can leave the cache after normalization. Deploy then deletes that directory and extracts the model archive there.resolveWithinrejects empty components, absolute components, and any normalized path outside the corresponding cache root.getModelCachePath,getRegisterModelPath, andgetDeployModelZipPathuse it. Relative names such ashuggingface/sentence-transformers/all-MiniLM-L6-v2still stay inside the cache.This pull request targets
mainonly. Backports can follow after review.Related Issues
No existing issue is linked.
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.