File tree Expand file tree Collapse file tree
acceptance/bundle/environments/dependencies
bundle/config/mutator/paths Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111### Bundles
1212* Fix processing short pip flags in environment dependencies ([ #3708 ] ( https://github.com/databricks/cli/pull/3708 ) )
1313* Add support for referencing local files in -e pip flag for environment dependencies ([ #3708 ] ( https://github.com/databricks/cli/pull/3708 ) )
14+ * Fix PIP flag processing in pipeline environment dependencies ([ #3734 ] ( https://github.com/databricks/cli/pull/3734 ) )
1415
1516### API Changes
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ resources:
3838 name : " Test Pipeline"
3939 environment :
4040 dependencies :
41+ - " -r ./requirements.txt"
42+ - " -e ./file.py"
43+ - " -i http://myindexurl.com"
44+ - " --index-url http://myindexurl.com"
4145 - " dist/*.whl"
4246 - " /Workspace/Users/test@databricks.com/test-package.whl"
4347 - " test_package"
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ Deployment complete!
6161 "edition": "ADVANCED",
6262 "environment": {
6363 "dependencies": [
64+ "-r /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/requirements.txt",
65+ "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py",
66+ "-i http://myindexurl.com",
67+ "--index-url http://myindexurl.com",
6468 "/Workspace/Users/[USERNAME]/.bundle/dependencies/default/artifacts/.internal/test.whl",
6569 "/Workspace/Users/test@databricks.com/test-package.whl",
6670 "test_package",
@@ -110,6 +114,10 @@ Deployment complete!
110114>>> [CLI] bundle validate -o json
111115{
112116 "dependencies": [
117+ "-r /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/requirements.txt",
118+ "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py",
119+ "-i http://myindexurl.com",
120+ "--index-url http://myindexurl.com",
113121 "./dist/*.whl",
114122 "/Workspace/Users/test@databricks.com/test-package.whl",
115123 "test_package",
Original file line number Diff line number Diff line change @@ -39,6 +39,24 @@ func pipelineRewritePatterns() []pipelineRewritePattern {
3939 },
4040 }
4141
42+ pipelineEnvironmentsPatternsWithPipFlags := []pipelineRewritePattern {
43+ {
44+ dyn .NewPattern (
45+ dyn .Key ("resources" ),
46+ dyn .Key ("pipelines" ),
47+ dyn .AnyKey (),
48+ dyn .Key ("environment" ),
49+ dyn .Key ("dependencies" ),
50+ dyn .AnyIndex (),
51+ ),
52+ TranslateModeEnvironmentPipFlag ,
53+ func (s string ) bool {
54+ _ , _ , ok := libraries .IsLocalPathInPipFlag (s )
55+ return ! ok
56+ },
57+ },
58+ }
59+
4260 // Compile list of configuration paths to rewrite.
4361 allPatterns := []pipelineRewritePattern {
4462 {
@@ -64,6 +82,7 @@ func pipelineRewritePatterns() []pipelineRewritePattern {
6482 }
6583
6684 allPatterns = append (allPatterns , pipelineEnvironmentsPatterns ... )
85+ allPatterns = append (allPatterns , pipelineEnvironmentsPatternsWithPipFlags ... )
6786 return allPatterns
6887}
6988
You can’t perform that action at this time.
0 commit comments