zhang-arvin opened a new pull request, #13168: URL: https://github.com/apache/gravitino/pull/13168
### What changes were proposed in this pull request? `createRuntimeJobTemplate` fetches every job artifact (executable, scripts / jars / files / archives) into a single staging directory keyed only by the artifact's basename. Two distinct source URIs sharing a basename therefore silently overwrite each other — e.g. an auxiliary script overwrites the executable — and the job runs different code than requested. This PR adds an up-front check (`ensureDistinctArtifactBasenames`) that detects basename collisions across all artifacts of a template before any file is staged and fails with a clear `IllegalArgumentException` asking the user to rename one of the files. ### Why are the changes needed? Fixes #13158 ### How was this patch tested? - Added `TestJobManager#testCreateRuntimeJobTemplateRejectsArtifactsWithSameBasename` covering the executable-vs-script collision from the issue report. - Existing job manager tests unchanged. -- 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]
