2023-09-14 10:14:13 +00:00
package config
type Experimental struct {
Scripts map [ ScriptHook ] Command ` json:"scripts,omitempty" `
2023-09-26 14:32:20 +00:00
// By default Python wheel tasks deployed as is to Databricks platform.
// If notebook wrapper required (for example, used in DBR < 13.1 or other configuration differences), users can provide a following experimental setting
// experimental:
// python_wheel_wrapper: true
// In this case the configured wheel task will be deployed as a notebook task which install defined wheel in runtime and executes it.
// For more details see https://github.com/databricks/cli/pull/797 and https://github.com/databricks/cli/pull/635
PythonWheelWrapper bool ` json:"python_wheel_wrapper,omitempty" `
2024-04-22 11:51:41 +00:00
// Enable legacy run_as behavior. That is:
// - Set the run_as identity as the owner of any pipelines in the bundle.
// - Do not error in the presence of resources that do not support run_as.
// As of April 2024 this includes pipelines and model serving endpoints.
//
// This mode of run_as requires the deploying user to be a workspace and metastore
// admin. Use of this flag is not recommend for new bundles, and it is only provided
// to unblock customers that are stuck due to breaking changes in the run_as behavior
// made in https://github.com/databricks/cli/pull/1233. This flag might
// be removed in the future once we have a proper workaround like allowing IS_OWNER
// as a top-level permission in the DAB.
UseLegacyRunAs bool ` json:"use_legacy_run_as,omitempty" `
2024-06-20 08:43:08 +00:00
// PyDABs determines whether to load the 'databricks-pydabs' package.
//
// PyDABs allows to define bundle configuration using Python.
PyDABs PyDABs ` json:"pydabs,omitempty" `
}
type PyDABs struct {
// Enabled is a flag to enable the feature.
Enabled bool ` json:"enabled,omitempty" `
// VEnvPath is path to the virtual environment.
//
2024-08-20 13:26:57 +00:00
// If enabled, PyDABs will execute code within this environment. If disabled,
// it defaults to using the Python interpreter available in the current shell.
2024-06-20 08:43:08 +00:00
VEnvPath string ` json:"venv_path,omitempty" `
2024-08-19 13:24:56 +00:00
// Import contains a list Python packages with PyDABs code.
//
// These packages are imported to discover resources, resource generators, and mutators.
// This list can include namespace packages, which causes the import of nested packages.
Import [ ] string ` json:"import,omitempty" `
2024-09-20 14:36:43 +00:00
// LoadLocations is a flag to enable loading Python source locations from the PyDABs.
//
// Locations are only supported since PyDABs 0.6.0, and because of that,
// this flag is disabled by default.
LoadLocations bool ` json:"load_locations,omitempty" `
2023-09-14 10:14:13 +00:00
}
type Command string
type ScriptHook string
// These hook names are subject to change and currently experimental
const (
ScriptPreInit ScriptHook = "preinit"
ScriptPostInit ScriptHook = "postinit"
ScriptPreBuild ScriptHook = "prebuild"
ScriptPostBuild ScriptHook = "postbuild"
ScriptPreDeploy ScriptHook = "predeploy"
ScriptPostDeploy ScriptHook = "postdeploy"
)