From 16c68ac526b7f67fdbac3cbf0166a05f576625ed Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Thu, 16 Nov 2023 12:43:16 +0100 Subject: [PATCH] Enable spark_jar_tasks with local JAR libraries --- bundle/config/mutator/translate_paths_jobs.go | 4 ++-- bundle/config/mutator/translate_paths_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundle/config/mutator/translate_paths_jobs.go b/bundle/config/mutator/translate_paths_jobs.go index 564b8e021a..d920c2209f 100644 --- a/bundle/config/mutator/translate_paths_jobs.go +++ b/bundle/config/mutator/translate_paths_jobs.go @@ -46,7 +46,7 @@ func transformWhlLibrary(resource any, dir string) *transformer { dir, &library.Whl, "libraries.whl", - translateNoOp, + translateNoOp, // Does not convert to remote path but makes sure that nested paths resolved correctly } } @@ -88,7 +88,7 @@ func transformJarLibrary(resource any, dir string) *transformer { dir, &library.Jar, "libraries.jar", - translateFilePath, + translateNoOp, // Does not convert to remote path but makes sure that nested paths resolved correctly } } diff --git a/bundle/config/mutator/translate_paths_test.go b/bundle/config/mutator/translate_paths_test.go index 41d031caad..67f15d4076 100644 --- a/bundle/config/mutator/translate_paths_test.go +++ b/bundle/config/mutator/translate_paths_test.go @@ -238,7 +238,7 @@ func TestTranslatePaths(t *testing.T) { ) assert.Equal( t, - "/bundle/dist/task.jar", + filepath.Join("dist", "task.jar"), b.Config.Resources.Jobs["job"].Tasks[5].Libraries[0].Jar, ) assert.Equal( @@ -352,7 +352,7 @@ func TestTranslatePathsInSubdirectories(t *testing.T) { ) assert.Equal( t, - "/bundle/job/dist/task.jar", + filepath.Join("job", "dist", "task.jar"), b.Config.Resources.Jobs["job"].Tasks[1].Libraries[0].Jar, ) assert.Equal(