-
Notifications
You must be signed in to change notification settings - Fork 69
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
Prompt once for a client profile #727
Merged
Merged
Conversation
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
This cannot be merged until we also confirm that a request can be authenticated (we don't need to make one). |
The previous implementation was prone to infinite looping for the account client due to a mismatch in determining what constitutes an account client. Ultimately, this code must never infinite loop. If a user is prompted and selects a profile that cannot be used, they should receive that feedback immediately and try again, instead of being prompted again.
* Authenticate empty request both for account and workspace client * Prompt only on wrong or ambiguous client configuration * Run selector through cmdio to pick up configured stdin/stderr
pietern
force-pushed
the
prompt-auth-once
branch
from
September 11, 2023 08:03
8d63a64
to
11c6d3a
Compare
shreyas-goenka
approved these changes
Sep 11, 2023
andrewnester
approved these changes
Sep 11, 2023
andrewnester
approved these changes
Sep 11, 2023
pietern
added a commit
that referenced
this pull request
Sep 12, 2023
This release marks the public preview phase of Databricks Asset Bundles. For more information, please refer to our online documentation at https://docs.databricks.com/en/dev-tools/bundles/. CLI: * Prompt once for a client profile ([#727](#727)). Bundles: * Use clearer error message when no interpolation value is found. ([#764](#764)). * Use interactive prompt to select resource to run if not specified ([#762](#762)). * Add documentation link bundle command group description ([#770](#770)).
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 12, 2023
This release marks the public preview phase of Databricks Asset Bundles. For more information, please refer to our online documentation at https://docs.databricks.com/en/dev-tools/bundles/. CLI: * Prompt once for a client profile ([#727](#727)). Bundles: * Use clearer error message when no interpolation value is found. ([#764](#764)). * Use interactive prompt to select resource to run if not specified ([#762](#762)). * Add documentation link bundle command group description ([#770](#770)).
hectorcast-db
pushed a commit
that referenced
this pull request
Oct 13, 2023
## Changes The previous implementation ran the risk of infinite looping for the account client due to a mismatch in determining what constitutes an account client between the CLI and SDK (see [here](https://github.com/databricks/cli/blob/83443bae8d8ad4df3758f4192c6bbe613faae9c4/libs/databrickscfg/profiles.go#L61) and [here](https://github.com/databricks/databricks-sdk-go/blob/0fdc5165e57a4e7af6ec97b47595c6dddf37b10b/config/config.go#L160)). Ultimately, this code must never infinite loop. If a user is prompted and selects a profile that cannot be used, they should receive that feedback immediately and try again, instead of being prompted again. Related to #726. ## Tests <!-- How is this tested? -->
hectorcast-db
pushed a commit
that referenced
this pull request
Oct 13, 2023
This release marks the public preview phase of Databricks Asset Bundles. For more information, please refer to our online documentation at https://docs.databricks.com/en/dev-tools/bundles/. CLI: * Prompt once for a client profile ([#727](#727)). Bundles: * Use clearer error message when no interpolation value is found. ([#764](#764)). * Use interactive prompt to select resource to run if not specified ([#762](#762)). * Add documentation link bundle command group description ([#770](#770)).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
The previous implementation ran the risk of infinite looping for the account client due to a mismatch in determining what constitutes an account client between the CLI and SDK (see here and here).
Ultimately, this code must never infinite loop. If a user is prompted and selects a profile that cannot be used, they should receive that feedback immediately and try again, instead of being prompted again.
Related to #726.
Tests