mirror of https://github.com/databricks/cli.git
Don't support databricks bundle run --deploy for now
This commit is contained in:
parent
34a1698d24
commit
ddcd6131ca
|
@ -14,7 +14,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var runOptions run.Options
|
var runOptions run.Options
|
||||||
var deployFlag bool
|
|
||||||
var noWait bool
|
var noWait bool
|
||||||
|
|
||||||
var runCmd = &cobra.Command{
|
var runCmd = &cobra.Command{
|
||||||
|
@ -26,17 +25,6 @@ var runCmd = &cobra.Command{
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
b := bundle.Get(cmd.Context())
|
b := bundle.Get(cmd.Context())
|
||||||
|
|
||||||
if deployFlag {
|
|
||||||
err := deploy(cmd, b)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
} else if computeID != "" {
|
|
||||||
// Running notebooks is not yet implemented, otherwise we could
|
|
||||||
// use --compute with a notebook
|
|
||||||
return fmt.Errorf("not supported: --compute specified without --deploy")
|
|
||||||
}
|
|
||||||
|
|
||||||
err := bundle.Apply(cmd.Context(), b, bundle.Seq(
|
err := bundle.Apply(cmd.Context(), b, bundle.Seq(
|
||||||
phases.Initialize(),
|
phases.Initialize(),
|
||||||
terraform.Interpolate(),
|
terraform.Interpolate(),
|
||||||
|
@ -104,8 +92,5 @@ var runCmd = &cobra.Command{
|
||||||
func init() {
|
func init() {
|
||||||
runOptions.Define(runCmd.Flags())
|
runOptions.Define(runCmd.Flags())
|
||||||
rootCmd.AddCommand(runCmd)
|
rootCmd.AddCommand(runCmd)
|
||||||
runCmd.Flags().BoolVar(&deployFlag, "deploy", false, "Call deploy before run.")
|
|
||||||
runCmd.Flags().BoolVar(&forceDeploy, "force", false, "Force acquisition of deployment lock.")
|
|
||||||
runCmd.Flags().BoolVar(&noWait, "no-wait", false, "Don't wait for the run to complete.")
|
runCmd.Flags().BoolVar(&noWait, "no-wait", false, "Don't wait for the run to complete.")
|
||||||
runCmd.Flags().StringVar(&computeID, "compute", "", "Override compute in the deployment with the given compute ID.")
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue