mirror of https://github.com/databricks/cli.git
Rename bundle root path
This commit is contained in:
parent
df61375995
commit
43ce278299
|
@ -112,7 +112,7 @@ func (m *pythonMutator) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagno
|
|||
|
||||
rightRoot, diags := m.runPythonMutator(ctx, leftRoot, runPythonMutatorOpts{
|
||||
cacheDir: cacheDir,
|
||||
rootPath: b.BundleRootPath,
|
||||
bundleRootPath: b.BundleRootPath,
|
||||
pythonPath: pythonPath,
|
||||
loadLocations: experimental.PyDABs.LoadLocations,
|
||||
})
|
||||
|
@ -161,7 +161,7 @@ func createCacheDir(ctx context.Context) (string, error) {
|
|||
|
||||
type runPythonMutatorOpts struct {
|
||||
cacheDir string
|
||||
rootPath string
|
||||
bundleRootPath string
|
||||
pythonPath string
|
||||
loadLocations bool
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ func (m *pythonMutator) runPythonMutator(ctx context.Context, root dyn.Value, op
|
|||
_, processErr := process.Background(
|
||||
ctx,
|
||||
args,
|
||||
process.WithDir(opts.rootPath),
|
||||
process.WithDir(opts.bundleRootPath),
|
||||
process.WithStderrWriter(stderrWriter),
|
||||
process.WithStdoutWriter(stdoutWriter),
|
||||
)
|
||||
|
@ -245,7 +245,7 @@ func (m *pythonMutator) runPythonMutator(ctx context.Context, root dyn.Value, op
|
|||
return dyn.InvalidValue, diag.Errorf("failed to load locations: %s", err)
|
||||
}
|
||||
|
||||
output, outputDiags := loadOutputFile(opts.rootPath, outputPath, locations)
|
||||
output, outputDiags := loadOutputFile(opts.bundleRootPath, outputPath, locations)
|
||||
pythonDiagnostics = pythonDiagnostics.Extend(outputDiags)
|
||||
|
||||
// we pass through pythonDiagnostic because it contains warnings
|
||||
|
@ -317,7 +317,7 @@ func loadOutputFile(rootPath string, outputPath string, locations *pythonLocatio
|
|||
// we need absolute path because later parts of pipeline assume all paths are absolute
|
||||
// and this file will be used as location to resolve relative paths.
|
||||
//
|
||||
// virtualPath has to stay in rootPath, because locations outside root path are not allowed:
|
||||
// virtualPath has to stay in bundleRootPath, because locations outside root path are not allowed:
|
||||
//
|
||||
// Error: path /var/folders/.../pydabs/dist/*.whl is not contained in bundle root path
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue