diff --git a/bundle/libraries/filer_volume.go b/bundle/libraries/filer_volume.go index 6af375022..e27a88e66 100644 --- a/bundle/libraries/filer_volume.go +++ b/bundle/libraries/filer_volume.go @@ -79,7 +79,7 @@ func filerForVolume(ctx context.Context, b *bundle.Bundle) (filer.Filer, string, // If the volume exists already, directly return the filer for the path to // upload the artifacts to. if err == nil { - uploadPath := path.Join(artifactPath, ".internal") + uploadPath := path.Join(artifactPath, InternalDirName) f, err := filer.NewFilesClient(w, uploadPath) return f, uploadPath, diag.FromErr(err) } diff --git a/bundle/libraries/filer_workspace.go b/bundle/libraries/filer_workspace.go index 9172fef92..32d48f38a 100644 --- a/bundle/libraries/filer_workspace.go +++ b/bundle/libraries/filer_workspace.go @@ -8,8 +8,12 @@ import ( "github.com/databricks/cli/libs/filer" ) +// We upload artifacts to the workspace in a directory named ".internal" to have +// a well defined location for artifacts that have been uploaded by the DABs. +const InternalDirName = ".internal" + func filerForWorkspace(b *bundle.Bundle) (filer.Filer, string, diag.Diagnostics) { - uploadPath := path.Join(b.Config.Workspace.ArtifactPath, ".internal") + uploadPath := path.Join(b.Config.Workspace.ArtifactPath, InternalDirName) f, err := filer.NewWorkspaceFilesClient(b.WorkspaceClient(), uploadPath) return f, uploadPath, diag.FromErr(err) }