mirror of https://github.com/databricks/cli.git
Disable locking for development mode
This commit is contained in:
parent
0ef93c2502
commit
b7e43af4e2
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/databricks/cli/bundle"
|
||||
"github.com/databricks/cli/bundle/config"
|
||||
"github.com/databricks/cli/libs/filer"
|
||||
"github.com/databricks/cli/libs/locker"
|
||||
"github.com/databricks/cli/libs/log"
|
||||
|
@ -39,6 +40,10 @@ func (m *acquire) Apply(ctx context.Context, b *bundle.Bundle) error {
|
|||
log.Infof(ctx, "Skipping; locking is disabled")
|
||||
return nil
|
||||
}
|
||||
if b.Config.Bundle.Mode == config.Development {
|
||||
log.Infof(ctx, "Skipping; locking is disabled in development mode")
|
||||
return nil
|
||||
}
|
||||
|
||||
err := m.init(b)
|
||||
if err != nil {
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/databricks/cli/bundle"
|
||||
"github.com/databricks/cli/bundle/config"
|
||||
"github.com/databricks/cli/libs/locker"
|
||||
"github.com/databricks/cli/libs/log"
|
||||
)
|
||||
|
@ -36,6 +37,10 @@ func (m *release) Apply(ctx context.Context, b *bundle.Bundle) error {
|
|||
log.Infof(ctx, "Skipping; locking is disabled")
|
||||
return nil
|
||||
}
|
||||
if b.Config.Bundle.Mode == config.Development {
|
||||
log.Infof(ctx, "Skipping; locking is disabled in development mode")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Return early if the locker is not set.
|
||||
// It is likely an error occurred prior to initialization of the locker instance.
|
||||
|
|
Loading…
Reference in New Issue