rameshreddy-adutla opened a new pull request, #10212: URL: https://github.com/apache/gravitino/pull/10212
### What changes were proposed in this pull request? Validate that the source path exists before creating a symlink in `fetchFileFromUri`. Previously, a dangling symlink was silently created when the source file did not exist, causing failures downstream instead of at fetch time. ### Why are the changes needed? `JobManager.fetchFileFromUri` currently reports success for `file:` URIs by creating a symlink in the staging directory, even when the source path does not exist. This creates a dangling symlink and returns a seemingly valid staged path, causing failures later when the file is consumed instead of failing at fetch time. ### Does this PR introduce _any_ user-facing change? No. This is an internal defensive check — the external API is unchanged. Jobs that previously failed late with a confusing error will now fail early with a clear message. ### How was this patch tested? Added unit test `testFetchFileFromUriWithMissingLocalFileShouldFail` (as suggested in #10168) that: 1. Creates a staging directory 2. Constructs a `file:` URI pointing to a non-existent path 3. Asserts that `fetchFileFromUri` throws `RuntimeException` Closes #10168 -- 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]
