File tree Expand file tree Collapse file tree 5 files changed +66
-0
lines changed
acceptance/bundle/templates/default-python/fail-missing-uv Expand file tree Collapse file tree 5 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "project_name" : " fail_missing_uv" ,
3+ "include_notebook" : " no" ,
4+ "include_dlt" : " no" ,
5+ "include_python" : " yes" ,
6+ "serverless" : " no"
7+ }
Original file line number Diff line number Diff line change 1+ Local = true
2+ Cloud = false
3+
4+ [EnvMatrix ]
5+ DATABRICKS_CLI_DEPLOYMENT = [" terraform" , " direct-exp" ]
Original file line number Diff line number Diff line change 1+
2+ >>> [CLI] bundle init default-python --config-file ./input.json --output-dir output
3+
4+ Welcome to the default Python template for Databricks Asset Bundles!
5+ Workspace to use (auto-detected, edit in 'fail_missing_uv/databricks.yml'): [DATABRICKS_URL]
6+
7+ ✨ Your new project has been created in the 'fail_missing_uv' directory!
8+
9+ Please refer to the README.md file for "getting started" instructions.
10+ See also the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
11+
12+ >>> [CLI] bundle validate
13+ Name: fail_missing_uv
14+ Target: dev
15+ Workspace:
16+ Host: [DATABRICKS_URL]
17+ User: [USERNAME]
18+ Path: /Workspace/Users/[USERNAME]/.bundle/fail_missing_uv/dev
19+
20+ Validation OK!
21+
22+ >>> [CLI] bundle deploy
23+ Building python_artifact...
24+ Error: build failed python_artifact, error: exit status 127, output: bash: uv: command not found
25+
26+
27+
28+ Exit code: 1
Original file line number Diff line number Diff line change 1+ trace $CLI bundle init default-python --config-file ./input.json --output-dir output
2+
3+ cd output/fail_missing_uv
4+ trace $CLI bundle validate
5+
6+ # Dynamically find the directory containing 'uv' and remove it from PATH
7+ uv_dir=$(dirname "$(command -v uv 2>/dev/null || which uv 2>/dev/null)")
8+ if [ -n "$uv_dir" ]; then
9+ export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v "^$uv_dir$" | paste -sd: -)
10+ fi
11+
12+ # Try to deploy, expect failure due to missing uv
13+ errcode trace $CLI bundle deploy
Original file line number Diff line number Diff line change 1+ Badness = " The error message is not ideal: it reports a generic build failure or 'command not found' instead of a clear message that 'uv' is missing from the environment."
2+
3+ Local = true
4+ Cloud = false
5+
6+ Ignore = [
7+ ' output/fail_missing_uv' ,
8+ ]
9+
10+ # Replace the uv not found error for portability
11+ [[Repls ]]
12+ Old = ' (/usr)?(/bin)?/bash(: line 1)?: uv: command not found'
13+ New = ' bash: uv: command not found'
You can’t perform that action at this time.
0 commit comments