Compare commits

..

No commits in common. "b54024d52352474248a5159c4240484d1a7acd06" and "1b3041ecee3a97a8169e24806a1d8f0c92b5dd16" have entirely different histories.

11 changed files with 18 additions and 19 deletions

View File

@ -35,7 +35,7 @@ type Bundle struct {
// It is set when we instantiate a new bundle instance.
BundleRootPath string
// BundleRoot is a virtual filesystem path to [BundleRootPath].
// BundleRoot is a virtual filesystem path [BundleRootPath].
// Exclusively use this field for filesystem operations.
BundleRoot vfs.Path

View File

@ -1,4 +1,4 @@
package trampoline
package mutator
import (
"context"
@ -23,7 +23,6 @@ type TrampolineFunctions interface {
GetTasks(b *bundle.Bundle) []TaskWithJobKey
CleanUp(task *jobs.Task) error
}
type trampoline struct {
name string
functions TrampolineFunctions

View File

@ -1,4 +1,4 @@
package trampoline
package mutator
import (
"context"

View File

@ -15,8 +15,8 @@ import (
"github.com/databricks/cli/bundle/deploy/terraform"
"github.com/databricks/cli/bundle/libraries"
"github.com/databricks/cli/bundle/permissions"
"github.com/databricks/cli/bundle/python"
"github.com/databricks/cli/bundle/scripts"
"github.com/databricks/cli/bundle/trampoline"
"github.com/databricks/cli/libs/cmdio"
"github.com/databricks/cli/libs/sync"
terraformlib "github.com/databricks/cli/libs/terraform"
@ -157,7 +157,7 @@ func Deploy(outputHandler sync.OutputHandler) bundle.Mutator {
artifacts.CleanUp(),
libraries.ExpandGlobReferences(),
libraries.Upload(),
trampoline.TransformWheelTask(),
python.TransformWheelTask(),
files.Upload(outputHandler),
deploy.StateUpdate(),
deploy.StatePush(),

View File

@ -9,8 +9,8 @@ import (
"github.com/databricks/cli/bundle/deploy/metadata"
"github.com/databricks/cli/bundle/deploy/terraform"
"github.com/databricks/cli/bundle/permissions"
"github.com/databricks/cli/bundle/python"
"github.com/databricks/cli/bundle/scripts"
"github.com/databricks/cli/bundle/trampoline"
)
// The initialize phase fills in defaults and connects to the workspace.
@ -66,7 +66,7 @@ func Initialize() bundle.Mutator {
mutator.ConfigureWSFS(),
mutator.TranslatePaths(),
trampoline.WrapperWarning(),
python.WrapperWarning(),
permissions.ApplyBundlePermissions(),
permissions.FilterCurrentUser(),
metadata.AnnotateJobs(),

View File

@ -1,4 +1,4 @@
package trampoline
package python
import (
"context"

View File

@ -1,4 +1,4 @@
package trampoline
package python
import (
"context"
@ -69,7 +69,7 @@ func TransformWheelTask() bundle.Mutator {
res := b.Config.Experimental != nil && b.Config.Experimental.PythonWheelWrapper
return res, nil
},
NewTrampoline(
mutator.NewTrampoline(
"python_wheel",
&pythonTrampoline{},
NOTEBOOK_TEMPLATE,
@ -94,9 +94,9 @@ func (t *pythonTrampoline) CleanUp(task *jobs.Task) error {
return nil
}
func (t *pythonTrampoline) GetTasks(b *bundle.Bundle) []TaskWithJobKey {
func (t *pythonTrampoline) GetTasks(b *bundle.Bundle) []mutator.TaskWithJobKey {
r := b.Config.Resources
result := make([]TaskWithJobKey, 0)
result := make([]mutator.TaskWithJobKey, 0)
for k := range b.Config.Resources.Jobs {
tasks := r.Jobs[k].JobSettings.Tasks
for i := range tasks {
@ -110,7 +110,7 @@ func (t *pythonTrampoline) GetTasks(b *bundle.Bundle) []TaskWithJobKey {
continue
}
result = append(result, TaskWithJobKey{
result = append(result, mutator.TaskWithJobKey{
JobKey: k,
Task: task,
})

View File

@ -1,4 +1,4 @@
package trampoline
package python
import (
"context"

View File

@ -1,4 +1,4 @@
package trampoline
package python
import (
"context"

View File

@ -1,4 +1,4 @@
package trampoline
package python
import (
"context"