Skip to content

Return more detailed error messaged when OAuth endpoints cannot be resolved.#1250

Merged
renaudhartert-db merged 3 commits into
mainfrom
renaud-hartert_data/oauth-error
Jul 20, 2025
Merged

Return more detailed error messaged when OAuth endpoints cannot be resolved.#1250
renaudhartert-db merged 3 commits into
mainfrom
renaud-hartert_data/oauth-error

Conversation

@renaudhartert-db

@renaudhartert-db renaudhartert-db commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

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.

@renaudhartert-db renaudhartert-db changed the title Return more details error message when OAuth endpoints cannot be resolved. Return more detailed error messaged when OAuth endpoints cannot be resolved. Jul 20, 2025
@github-actions

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1250
  • Commit SHA: f5f996f58462a665ca624bf6b7c1b9dae676b7d4

Checks will be approved automatically on success.

@renaudhartert-db renaudhartert-db added this pull request to the merge queue Jul 20, 2025
Merged via the queue into main with commit 31c554d Jul 20, 2025
15 checks passed
@renaudhartert-db renaudhartert-db deleted the renaud-hartert_data/oauth-error branch July 20, 2025 15:04
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants