Return more detailed error messaged when OAuth endpoints cannot be resolved.#1250
Merged
Conversation
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
parthban-db
approved these changes
Jul 20, 2025
github-merge-queue Bot
pushed a commit
to databricks/cli
that referenced
this pull request
Aug 20, 2025
## Changes Update the "auth token" command to return the same error as CLI v0.263.0. ## Why Older versions of Databricks SDKs call this command to retrieve an OAuth token. They perform a substring match on the returned error to determine if the CLI experienced a real error or if OAuth is not an applicable authentication mechanism in the user's context. By changing the error message (see databricks/databricks-sdk-go#1250), these older SDKs no longer fall through but return an error `cache: no token found` when checking if they can use OAuth to authenticate. ## Tests Adds an acceptance test. It passes with the previous version of the CLI and passes with this commit.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 20, 2026
…s runner (#1638) ## Summary Fixes automated Integration Tests for PRs on this repo. Splits `trigger-tests` into `create-check` (stays on deco runners, creates the check run on this repo) and `trigger-tests` (moves to `databricks-release-runner-group-emu-access` to perform the cross-org dispatch to `databricks-eng/eng-dev-ecosystem`). ## Why Since the `databricks` org tightened its IP allow list (between 2026-04-17 and 2026-04-20), the deco runner group can no longer call `/repos/databricks-eng/.../installation`, so `create-github-app-token` fails with 403 and no dispatch is sent. Every PR-triggered Integration Tests run on this repo has failed at that step since. Merges only work because `merge_group` auto-approves without running tests. ## What changed Exactly the diff from Hector's #1616, which was already verified green end-to-end on 2026-04-10. Supersedes #1616. ## How is this tested The PR's own Integration Tests run is the test. Confirms: - `create-check`: success (check run appears on PR head) - `trigger-tests`: success (`sdk-go-isolated-pr` dispatch appears on `databricks-eng/eng-dev-ecosystem`, event `workflow_dispatch`) - dispatched eng-dev run completes with `mark-as-pending`/`success`/`failure` green (post-#1250) - the Integration Tests check on the PR transitions `in_progress` → `success` NO_CHANGELOG=true Signed-off-by: Mihai Mitrea <mihai.mitrea@databricks.com>
denik
pushed a commit
to databricks/cli
that referenced
this pull request
May 20, 2026
## Changes Update the "auth token" command to return the same error as CLI v0.263.0. ## Why Older versions of Databricks SDKs call this command to retrieve an OAuth token. They perform a substring match on the returned error to determine if the CLI experienced a real error or if OAuth is not an applicable authentication mechanism in the user's context. By changing the error message (see databricks/databricks-sdk-go#1250), these older SDKs no longer fall through but return an error `cache: no token found` when checking if they can use OAuth to authenticate. ## Tests Adds an acceptance test. It passes with the previous version of the CLI and passes with this commit.
This file contains hidden or 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
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.
What changes are proposed in this pull request?
This PR slightly updates the endpoint resolution logic to return more detailed error messages when OAuth endpoints cannot be resolved. It also updates the TokenCache not found error to be more aligned with its semantic in the context of the token cache.
How is this tested?
Updated relevant unit tests.