-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added output message to warn about slower deployments with apps (#2161)
## Changes When users create one or more Databricks apps in their bundle it can lead to initial bundle deployment being slower because apps need to wait until their compute is fully provisioned and started. This PR adds a message to warn about it. This message will be removed when `no_compute` option becomes available in TF provider and used in DABs (#2144)
- Loading branch information
1 parent
b273dc5
commit 8f34fc7
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package apps | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/databricks/cli/bundle" | ||
"github.com/databricks/cli/libs/cmdio" | ||
"github.com/databricks/cli/libs/diag" | ||
) | ||
|
||
type slowDeployMessage struct{} | ||
|
||
// TODO: needs to be removed when when no_compute option becomes available in TF provider and used in DABs | ||
// See https://github.com/databricks/cli/pull/2144 | ||
func (v *slowDeployMessage) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics { | ||
if len(b.Config.Resources.Apps) > 0 { | ||
cmdio.LogString(ctx, "Databricks apps in your bundle can slow initial deployment as they wait for compute provisioning.") | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (v *slowDeployMessage) Name() string { | ||
return "apps.SlowDeployMessage" | ||
} | ||
|
||
func SlowDeployMessage() bundle.Mutator { | ||
return &slowDeployMessage{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters