Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions acceptance/bundle/environments/dependencies/databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ resources:
client: "1"
dependencies:
- "-r ./requirements.txt"
- -r "${workspace.file_path}/Path With Spaces/requirements.txt"
- "-r '${workspace.file_path}/Path With Spaces/requirements.txt'"
- "-e ./file.py"
- "-i http://myindexurl.com"
- "--index-url http://myindexurl.com"
Expand Down
4 changes: 4 additions & 0 deletions acceptance/bundle/environments/dependencies/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Deployment complete!
"client": "1",
"dependencies": [
"-r /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/requirements.txt",
"-r \"/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt\"",
"-r '/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt'",
"-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py",
"-i http://myindexurl.com",
"--index-url http://myindexurl.com",
Expand Down Expand Up @@ -88,6 +90,8 @@ Deployment complete!
"client": "1",
"dependencies": [
"-r /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/requirements.txt",
"-r \"/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt\"",
"-r '/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt'",
"-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py",
"-i http://myindexurl.com",
"--index-url http://myindexurl.com",
Expand Down
3 changes: 3 additions & 0 deletions bundle/libraries/local_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import (
// - s3:/mybucket/myfile.txt
// - /Users/jane@doe.com/myfile.txt
func IsLocalPath(p string) bool {
// Trim single or double quotes from the path
p = strings.Trim(p, `"'`)

// If the path has the file:// scheme, it's a runtime path (remote).
// Users should use relative paths without scheme for local files to upload.
if strings.HasPrefix(p, "file://") {
Expand Down
2 changes: 2 additions & 0 deletions bundle/libraries/local_path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ func TestIsLocalPath(t *testing.T) {
assert.True(t, IsLocalPath("myfile.txt"))
assert.True(t, IsLocalPath("./myfile.txt"))
assert.True(t, IsLocalPath("../myfile.txt"))
assert.True(t, IsLocalPath("'some/local/path'"))
assert.True(t, IsLocalPath("\"some/local/path\""))

// Absolute paths without scheme (remote).
assert.False(t, IsLocalPath("/some/full/path"))
Expand Down