You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: default to DEFAULT profile in init command (#4508)
## Changes
- We default to the DEFAULT profile in the init command
- This is the behavior of the Databricks WorkspaeClient Go SDK when
selecting the host. Basically, priorities are: Flag > Env var > DEFAULT
profile > Prompt. [code
pointer](https://github.com/databricks/databricks-sdk-go/blob/main/config/config_file.go#L90)
- However, the profile used by the Go SDK is not persisted in the CLI
`Config.Profile` attribute in this scenario (ie, when the DEFAULT one is
used).
## Why
- The `init` command needs to a profile to resolve the host and
instantiate the template. It does so successfully but then fails in the
`deploy` step because the profile is ambiguous, despite a specific
profile having been used earlier. This behavior is incoherent.
## Tests
<!-- How have you tested the changes? -->
<!-- If your PR needs to be included in the release notes for next
release,
add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
returnfmt.Errorf("failed to change to project directory: %w", err)
810
811
}
812
+
ifprofile=="" {
813
+
// If the profile is not set, it means the DEFAULT profile was used to infer the workspace host, we set it so that it's used for the deploy and dev-remote commands
0 commit comments