-
Notifications
You must be signed in to change notification settings - Fork 142
Make auth profiles respect DATABRICKS_CLI_PATH env var #4467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Commit: 0159bc0
272 interesting tests: 244 MISS, 10 FAIL, 7 KNOWN, 5 SKIP, 3 flaky, 2 PANIC, 1 RECOVERED
Top 50 slowest tests (at least 2 minutes):
|
|
Commit: 0159bc0
292 interesting tests: 261 MISS, 14 FAIL, 7 KNOWN, 5 SKIP, 3 PANIC, 1 RECOVERED, 1 flaky
Top 50 slowest tests (at least 2 minutes):
|
|
Commit: 6e7a048
20 interesting tests: 7 KNOWN, 5 SKIP, 5 RECOVERED, 2 flaky, 1 FAIL
Top 50 slowest tests (at least 2 minutes):
|
| Loaders: []config.Loader{config.ConfigFile}, | ||
| ConfigFile: configFilePath, | ||
| Profile: c.Name, | ||
| DatabricksCliPath: os.Getenv("DATABRICKS_CLI_PATH"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set DATABRICKS_CLI_PATH env variable to tmp build#4467
title does not match the change. The change is that "auth profiles" now respects $DATABRICKS_CLI_PATH, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, fixed.
denik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to review other places as well?
% git grep config.Config{ ':(exclude)*_test.go' cmd
cmd/api/api.go: cfg := &config.Config{}
cmd/auth/env.go: cfg := &config.Config{
cmd/auth/login.go: err := databrickscfg.SaveToProfile(ctx, &config.Config{
cmd/auth/login.go: cfg := &config.Config{
cmd/auth/profiles.go: cfg := &config.Config{
cmd/configure/configure.go: return databrickscfg.SaveToProfile(ctx, &config.Config{
cmd/labs/project/entrypoint.go: return &config.Config{
cmd/labs/project/entrypoint.go: return &config.Config{}, nil
cmd/root/auth.go: cfg := &config.Config{}
cmd/root/auth.go: cfg := &config.Config{}
Changes
Update the
auth profilescommand to always load the value of theDATABRICKS_CLI_PATHenvironment variable as it otherwise does not load any environment variables.Why
databricks/databricks-sdk-go#1428 changed the
databricks-cliauth type in the Go SDK to use the CLI to fetch tokens instead of touching the U2M token store itself. Because of this acceptance tests break when we try to bump the go sdk version in the CLI, as the CLI was not accessible in the test environment. This PR makes it accessible.Tests
auth login acceptance tests should pass