databricks-cli/bundle/config
Gleb Kanterov ed448815b4
PythonMutator: explain missing package error (#1736)
## Changes
Explain the error when the `databricks-pydabs` package is not installed
or the Python environment isn't correctly activated.

Example output:

```
Error: python mutator process failed: ".venv/bin/python3 -m databricks.bundles.build --phase load --input .../input.json --output .../output.json --diagnostics .../diagnostics.json: exit status 1", use --debug to enable logging

.../.venv/bin/python3: Error while finding module specification for 'databricks.bundles.build' (ModuleNotFoundError: No module named 'databricks')

Explanation: 'databricks-pydabs' library is not installed in the Python environment.

If using Python wheels, ensure that 'databricks-pydabs' is included in the dependencies, 
and that the wheel is installed in the Python environment:

  $ .venv/bin/pip install -e .

If using a virtual environment, ensure it is specified as the venv_path property in databricks.yml, 
or activate the environment before running CLI commands:

  experimental:
    pydabs:
      venv_path: .venv
```

## Tests
Unit tests
2024-09-02 09:49:30 +00:00
..
generate Track multiple locations associated with a `dyn.Value` (#1510) 2024-07-16 11:27:27 +00:00
loader Return diagnostics from `config.Load` (#1324) 2024-03-28 10:59:03 +00:00
mutator PythonMutator: explain missing package error (#1736) 2024-09-02 09:49:30 +00:00
resources Stop tracking file path locations in bundle resources (#1673) 2024-08-13 12:50:15 +00:00
validate Report all empty resources present in error diagnostic (#1685) 2024-08-20 00:22:00 +00:00
variable Upgrade Go SDK to 0.44.0 (#1679) 2024-08-15 13:23:07 +00:00
artifact.go Stop tracking file path locations in bundle resources (#1673) 2024-08-13 12:50:15 +00:00
artifacts_test.go Added exec.NewCommandExecutor to execute commands with correct interpreter (#1075) 2023-12-21 15:45:23 +00:00
bundle.go Allow specifying CLI version constraints required to run the bundle (#1320) 2024-04-02 12:55:21 +00:00
deployment.go Make lock optional in the JSON schema (#1738) 2024-09-02 08:39:08 +00:00
experimental.go Make `pydabs/venv_path` optional (#1687) 2024-08-20 13:26:57 +00:00
filename.go Move bundle configuration filename code (#917) 2023-10-25 09:54:39 +00:00
filename_test.go Move bundle configuration filename code (#917) 2023-10-25 09:54:39 +00:00
git.go Use dynamic configuration model in bundles (#1098) 2024-02-16 19:41:58 +00:00
lock.go Disable locking for development mode (#1302) 2024-04-18 01:59:39 +00:00
lock_test.go Acquire lock prior to deploy (#270) 2023-03-22 16:37:26 +01:00
presets.go Add configurable presets for name prefixes, tags, etc. (#1490) 2024-08-19 18:18:50 +00:00
resources.go Stop tracking file path locations in bundle resources (#1673) 2024-08-13 12:50:15 +00:00
resources_test.go Use dynamic walking to validate unique resource keys (#1614) 2024-07-29 13:04:02 +00:00
root.go Add configurable presets for name prefixes, tags, etc. (#1490) 2024-08-19 18:18:50 +00:00
root_test.go Use dynamic walking to validate unique resource keys (#1614) 2024-07-29 13:04:02 +00:00
sync.go Add paths field to bundle sync configuration (#1694) 2024-08-21 15:33:25 +00:00
target.go Add configurable presets for name prefixes, tags, etc. (#1490) 2024-08-19 18:18:50 +00:00
workspace.go Added `auth describe` command (#1244) 2024-04-03 08:14:04 +00:00
workspace_test.go Resolve configuration before performing verification (#890) 2023-10-20 13:10:31 +00:00